Open
Description
gptscript version v0.0.0-dev-53f7fbde-dirty
Steps to reproduce the problem:
- Chat with the
local-files-demo
withclaude-3-5-sonnet-20240620
provider using the example prompts given in docs - https://docs.gptscript.ai/examples/local-files -gptscript --default-model 'claude-3-5-sonnet-20240620 from github.com/gptscript-ai/claude3-anthropic-provider' --workspace . github.com/gptscript-ai/local-files-demo
2. It tries to use structuredDataQuerier tool for
Can you make a cleaned up csv of it?` and fails since ".txt" file is not supported.
> Yes. Can you make a cleaned up csv of it?
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
│ Call Arguments:
│
│ structuredDataQuerier {"file": "/Users/sangeethahariharan/local-files-demo/sample-data/key_contacts.txt", "prompt": "Clean and structure the key contacts data. Create a table wit.
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
┌──────────────────────────────────────────────────────────────────────────────────────────────┐
│ Call Arguments: │
│ │
│ loadData {"file": "/Users/sangeethahariharan/local-files-demo/sample-data/key_contacts.txt"} │
└──────────────────────────────────────────────────────────────────────────────────────────────┘
┌──────────────────────────────────────────────────────┐
│ Call Arguments: │
│ │
│ createDatabaseFile {"dbFile": "key_contacts.duckdb"} │
└──────────────────────────────────────────────────────┘
Running create-database-file from github.com/gptscript-ai/structured-data-querier
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Success, The database already exists at /Users/sangeethahariharan/local-files-demo/sample-data/key_contacts.duckdb. │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Call Arguments: │
│ │
│ readSchema {"dbFile": "key_contacts.duckdb", "file": "/Users/sangeethahariharan/local-files-demo/sample-data/key_contacts.txt"} │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Running read-schema from github.com/gptscript-ai/structured-data-querier
┌─────────────────────────────────────────────────────────────────────────────────────────────┐
│ Error, Unsupported file type. Please provide a .json, .ndjson, .jsonl, .csv, or .xlsx file. │
└─────────────────────────────────────────────────────────────────────────────────────────────┘
2024/06/26 16:19:27 ERROR: Error, Unsupported file type. Please provide a .json, .ndjson, .jsonl, .csv, or .xlsx file.
: exit status 1
>
In this case , if I instruct the LLM to use read tool specifically it would succeed like Can you make a cleaned up csv of it? Use read tool for this.
.
Expected Behavior:
Error should be presented to the user and he should still be present in the context of chat so that they are able to alter the chat messages and move forward.