Instance Propertymacpaw.openai 0.3.8OpenAI

toolCalls

The tool calls generated by the model, such as function calls.

ChatResult.swift:44
let toolCalls: [ChatQuery.ChatCompletionMessageParam.AssistantMessageParam.ToolCallParam]?

This field is declared not-optional in OpenAI API reference. But it seems that under some conditions it may not be present in a response. See https://github.com/MacPaw/OpenAI/issues/293