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

Examples work, custom prompt for code base generation generate OpenAI Error 400 #3

Closed
MorenoLabs opened this issue Jun 16, 2024 · 4 comments

Comments

@MorenoLabs
Copy link

Super curious about L2MAC, have been testing the examples from quickstart but other basic requests e.g.

l2mac "create a eda app for csv file" (and other basic ones) throw ultimately after 2-3 steps the following error:

MainProcess| 2024-06-16 10:23:10,726,726 multiprocessing INFO [L2MAC][OpenAI API Request Error] <class 'openai.BadRequestError'> ('Error code: 400 - {'error': {'message': "An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. The following tool_call_ids did not have response messages: call_5NeB7YpcWw1zVdRgPjozrX0s", 'type': 'invalid_request_error', 'param': 'messages.[5].role', 'code': None}}',) | num_retries: 0 / 10

it keeps retrying but same error.

Any idea how to mitigate that? Researching this got no results.

Thanks for your support!

@samholt
Copy link
Owner

samholt commented Jul 2, 2024

Thank you for raising this.

Yes, I believe I know how this is arising; it is coming from a missing tool response message. Are you able to share the complete log output?

I'll look into this and get back to you with a fix in the next few weeks at the latest.

@MorenoLabs
Copy link
Author

here is the log output file
20240706-193334_log.txt

@ballidev
Copy link

ballidev commented Aug 6, 2024

have had a similar problem using openAI gpt-4o

tried again with turbo and it has worked

samholt added a commit that referenced this issue Dec 26, 2024
…, and pytests, complete with refactor to make the codebase compliant.
@samholt
Copy link
Owner

samholt commented Dec 26, 2024

Hi @MorenoLabs @ballidev,

Thank you for your patience. I was able to replicate this bug, and I have now pushed a fix #(2ad39de) that resolves this bug. Thank you for reporting.

I have also improved the overall codebase to make L2MAC more stable,

Feel free to let me know if you have any further issues using it,

Best,
Sam

@samholt samholt closed this as completed Dec 26, 2024
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

3 participants