Controls which (if any) function is called by the model.

  • "none" means the model will not call a function and instead generates a message.
  • "auto" means the model can pick between generating a message or calling a function.
  • Specifying a particular function via {"name": "my_function"} forces the model to call that function.

"none" is the default when no functions are present. "auto" is the default if functions are present.

Deprecated: function_call has been deprecated by OpenAI in favor of tool_choice.

interface ChatsFunctionCall {
    argument: string;
    name: string;
}

Properties

Properties

argument: string

Arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.

name: string

Name of the function to call.