Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: the arguments is not valid JSON #149

Open
wenxuan1017 opened this issue Dec 19, 2023 · 6 comments
Open

BUG: the arguments is not valid JSON #149

wenxuan1017 opened this issue Dec 19, 2023 · 6 comments

Comments

@wenxuan1017
Copy link

When python code in "arguments", it would post this error.

Error in CodeInterpreterSession: ValueError - An output parsing error occurred. In order to pass this error back to the agent and have it try again, pass handle_parsing_errors=True to the AgentExecutor. This is the error: Could not parse tool input:{'name': 'python', 'arguments': "import pandas as pd\n\n# Read the CSV file\ndf = pd.read_csv('test_table.csv')\n\n# Display the first 10 rows of the table\ndf.head(10)"} because the arguments is not valid JSON.

I used Azure openai api, both gpt-4 and gpt-35-turbo i had tried.
langchain==0.0349
could you help me

@jawadchughtai6
Copy link

Yep, facing the same issue

@jawadchughtai6
Copy link

@shroominic Can you please assist with this? Thanks!

@shroominic
Copy link
Owner

hey not fully sure whats causing this issue but codeinterpreterapi==0.0.14 seems to be more stable

@macmus82
Copy link

Not able t run this too same issue :(

@twiecki
Copy link

twiecki commented Jan 25, 2024

Same issue.

@twiecki
Copy link

twiecki commented Jan 25, 2024

I think this is due to deprecated API.

https://github.com/shroominic/codeinterpreter-api/blob/main/src/codeinterpreterapi/_patch_parser.py#L109 overwrites the deprecated OpenAIFunctionsAgent:
https://api.python.langchain.com/en/latest/agents/langchain.agents.openai_functions_agent.base.OpenAIFunctionsAgent.html#

So the patch just gets ignored. Not sure how this could be fixed however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants