OpenAI icon indicating copy to clipboard operation
OpenAI copied to clipboard

Chore: Add initializer for `FunctionCall`

Open thekoc opened this issue 11 months ago • 1 comments

What

Add a public initializer for ChatQuery.ChatCompletionMessageParam.ChatCompletionAssistantMessageParam.ChatCompletionMessageToolCallParam.FunctionCall, allowing it to be created programmatically.

Why

When converting chat history from other LLM services (such as Claude and Gemini) into the OpenAI format, it is necessary to create instances of the FunctionCall struct programmatically. However, the initializer for the FunctionCall struct is currently missing, making it impossible to create instances of this struct from code outside the package.

Affected Areas

Only ChatQuery.ChatCompletionMessageParam.ChatCompletionAssistantMessageParam.ChatCompletionMessageToolCallParam.FunctionCall

thekoc avatar Mar 24 '24 07:03 thekoc