Converts a tool choice to the OpenAI format

  • Parameters

    • toolChoice: unknown

      a tool choice from an unknown LlmProvider

    Returns
        | null
        | "none"
        | "auto"
        | "required"
        | { function: { name: string }; type: "function" }

    the tool choice parsed to the OpenAI format