like-gold
like-goldβ€’2w ago

Running swe example fails

I am trying to run the SWE agent example. The only change I made was swapping gpt-4o out for gpt-3.5-turbo (to remain on free plan, I have confirmed gpt-3.5-turbo is available for API on free tier). However, I get this error:
Error: 400 Invalid tool_choice: `required`. You must enable at least one tool to use this option.
at Function.generate (/home/page/Documents/Dev/swe-js-1/node_modules/openai/src/error.ts:70:14)
at OpenAI.makeStatusError (/home/page/Documents/Dev/swe-js-1/node_modules/openai/src/core.ts:397:21)
at OpenAI.makeRequest (/home/page/Documents/Dev/swe-js-1/node_modules/openai/src/core.ts:460:24)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Runs.createAndPoll (/home/page/Documents/Dev/swe-js-1/node_modules/openai/src/resources/beta/threads/runs/runs.ts:125:17)
at main (/home/page/Documents/Dev/swe-js-1/src/app.ts:33:18)
[ERROR] 13:41:26 Error: 400 Invalid tool_choice: `required`. You must enable at least one tool to use this option.
Error: 400 Invalid tool_choice: `required`. You must enable at least one tool to use this option.
at Function.generate (/home/page/Documents/Dev/swe-js-1/node_modules/openai/src/error.ts:70:14)
at OpenAI.makeStatusError (/home/page/Documents/Dev/swe-js-1/node_modules/openai/src/core.ts:397:21)
at OpenAI.makeRequest (/home/page/Documents/Dev/swe-js-1/node_modules/openai/src/core.ts:460:24)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Runs.createAndPoll (/home/page/Documents/Dev/swe-js-1/node_modules/openai/src/resources/beta/threads/runs/runs.ts:125:17)
at main (/home/page/Documents/Dev/swe-js-1/src/app.ts:33:18)
[ERROR] 13:41:26 Error: 400 Invalid tool_choice: `required`. You must enable at least one tool to use this option.
However it seems to be tools have been selected, on line 18, of https://github.com/ComposioHQ/swe-js-template/blob/master/src/agents/swe.ts apps: [ "filetool", "fileedittool", "shelltool" ],
GitHub
swe-js-template/src/agents/swe.ts at master Β· ComposioHQ/swe-js-tem...
Contribute to ComposioHQ/swe-js-template development by creating an account on GitHub.
5 Replies
like-gold
like-goldβ€’2w ago
If I remove app.ts:36, I am able to run, but no patch is generated. It runs very quickly, so I am wondering if that line was critical. Is there a different SWE agent example I should be using? Same result (no patch generated) from changing value to "none"
helpful-purple
helpful-purpleβ€’2w ago
Hey @pager, it is recommended to use like gpt-4o, gpt-4-turbo as that model which you are using, it doesn't even reach to composio in maximum cases.
helpful-purple
helpful-purpleβ€’2w ago
Hey, which line no. 36 of app.ts, you are talking about πŸ™‚ I can see that line empty there...
No description
like-gold
like-goldβ€’2w ago
Sorry, meant line 32 Oh, understood, thank you
helpful-purple
helpful-purpleβ€’2w ago
Cool, lemme know if you need any other help @pager, would love to help you out πŸ˜„