Invalid parameter: messages with role 'tool' must be a response to a preceeding message with 'tool_calls'.
takefy-dev opened this issue · 9 comments
Hi i'm using the same exemple in the read.md and have this issue: Invalid parameter: messages with role 'tool' must be a response to a preceeding message with 'tool_calls'. I triple check and i don't see why this issue should appear since i use the exact same config and code as the exemple...
Thanks for reporting @takefy-dev, sounds like one of our examples is broken. Which example in particular were you using?
Thanks, we'll look into it
@takefy-dev could you try this example script instead? https://github.com/openai/openai-go/blob/main/examples/chat-completion-tool-calling/main.go
it says 404 no found ... could you give me the url please
oh sorry it looks like there's a github app breaking the links, I've edited it.
If it breaks again it's in this repo at examples/chat-completion-tool-calling/main.go
it works have you edited something?
Nice! The example in the readme wasn't entirely complete, it'll be updated in the next release to make that more clear and link to the full example scripts we have