You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Am not sure whether this is a bug or a feature request.
Describe the bug
The normal way OpenAI tool calling is performed is [key information in brackets]:
We pass a prompt and a list of tools to OpenAI
Open AI responds with a tool call [with a tool call id]
The tool call is invoked by the application
We pass the result of the invocation as a chat content back to Open AI [With the ID]
Open AI passes back
However, if you invoke a tool directly (starting from step 3 above with a synthetic invocation constructed by the app: new FunctionCallContent(myFunction, myPlugin, null, myArguments)) there is no id from Open AI, so there is no id. When constructing the OpenAI tool call object this throws an error that the toolCallId can not be null.
To Reproduce
Steps to reproduce the behavior:
Invoke a tool call (FunctionCallContent) with a null id
Get the function result
pass to another chat completion service call
Get an argument exception
Expected behavior
I'd expect one of two things to happen:
[preferable] A better way to pass results of these synthetic methods back to OpenAI for processing
A clear error that either results from synthetic executions are not supported in the ToChatMessage
Platform
Language: C#
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
Bug: Invoking a tool call without ID then following up with another chat completion message throws null pointer
.Net: Bug: Invoking a tool call without ID then following up with another chat completion message throws null pointer
Jan 8, 2025
Am not sure whether this is a bug or a feature request.
Describe the bug
The normal way OpenAI tool calling is performed is [key information in brackets]:
However, if you invoke a tool directly (starting from step 3 above with a synthetic invocation constructed by the app:
new FunctionCallContent(myFunction, myPlugin, null, myArguments)
) there is no id from Open AI, so there is no id. When constructing the OpenAI tool call object this throws an error that the toolCallId can not be null.To Reproduce
Steps to reproduce the behavior:
Expected behavior
I'd expect one of two things to happen:
Platform
The text was updated successfully, but these errors were encountered: