Problem
OpenAI allows a single ChatCompletionMessage to contain multiple function calls, as is presented here:
https://platform.openai.com/docs/guides/function-calling/parallel-function-calling.
However, the current implementation only allows for a single Function Call to be present per response.
from source:
pub function_call: Option<ChatCompletionFunctionCall>
(https://github.com/rellfy/openai/blob/master/src/chat.rs#L60)
Solution
Given my lack of knowledge about the API in use, changing
pub function_call: Option<ChatCompletionFunctionCall>
to
pub function_call: Vec<ChatCompletionFunctionCall>
should resolve the problem, though I am not familiar with the function calling API enough to be sure that that would work
Alternatives
No response
Problem
OpenAI allows a single ChatCompletionMessage to contain multiple function calls, as is presented here:
https://platform.openai.com/docs/guides/function-calling/parallel-function-calling.
However, the current implementation only allows for a single Function Call to be present per response.
from source:
(https://github.com/rellfy/openai/blob/master/src/chat.rs#L60)
Solution
Given my lack of knowledge about the API in use, changing
to
should resolve the problem, though I am not familiar with the function calling API enough to be sure that that would work
Alternatives
No response