Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel function calling. #32

Open
M1KUS3Q opened this issue Apr 25, 2024 · 0 comments
Open

Parallel function calling. #32

M1KUS3Q opened this issue Apr 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@M1KUS3Q
Copy link

M1KUS3Q commented Apr 25, 2024

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

@M1KUS3Q M1KUS3Q added the enhancement New feature or request label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant