-
Notifications
You must be signed in to change notification settings - Fork 310
Labels
bugSomething isn't workingSomething isn't working
Description
A repo with the code having the issue at: https://github.com/pambrose/koog-issue
The issue can be found in src/main/kotlin/goap/ToolCallBaristaDemo.kt.
The Brew coffee action invokes ctx.subtask() near line 103, which is supposed to result in a
tool call to increase the temperature. When run, you can see the tool call being successfully made, but
the subtask fails in AIAgentFunctionalContext.sendToolResult() after appending the default finishTool
results and calling requestLLM().
The resulting error is:
Exception in thread "main" ai.koog.prompt.executor.clients.LLMClientException: Error from client: OpenAILLMClient
Error from client: OpenAILLMClient
Status code: 400
Error body:
{
"error": {
"message": "Invalid parameter: messages with role 'tool' must be a response to a preceeding message with 'tool_calls'.",
"type": "invalid_request_error",
"param": "messages.[6].role",
"code": null
}
}
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working