Converts a tool call to the OpenAI format if possible

  • Parameters

    • maybeToolCall: unknown

      a tool call from an unknown LlmProvider

    Returns
        | null
        | {
            function: { arguments: string; name: string } & {
                [k: string]: unknown;
            };
            id: string;
            type: "function";
        }

    the tool call parsed to the OpenAI format