I am having an API call error:
AI_APICallError: Please ensure that function call turn comes immediately after a user turn or after a function
response turn.
Here are the Details:
Host environment: Local Linux Machine
OS: Linux Mint 21.3 x86_64
Shell: bash 5.1.16
Opencode Versoin: v 0.5.24
The issue Seems to be because of the API function itself, as seen in this link from the google community:
https://discuss.ai.google.dev/t/about-the-gemini-api-400-please-ensure-that-function-call-turns-come-immediately-after-a-user-turn-or-after-a-function-response-turn-error/46213
Thanks for the developers in advance!!!