Instance Propertymacpaw.openai 0.3.3OpenAI
content
The contents of the assistant message. Required unless tool_calls is specified.
let content: String?
The contents of the assistant message. Required unless tool_calls is specified.
let content: String?
s6OpenAI9ChatQueryV0C22CompletionMessageParamO09AssistantfG0V7contentSSSgvp
What are these?1Q3S7
import OpenAI
struct AssistantMessageParam
struct ChatQuery
Creates a model response for the given chat conversation https://platform.openai.com/docs/guides/text-generation
enum ChatCompletionMessageParam
@frozen struct String
A Unicode string value that is a collection of characters.
init(content: String? = nil, name: String? = nil, toolCalls: [Self.ToolCallParam]? = nil)
init(from decoder: any Decoder) throws
let name: String?
The name of the author of this message. name
is required if role is function
, and it should be the name of the function whose response is in the content
. May contain a-z, A-Z, 0-9, and underscores, with a maximum length of 64 characters.
let role: Self.Role
/ The role of the messages author, in this case assistant.
let toolCalls: [Self.ToolCallParam]?
The tool calls generated by the model, such as function calls.
enum CodingKeys
struct ToolCallParam
typealias Role = ChatQuery.ChatCompletionMessageParam.Role