fjrdomingues / autopilot

Code Autopilot, a tool that uses GPT to read a codebase, create context and solve tasks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when running a task using node ui -t "TEST"

lanalex opened this issue · comments

Describe the issue
A clear and concise description of what the bug is.
Users/alexlan/Code/autopilot/node_modules/langchain/dist/output_parsers/structured.cjs:74
throw new index_js_1.OutputParserException(Failed to parse. Text: ${text}. Error: ${e});
^

OutputParserException [Error]: Failed to parse. Text: ```json
{
"thoughts": {
"text": "Refactor the code to improve readability and maintainability. Add comments to explain the purpose of each function and class. Use more descriptive variable names. Use consistent formatting throughout the code.",

Version details
AutoPilot version tested: (git rev-parse HEAD)
8d1ea56

Node version: (node --version)
v20.0.0

Task input
What was the task text provided?

Logs
What did you get on screen:

The content of the last file under the logs directory:

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

Big task 😅
This error is when the model is giving a bad answer, the returned format is incorrect, we have this task to try to mitigate that. (there is already code trying to fix bad responses but 🤷 , could probably also catch the issue and put a better message to the user your agent was bad today, try again)
#160

Hi, you mean the answer from chatgpt is not good?

it always happens for my code,it never works :(