betalgo / openai

OpenAI .NET sdk - Azure OpenAI, ChatGPT, Whisper, and DALL-E
https://betalgo.github.io/openai/
MIT License
2.89k stars 524 forks source link

Allow customization of `parallel_tool_calls` request parameter for function calling #616

Closed dnflow closed 3 weeks ago

dnflow commented 2 months ago

I upgrade to the latest 8.6.1, from v7 . And instead of passing functions, I now have to pass in Tools. One of the benefits of tools, is that it allows parallel processing. But in my case I do not want parallel processing.

I would like to simply be able to set this value ex:

var request = new ChatCompletionCreateRequest() {
...
ParallelToolCalls = false,
...
}

the request to OpenAi should include { parallel_tool_calls: false }

More info from OpenAI https://platform.openai.com/docs/guides/function-calling/parallel-function-calling

kayhantolga commented 3 weeks ago

ready with 8.7.0