Skip to content

Parallel function calling. #32

@M1KUS3Q

Description

@M1KUS3Q

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions