Initializermacpaw.openai 0.3.2OpenAI
init(role:content:name:)
ChatQuery.swift:222init?(role: Role, content: [UserMessageParam.Content.VisionContent], name: String? = nil)
init?(role: Role, content: [UserMessageParam.Content.VisionContent], name: String? = nil)
s6OpenAI9ChatQueryV0C22CompletionMessageParamO4role7content4nameAESgAE4RoleO_SayAE04UserfG0V7ContentO06VisionM0OGSSSgtcfc
What are these?4X8J7
import OpenAI
enum ChatCompletionMessageParam
struct ChatQuery
Creates a model response for the given chat conversation https://platform.openai.com/docs/guides/text-generation
enum Role
struct UserMessageParam
enum Content
enum VisionContent
@frozen struct String
A Unicode string value that is a collection of characters.
init(from decoder: Decoder) throws
init?(role: Role, content: String? = nil, name: String? = nil, toolCalls: [Self.AssistantMessageParam.ToolCallParam]? = nil, toolCallId: String? = nil)
var content: Self.UserMessageParam.Content? { get }
var name: String? { get }
var role: Role { get }
var toolCallId: String? { get }
var toolCalls: [Self.AssistantMessageParam.ToolCallParam]? { get }
func encode(to encoder: Encoder) throws
struct AssistantMessageParam
struct DeveloperMessageParam
struct SystemMessageParam
struct ToolMessageParam