Closed jearthman closed 1 year ago
This seemed to have been caused by using onCompletion
rather than onFinal
with experimental_onFunctionCall
. I noticed that by DB was getting two sets of user and assistent messages per function call run. experimental_onFunctionCall
would work correctly a couple times but then is would start just returning the function_call JSON I pasted earlier. Maybe the data redundancy was causing strange behavior.
function_calling_bug_data.csv
I started using onFinal
which has corrected the message data and seems to have stopped the issue.
Description
When sending an initial request to openAI API expecting a function call I get a correct response for a function call, example below:
{"function_call": {"name": "getDefinitions", "arguments": "{\n"word": "holiday"\n}"}}
Rather than experimental_onFunctionCall block being run, onCompletion is run and the above response is sent to the client.
Code example
Additional context
No response