Skip to content

.Net: Function calling to call only one function at a time (parallel_tool_calls = false) #6636

Description

@dcostea

I'm using function calling to call a sequence of native functions. The exact sequence is important but the implemented behavior is the default behavior (if I'm not wrong) and this is implementing parallel_tool_calls = true.

I'm wondering if we can have this property in OpenAIPromptExecutionSettings class. Ideally something like this:

OpenAIPromptExecutionSettings
{
  ParallelToolCalls = false,
  ToolCallBehavior = ...
}

Activity

  1. changed the title [-]Function calling to support unparallel running of the calls (parallel_tool_calls = false)[/-] [+]Function calling to call only one function at a time (parallel_tool_calls = false)[/+] on Jun 9, 2024
  2. stephentoub commented on Jun 9, 2024

    @stephentoub
    Member

    the implemented behavior is the default behavior (if I'm not wrong) and this is implementing parallel_tool_calls = true.

    You're correct.

    cc: SergeyMenshykh, for clarity, this is referring to:
    https://platform.openai.com/docs/guides/function-calling
    "Parallel function calling can be disabled by passing parallel_tool_calls: false in the request. The model will only call one function at a time when parallel function calling is disabled."

  3. changed the title [-]Function calling to call only one function at a time (parallel_tool_calls = false)[/-] [+].Net: Function calling to call only one function at a time (parallel_tool_calls = false)[/+] on Jun 10, 2024
  4. macmanad commented on Jul 12, 2024

    @macmanad

    I have encountered an issue where it seems i am giving OpenAI a number of similar functions, and it chokes while trying to call them (500 response... mostly...). When curling, if i pass parallel_tool_calls = false, it responds fine with the first function call. I went looking for a way to pass this through SK, and found this ticket saying it's not available yet, so kept looking.

    I then came across Extension Data that at least as how i read the docco, indicates that it allows exactly what's wanted, arbitrary other kvps to be passed along to the llm.

    Extra properties that may be included in the serialized execution settings

    Except it doesn't.
    CreateChatCompletionsOptions does not copy it into the ChatCompletionsOptions, which are what gets passed into the serialization for the request. It only seems to actually be used to add diagnostic tags .

    Did i entirely misinterpret the docco?

  5. SergeyMenshykh commented on Aug 28, 2024

    @SergeyMenshykh
    Contributor
  6. moved this to Sprint: Planned in Semantic Kernelon Oct 31, 2024
  7. moved this from Sprint: Planned to Sprint: Done in Semantic Kernelon Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

.NETIssue or Pull requests regarding .NET codeai connectorAnything related to AI connectorsfunction_calling

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions