Documentation
¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func GetRolesForBearerAuth(operation string) []string
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type BearerAuth
- type ChatCompletionChoice
- func (s *ChatCompletionChoice) Decode(d *jx.Decoder) error
- func (s *ChatCompletionChoice) Encode(e *jx.Encoder)
- func (s *ChatCompletionChoice) GetFinishReason() NilChatCompletionChoiceFinishReason
- func (s *ChatCompletionChoice) GetIndex() int
- func (s *ChatCompletionChoice) GetLogprobs() OptNilChatCompletionLogprobs
- func (s *ChatCompletionChoice) GetMessage() ChatCompletionMessage
- func (s *ChatCompletionChoice) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionChoice) SetFinishReason(val NilChatCompletionChoiceFinishReason)
- func (s *ChatCompletionChoice) SetIndex(val int)
- func (s *ChatCompletionChoice) SetLogprobs(val OptNilChatCompletionLogprobs)
- func (s *ChatCompletionChoice) SetMessage(val ChatCompletionMessage)
- func (s *ChatCompletionChoice) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionChoice) Validate() error
- type ChatCompletionChoiceFinishReason
- func (ChatCompletionChoiceFinishReason) AllValues() []ChatCompletionChoiceFinishReason
- func (s *ChatCompletionChoiceFinishReason) Decode(d *jx.Decoder) error
- func (s ChatCompletionChoiceFinishReason) Encode(e *jx.Encoder)
- func (s ChatCompletionChoiceFinishReason) MarshalJSON() ([]byte, error)
- func (s ChatCompletionChoiceFinishReason) MarshalText() ([]byte, error)
- func (s *ChatCompletionChoiceFinishReason) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionChoiceFinishReason) UnmarshalText(data []byte) error
- func (s ChatCompletionChoiceFinishReason) Validate() error
- type ChatCompletionContentPart
- func (s *ChatCompletionContentPart) Decode(d *jx.Decoder) error
- func (s *ChatCompletionContentPart) Encode(e *jx.Encoder)
- func (s *ChatCompletionContentPart) GetImageURL() OptChatCompletionContentPartImageURL
- func (s *ChatCompletionContentPart) GetText() OptString
- func (s *ChatCompletionContentPart) GetType() ChatCompletionContentPartType
- func (s *ChatCompletionContentPart) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionContentPart) SetImageURL(val OptChatCompletionContentPartImageURL)
- func (s *ChatCompletionContentPart) SetText(val OptString)
- func (s *ChatCompletionContentPart) SetType(val ChatCompletionContentPartType)
- func (s *ChatCompletionContentPart) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionContentPart) Validate() error
- type ChatCompletionContentPartImageURL
- func (s *ChatCompletionContentPartImageURL) Decode(d *jx.Decoder) error
- func (s *ChatCompletionContentPartImageURL) Encode(e *jx.Encoder)
- func (s *ChatCompletionContentPartImageURL) GetDetail() OptChatCompletionContentPartImageURLDetail
- func (s *ChatCompletionContentPartImageURL) GetURL() OptString
- func (s *ChatCompletionContentPartImageURL) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionContentPartImageURL) SetDetail(val OptChatCompletionContentPartImageURLDetail)
- func (s *ChatCompletionContentPartImageURL) SetURL(val OptString)
- func (s *ChatCompletionContentPartImageURL) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionContentPartImageURL) Validate() error
- type ChatCompletionContentPartImageURLDetail
- func (ChatCompletionContentPartImageURLDetail) AllValues() []ChatCompletionContentPartImageURLDetail
- func (s *ChatCompletionContentPartImageURLDetail) Decode(d *jx.Decoder) error
- func (s ChatCompletionContentPartImageURLDetail) Encode(e *jx.Encoder)
- func (s ChatCompletionContentPartImageURLDetail) MarshalJSON() ([]byte, error)
- func (s ChatCompletionContentPartImageURLDetail) MarshalText() ([]byte, error)
- func (s *ChatCompletionContentPartImageURLDetail) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionContentPartImageURLDetail) UnmarshalText(data []byte) error
- func (s ChatCompletionContentPartImageURLDetail) Validate() error
- type ChatCompletionContentPartType
- func (ChatCompletionContentPartType) AllValues() []ChatCompletionContentPartType
- func (s *ChatCompletionContentPartType) Decode(d *jx.Decoder) error
- func (s ChatCompletionContentPartType) Encode(e *jx.Encoder)
- func (s ChatCompletionContentPartType) MarshalJSON() ([]byte, error)
- func (s ChatCompletionContentPartType) MarshalText() ([]byte, error)
- func (s *ChatCompletionContentPartType) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionContentPartType) UnmarshalText(data []byte) error
- func (s ChatCompletionContentPartType) Validate() error
- type ChatCompletionLogprobs
- func (s *ChatCompletionLogprobs) Decode(d *jx.Decoder) error
- func (s *ChatCompletionLogprobs) Encode(e *jx.Encoder)
- func (s *ChatCompletionLogprobs) GetContent() OptNilChatCompletionTokenLogprobArray
- func (s *ChatCompletionLogprobs) GetRefusal() OptNilChatCompletionTokenLogprobArray
- func (s *ChatCompletionLogprobs) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionLogprobs) SetContent(val OptNilChatCompletionTokenLogprobArray)
- func (s *ChatCompletionLogprobs) SetRefusal(val OptNilChatCompletionTokenLogprobArray)
- func (s *ChatCompletionLogprobs) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionLogprobs) Validate() error
- type ChatCompletionMessage
- func (s *ChatCompletionMessage) Decode(d *jx.Decoder) error
- func (s *ChatCompletionMessage) Encode(e *jx.Encoder)
- func (s *ChatCompletionMessage) GetContent() NilString
- func (s *ChatCompletionMessage) GetFunctionCall() OptChatCompletionMessageFunctionCall
- func (s *ChatCompletionMessage) GetRefusal() OptNilString
- func (s *ChatCompletionMessage) GetRole() ChatCompletionMessageRole
- func (s *ChatCompletionMessage) GetToolCalls() []ChatCompletionMessageToolCall
- func (s *ChatCompletionMessage) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionMessage) SetContent(val NilString)
- func (s *ChatCompletionMessage) SetFunctionCall(val OptChatCompletionMessageFunctionCall)
- func (s *ChatCompletionMessage) SetRefusal(val OptNilString)
- func (s *ChatCompletionMessage) SetRole(val ChatCompletionMessageRole)
- func (s *ChatCompletionMessage) SetToolCalls(val []ChatCompletionMessageToolCall)
- func (s *ChatCompletionMessage) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionMessage) Validate() error
- type ChatCompletionMessageFunctionCalldeprecated
- func (s *ChatCompletionMessageFunctionCall) Decode(d *jx.Decoder) error
- func (s *ChatCompletionMessageFunctionCall) Encode(e *jx.Encoder)
- func (s *ChatCompletionMessageFunctionCall) GetArguments() OptString
- func (s *ChatCompletionMessageFunctionCall) GetName() OptString
- func (s *ChatCompletionMessageFunctionCall) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionMessageFunctionCall) SetArguments(val OptString)
- func (s *ChatCompletionMessageFunctionCall) SetName(val OptString)
- func (s *ChatCompletionMessageFunctionCall) UnmarshalJSON(data []byte) error
- type ChatCompletionMessageParam
- func (s *ChatCompletionMessageParam) Decode(d *jx.Decoder) error
- func (s *ChatCompletionMessageParam) Encode(e *jx.Encoder)
- func (s *ChatCompletionMessageParam) GetContent() OptNilChatCompletionMessageParamContent
- func (s *ChatCompletionMessageParam) GetName() OptString
- func (s *ChatCompletionMessageParam) GetRole() ChatCompletionMessageParamRole
- func (s *ChatCompletionMessageParam) GetToolCallID() OptString
- func (s *ChatCompletionMessageParam) GetToolCalls() []ChatCompletionMessageToolCall
- func (s *ChatCompletionMessageParam) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionMessageParam) SetContent(val OptNilChatCompletionMessageParamContent)
- func (s *ChatCompletionMessageParam) SetName(val OptString)
- func (s *ChatCompletionMessageParam) SetRole(val ChatCompletionMessageParamRole)
- func (s *ChatCompletionMessageParam) SetToolCallID(val OptString)
- func (s *ChatCompletionMessageParam) SetToolCalls(val []ChatCompletionMessageToolCall)
- func (s *ChatCompletionMessageParam) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionMessageParam) Validate() error
- type ChatCompletionMessageParamContent
- func (s *ChatCompletionMessageParamContent) Decode(d *jx.Decoder) error
- func (s ChatCompletionMessageParamContent) Encode(e *jx.Encoder)
- func (s ChatCompletionMessageParamContent) GetChatCompletionContentPartArray() (v []ChatCompletionContentPart, ok bool)
- func (s ChatCompletionMessageParamContent) GetString() (v string, ok bool)
- func (s ChatCompletionMessageParamContent) IsChatCompletionContentPartArray() bool
- func (s ChatCompletionMessageParamContent) IsString() bool
- func (s ChatCompletionMessageParamContent) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionMessageParamContent) SetChatCompletionContentPartArray(v []ChatCompletionContentPart)
- func (s *ChatCompletionMessageParamContent) SetString(v string)
- func (s *ChatCompletionMessageParamContent) UnmarshalJSON(data []byte) error
- func (s ChatCompletionMessageParamContent) Validate() error
- type ChatCompletionMessageParamContentType
- type ChatCompletionMessageParamRole
- func (ChatCompletionMessageParamRole) AllValues() []ChatCompletionMessageParamRole
- func (s *ChatCompletionMessageParamRole) Decode(d *jx.Decoder) error
- func (s ChatCompletionMessageParamRole) Encode(e *jx.Encoder)
- func (s ChatCompletionMessageParamRole) MarshalJSON() ([]byte, error)
- func (s ChatCompletionMessageParamRole) MarshalText() ([]byte, error)
- func (s *ChatCompletionMessageParamRole) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionMessageParamRole) UnmarshalText(data []byte) error
- func (s ChatCompletionMessageParamRole) Validate() error
- type ChatCompletionMessageRole
- func (ChatCompletionMessageRole) AllValues() []ChatCompletionMessageRole
- func (s *ChatCompletionMessageRole) Decode(d *jx.Decoder) error
- func (s ChatCompletionMessageRole) Encode(e *jx.Encoder)
- func (s ChatCompletionMessageRole) MarshalJSON() ([]byte, error)
- func (s ChatCompletionMessageRole) MarshalText() ([]byte, error)
- func (s *ChatCompletionMessageRole) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionMessageRole) UnmarshalText(data []byte) error
- func (s ChatCompletionMessageRole) Validate() error
- type ChatCompletionMessageToolCall
- func (s *ChatCompletionMessageToolCall) Decode(d *jx.Decoder) error
- func (s *ChatCompletionMessageToolCall) Encode(e *jx.Encoder)
- func (s *ChatCompletionMessageToolCall) GetFunction() ChatCompletionMessageToolCallFunction
- func (s *ChatCompletionMessageToolCall) GetID() string
- func (s *ChatCompletionMessageToolCall) GetType() ChatCompletionMessageToolCallType
- func (s *ChatCompletionMessageToolCall) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionMessageToolCall) SetFunction(val ChatCompletionMessageToolCallFunction)
- func (s *ChatCompletionMessageToolCall) SetID(val string)
- func (s *ChatCompletionMessageToolCall) SetType(val ChatCompletionMessageToolCallType)
- func (s *ChatCompletionMessageToolCall) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionMessageToolCall) Validate() error
- type ChatCompletionMessageToolCallFunction
- func (s *ChatCompletionMessageToolCallFunction) Decode(d *jx.Decoder) error
- func (s *ChatCompletionMessageToolCallFunction) Encode(e *jx.Encoder)
- func (s *ChatCompletionMessageToolCallFunction) GetArguments() string
- func (s *ChatCompletionMessageToolCallFunction) GetName() string
- func (s *ChatCompletionMessageToolCallFunction) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionMessageToolCallFunction) SetArguments(val string)
- func (s *ChatCompletionMessageToolCallFunction) SetName(val string)
- func (s *ChatCompletionMessageToolCallFunction) UnmarshalJSON(data []byte) error
- type ChatCompletionMessageToolCallType
- func (ChatCompletionMessageToolCallType) AllValues() []ChatCompletionMessageToolCallType
- func (s *ChatCompletionMessageToolCallType) Decode(d *jx.Decoder) error
- func (s ChatCompletionMessageToolCallType) Encode(e *jx.Encoder)
- func (s ChatCompletionMessageToolCallType) MarshalJSON() ([]byte, error)
- func (s ChatCompletionMessageToolCallType) MarshalText() ([]byte, error)
- func (s *ChatCompletionMessageToolCallType) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionMessageToolCallType) UnmarshalText(data []byte) error
- func (s ChatCompletionMessageToolCallType) Validate() error
- type ChatCompletionNamedToolChoice
- func (s *ChatCompletionNamedToolChoice) Decode(d *jx.Decoder) error
- func (s *ChatCompletionNamedToolChoice) Encode(e *jx.Encoder)
- func (s *ChatCompletionNamedToolChoice) GetFunction() ChatCompletionNamedToolChoiceFunction
- func (s *ChatCompletionNamedToolChoice) GetType() ChatCompletionNamedToolChoiceType
- func (s *ChatCompletionNamedToolChoice) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionNamedToolChoice) SetFunction(val ChatCompletionNamedToolChoiceFunction)
- func (s *ChatCompletionNamedToolChoice) SetType(val ChatCompletionNamedToolChoiceType)
- func (s *ChatCompletionNamedToolChoice) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionNamedToolChoice) Validate() error
- type ChatCompletionNamedToolChoiceFunction
- func (s *ChatCompletionNamedToolChoiceFunction) Decode(d *jx.Decoder) error
- func (s *ChatCompletionNamedToolChoiceFunction) Encode(e *jx.Encoder)
- func (s *ChatCompletionNamedToolChoiceFunction) GetName() string
- func (s *ChatCompletionNamedToolChoiceFunction) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionNamedToolChoiceFunction) SetName(val string)
- func (s *ChatCompletionNamedToolChoiceFunction) UnmarshalJSON(data []byte) error
- type ChatCompletionNamedToolChoiceType
- func (ChatCompletionNamedToolChoiceType) AllValues() []ChatCompletionNamedToolChoiceType
- func (s *ChatCompletionNamedToolChoiceType) Decode(d *jx.Decoder) error
- func (s ChatCompletionNamedToolChoiceType) Encode(e *jx.Encoder)
- func (s ChatCompletionNamedToolChoiceType) MarshalJSON() ([]byte, error)
- func (s ChatCompletionNamedToolChoiceType) MarshalText() ([]byte, error)
- func (s *ChatCompletionNamedToolChoiceType) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionNamedToolChoiceType) UnmarshalText(data []byte) error
- func (s ChatCompletionNamedToolChoiceType) Validate() error
- type ChatCompletionStreamOptions
- func (s *ChatCompletionStreamOptions) Decode(d *jx.Decoder) error
- func (s *ChatCompletionStreamOptions) Encode(e *jx.Encoder)
- func (s *ChatCompletionStreamOptions) GetIncludeUsage() OptBool
- func (s *ChatCompletionStreamOptions) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionStreamOptions) SetIncludeUsage(val OptBool)
- func (s *ChatCompletionStreamOptions) UnmarshalJSON(data []byte) error
- type ChatCompletionTokenLogprob
- func (s *ChatCompletionTokenLogprob) Decode(d *jx.Decoder) error
- func (s *ChatCompletionTokenLogprob) Encode(e *jx.Encoder)
- func (s *ChatCompletionTokenLogprob) GetBytes() []int
- func (s *ChatCompletionTokenLogprob) GetLogprob() float64
- func (s *ChatCompletionTokenLogprob) GetToken() string
- func (s *ChatCompletionTokenLogprob) GetTopLogprobs() []ChatCompletionTokenLogprobTopLogprobsItem
- func (s *ChatCompletionTokenLogprob) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionTokenLogprob) SetBytes(val []int)
- func (s *ChatCompletionTokenLogprob) SetLogprob(val float64)
- func (s *ChatCompletionTokenLogprob) SetToken(val string)
- func (s *ChatCompletionTokenLogprob) SetTopLogprobs(val []ChatCompletionTokenLogprobTopLogprobsItem)
- func (s *ChatCompletionTokenLogprob) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionTokenLogprob) Validate() error
- type ChatCompletionTokenLogprobTopLogprobsItem
- func (s *ChatCompletionTokenLogprobTopLogprobsItem) Decode(d *jx.Decoder) error
- func (s *ChatCompletionTokenLogprobTopLogprobsItem) Encode(e *jx.Encoder)
- func (s *ChatCompletionTokenLogprobTopLogprobsItem) GetBytes() []int
- func (s *ChatCompletionTokenLogprobTopLogprobsItem) GetLogprob() float64
- func (s *ChatCompletionTokenLogprobTopLogprobsItem) GetToken() string
- func (s *ChatCompletionTokenLogprobTopLogprobsItem) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionTokenLogprobTopLogprobsItem) SetBytes(val []int)
- func (s *ChatCompletionTokenLogprobTopLogprobsItem) SetLogprob(val float64)
- func (s *ChatCompletionTokenLogprobTopLogprobsItem) SetToken(val string)
- func (s *ChatCompletionTokenLogprobTopLogprobsItem) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionTokenLogprobTopLogprobsItem) Validate() error
- type ChatCompletionTool
- func (s *ChatCompletionTool) Decode(d *jx.Decoder) error
- func (s *ChatCompletionTool) Encode(e *jx.Encoder)
- func (s *ChatCompletionTool) GetFunction() FunctionObject
- func (s *ChatCompletionTool) GetType() ChatCompletionToolType
- func (s *ChatCompletionTool) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionTool) SetFunction(val FunctionObject)
- func (s *ChatCompletionTool) SetType(val ChatCompletionToolType)
- func (s *ChatCompletionTool) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionTool) Validate() error
- type ChatCompletionToolType
- func (ChatCompletionToolType) AllValues() []ChatCompletionToolType
- func (s *ChatCompletionToolType) Decode(d *jx.Decoder) error
- func (s ChatCompletionToolType) Encode(e *jx.Encoder)
- func (s ChatCompletionToolType) MarshalJSON() ([]byte, error)
- func (s ChatCompletionToolType) MarshalText() ([]byte, error)
- func (s *ChatCompletionToolType) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionToolType) UnmarshalText(data []byte) error
- func (s ChatCompletionToolType) Validate() error
- type Client
- func (c *Client) CreateChatCompletion(ctx context.Context, request *CreateChatCompletionRequest) (CreateChatCompletionRes, error)
- func (c *Client) ListModels(ctx context.Context) (*ListModelsResponse, error)
- func (c *Client) RetrieveModel(ctx context.Context, params RetrieveModelParams) (RetrieveModelRes, error)
- type ClientOption
- type CompletionUsage
- func (s *CompletionUsage) Decode(d *jx.Decoder) error
- func (s *CompletionUsage) Encode(e *jx.Encoder)
- func (s *CompletionUsage) GetCompletionTokens() int
- func (s *CompletionUsage) GetCompletionTokensDetails() OptCompletionUsageCompletionTokensDetails
- func (s *CompletionUsage) GetPromptTokens() int
- func (s *CompletionUsage) GetPromptTokensDetails() OptCompletionUsagePromptTokensDetails
- func (s *CompletionUsage) GetTotalTokens() int
- func (s *CompletionUsage) MarshalJSON() ([]byte, error)
- func (s *CompletionUsage) SetCompletionTokens(val int)
- func (s *CompletionUsage) SetCompletionTokensDetails(val OptCompletionUsageCompletionTokensDetails)
- func (s *CompletionUsage) SetPromptTokens(val int)
- func (s *CompletionUsage) SetPromptTokensDetails(val OptCompletionUsagePromptTokensDetails)
- func (s *CompletionUsage) SetTotalTokens(val int)
- func (s *CompletionUsage) UnmarshalJSON(data []byte) error
- type CompletionUsageCompletionTokensDetails
- func (s *CompletionUsageCompletionTokensDetails) Decode(d *jx.Decoder) error
- func (s *CompletionUsageCompletionTokensDetails) Encode(e *jx.Encoder)
- func (s *CompletionUsageCompletionTokensDetails) GetAcceptedPredictionTokens() OptInt
- func (s *CompletionUsageCompletionTokensDetails) GetAudioTokens() OptInt
- func (s *CompletionUsageCompletionTokensDetails) GetReasoningTokens() OptInt
- func (s *CompletionUsageCompletionTokensDetails) GetRejectedPredictionTokens() OptInt
- func (s *CompletionUsageCompletionTokensDetails) MarshalJSON() ([]byte, error)
- func (s *CompletionUsageCompletionTokensDetails) SetAcceptedPredictionTokens(val OptInt)
- func (s *CompletionUsageCompletionTokensDetails) SetAudioTokens(val OptInt)
- func (s *CompletionUsageCompletionTokensDetails) SetReasoningTokens(val OptInt)
- func (s *CompletionUsageCompletionTokensDetails) SetRejectedPredictionTokens(val OptInt)
- func (s *CompletionUsageCompletionTokensDetails) UnmarshalJSON(data []byte) error
- type CompletionUsagePromptTokensDetails
- func (s *CompletionUsagePromptTokensDetails) Decode(d *jx.Decoder) error
- func (s *CompletionUsagePromptTokensDetails) Encode(e *jx.Encoder)
- func (s *CompletionUsagePromptTokensDetails) GetAudioTokens() OptInt
- func (s *CompletionUsagePromptTokensDetails) GetCachedTokens() OptInt
- func (s *CompletionUsagePromptTokensDetails) MarshalJSON() ([]byte, error)
- func (s *CompletionUsagePromptTokensDetails) SetAudioTokens(val OptInt)
- func (s *CompletionUsagePromptTokensDetails) SetCachedTokens(val OptInt)
- func (s *CompletionUsagePromptTokensDetails) UnmarshalJSON(data []byte) error
- type CreateChatCompletionBadRequest
- type CreateChatCompletionInternalServerError
- func (s *CreateChatCompletionInternalServerError) Decode(d *jx.Decoder) error
- func (s *CreateChatCompletionInternalServerError) Encode(e *jx.Encoder)
- func (s *CreateChatCompletionInternalServerError) MarshalJSON() ([]byte, error)
- func (s *CreateChatCompletionInternalServerError) UnmarshalJSON(data []byte) error
- type CreateChatCompletionRequest
- func (s *CreateChatCompletionRequest) Decode(d *jx.Decoder) error
- func (s *CreateChatCompletionRequest) Encode(e *jx.Encoder)
- func (s *CreateChatCompletionRequest) GetFrequencyPenalty() OptNilFloat64
- func (s *CreateChatCompletionRequest) GetLogitBias() OptNilCreateChatCompletionRequestLogitBias
- func (s *CreateChatCompletionRequest) GetMaxCompletionTokens() OptNilInt
- func (s *CreateChatCompletionRequest) GetMaxTokens() OptNilInt
- func (s *CreateChatCompletionRequest) GetMessages() []ChatCompletionMessageParam
- func (s *CreateChatCompletionRequest) GetMetadata() OptNilCreateChatCompletionRequestMetadata
- func (s *CreateChatCompletionRequest) GetModel() string
- func (s *CreateChatCompletionRequest) GetN() OptNilInt
- func (s *CreateChatCompletionRequest) GetPresencePenalty() OptNilFloat64
- func (s *CreateChatCompletionRequest) GetResponseFormat() OptResponseFormat
- func (s *CreateChatCompletionRequest) GetSeed() OptNilInt
- func (s *CreateChatCompletionRequest) GetStop() OptNilCreateChatCompletionRequestStop
- func (s *CreateChatCompletionRequest) GetStream() OptNilBool
- func (s *CreateChatCompletionRequest) GetStreamOptions() OptNilChatCompletionStreamOptions
- func (s *CreateChatCompletionRequest) GetTemperature() OptNilFloat64
- func (s *CreateChatCompletionRequest) GetToolChoice() OptCreateChatCompletionRequestToolChoice
- func (s *CreateChatCompletionRequest) GetTools() []ChatCompletionTool
- func (s *CreateChatCompletionRequest) GetTopP() OptNilFloat64
- func (s *CreateChatCompletionRequest) GetUser() OptString
- func (s *CreateChatCompletionRequest) MarshalJSON() ([]byte, error)
- func (s *CreateChatCompletionRequest) SetFrequencyPenalty(val OptNilFloat64)
- func (s *CreateChatCompletionRequest) SetLogitBias(val OptNilCreateChatCompletionRequestLogitBias)
- func (s *CreateChatCompletionRequest) SetMaxCompletionTokens(val OptNilInt)
- func (s *CreateChatCompletionRequest) SetMaxTokens(val OptNilInt)
- func (s *CreateChatCompletionRequest) SetMessages(val []ChatCompletionMessageParam)
- func (s *CreateChatCompletionRequest) SetMetadata(val OptNilCreateChatCompletionRequestMetadata)
- func (s *CreateChatCompletionRequest) SetModel(val string)
- func (s *CreateChatCompletionRequest) SetN(val OptNilInt)
- func (s *CreateChatCompletionRequest) SetPresencePenalty(val OptNilFloat64)
- func (s *CreateChatCompletionRequest) SetResponseFormat(val OptResponseFormat)
- func (s *CreateChatCompletionRequest) SetSeed(val OptNilInt)
- func (s *CreateChatCompletionRequest) SetStop(val OptNilCreateChatCompletionRequestStop)
- func (s *CreateChatCompletionRequest) SetStream(val OptNilBool)
- func (s *CreateChatCompletionRequest) SetStreamOptions(val OptNilChatCompletionStreamOptions)
- func (s *CreateChatCompletionRequest) SetTemperature(val OptNilFloat64)
- func (s *CreateChatCompletionRequest) SetToolChoice(val OptCreateChatCompletionRequestToolChoice)
- func (s *CreateChatCompletionRequest) SetTools(val []ChatCompletionTool)
- func (s *CreateChatCompletionRequest) SetTopP(val OptNilFloat64)
- func (s *CreateChatCompletionRequest) SetUser(val OptString)
- func (s *CreateChatCompletionRequest) UnmarshalJSON(data []byte) error
- func (s *CreateChatCompletionRequest) Validate() error
- type CreateChatCompletionRequestLogitBias
- type CreateChatCompletionRequestMetadata
- type CreateChatCompletionRequestStop
- func (s *CreateChatCompletionRequestStop) Decode(d *jx.Decoder) error
- func (s CreateChatCompletionRequestStop) Encode(e *jx.Encoder)
- func (s CreateChatCompletionRequestStop) GetString() (v string, ok bool)
- func (s CreateChatCompletionRequestStop) GetStringArray() (v []string, ok bool)
- func (s CreateChatCompletionRequestStop) IsString() bool
- func (s CreateChatCompletionRequestStop) IsStringArray() bool
- func (s CreateChatCompletionRequestStop) MarshalJSON() ([]byte, error)
- func (s *CreateChatCompletionRequestStop) SetString(v string)
- func (s *CreateChatCompletionRequestStop) SetStringArray(v []string)
- func (s *CreateChatCompletionRequestStop) UnmarshalJSON(data []byte) error
- func (s CreateChatCompletionRequestStop) Validate() error
- type CreateChatCompletionRequestStopType
- type CreateChatCompletionRequestToolChoice
- func NewChatCompletionNamedToolChoiceCreateChatCompletionRequestToolChoice(v ChatCompletionNamedToolChoice) CreateChatCompletionRequestToolChoice
- func NewCreateChatCompletionRequestToolChoice0CreateChatCompletionRequestToolChoice(v CreateChatCompletionRequestToolChoice0) CreateChatCompletionRequestToolChoice
- func (s *CreateChatCompletionRequestToolChoice) Decode(d *jx.Decoder) error
- func (s CreateChatCompletionRequestToolChoice) Encode(e *jx.Encoder)
- func (s CreateChatCompletionRequestToolChoice) GetChatCompletionNamedToolChoice() (v ChatCompletionNamedToolChoice, ok bool)
- func (s CreateChatCompletionRequestToolChoice) GetCreateChatCompletionRequestToolChoice0() (v CreateChatCompletionRequestToolChoice0, ok bool)
- func (s CreateChatCompletionRequestToolChoice) IsChatCompletionNamedToolChoice() bool
- func (s CreateChatCompletionRequestToolChoice) IsCreateChatCompletionRequestToolChoice0() bool
- func (s CreateChatCompletionRequestToolChoice) MarshalJSON() ([]byte, error)
- func (s *CreateChatCompletionRequestToolChoice) SetChatCompletionNamedToolChoice(v ChatCompletionNamedToolChoice)
- func (s *CreateChatCompletionRequestToolChoice) SetCreateChatCompletionRequestToolChoice0(v CreateChatCompletionRequestToolChoice0)
- func (s *CreateChatCompletionRequestToolChoice) UnmarshalJSON(data []byte) error
- func (s CreateChatCompletionRequestToolChoice) Validate() error
- type CreateChatCompletionRequestToolChoice0
- func (CreateChatCompletionRequestToolChoice0) AllValues() []CreateChatCompletionRequestToolChoice0
- func (s *CreateChatCompletionRequestToolChoice0) Decode(d *jx.Decoder) error
- func (s CreateChatCompletionRequestToolChoice0) Encode(e *jx.Encoder)
- func (s CreateChatCompletionRequestToolChoice0) MarshalJSON() ([]byte, error)
- func (s CreateChatCompletionRequestToolChoice0) MarshalText() ([]byte, error)
- func (s *CreateChatCompletionRequestToolChoice0) UnmarshalJSON(data []byte) error
- func (s *CreateChatCompletionRequestToolChoice0) UnmarshalText(data []byte) error
- func (s CreateChatCompletionRequestToolChoice0) Validate() error
- type CreateChatCompletionRequestToolChoiceType
- type CreateChatCompletionRes
- type CreateChatCompletionResponse
- func (s *CreateChatCompletionResponse) Decode(d *jx.Decoder) error
- func (s *CreateChatCompletionResponse) Encode(e *jx.Encoder)
- func (s *CreateChatCompletionResponse) GetChoices() []ChatCompletionChoice
- func (s *CreateChatCompletionResponse) GetCreated() int
- func (s *CreateChatCompletionResponse) GetID() string
- func (s *CreateChatCompletionResponse) GetModel() string
- func (s *CreateChatCompletionResponse) GetObject() CreateChatCompletionResponseObject
- func (s *CreateChatCompletionResponse) GetServiceTier() OptNilString
- func (s *CreateChatCompletionResponse) GetSystemFingerprint() OptString
- func (s *CreateChatCompletionResponse) GetUsage() OptCompletionUsage
- func (s *CreateChatCompletionResponse) MarshalJSON() ([]byte, error)
- func (s *CreateChatCompletionResponse) SetChoices(val []ChatCompletionChoice)
- func (s *CreateChatCompletionResponse) SetCreated(val int)
- func (s *CreateChatCompletionResponse) SetID(val string)
- func (s *CreateChatCompletionResponse) SetModel(val string)
- func (s *CreateChatCompletionResponse) SetObject(val CreateChatCompletionResponseObject)
- func (s *CreateChatCompletionResponse) SetServiceTier(val OptNilString)
- func (s *CreateChatCompletionResponse) SetSystemFingerprint(val OptString)
- func (s *CreateChatCompletionResponse) SetUsage(val OptCompletionUsage)
- func (s *CreateChatCompletionResponse) UnmarshalJSON(data []byte) error
- func (s *CreateChatCompletionResponse) Validate() error
- type CreateChatCompletionResponseObject
- func (CreateChatCompletionResponseObject) AllValues() []CreateChatCompletionResponseObject
- func (s *CreateChatCompletionResponseObject) Decode(d *jx.Decoder) error
- func (s CreateChatCompletionResponseObject) Encode(e *jx.Encoder)
- func (s CreateChatCompletionResponseObject) MarshalJSON() ([]byte, error)
- func (s CreateChatCompletionResponseObject) MarshalText() ([]byte, error)
- func (s *CreateChatCompletionResponseObject) UnmarshalJSON(data []byte) error
- func (s *CreateChatCompletionResponseObject) UnmarshalText(data []byte) error
- func (s CreateChatCompletionResponseObject) Validate() error
- type CreateChatCompletionUnauthorized
- type ErrorHandler
- type ErrorResponse
- func (s *ErrorResponse) Decode(d *jx.Decoder) error
- func (s *ErrorResponse) Encode(e *jx.Encoder)
- func (s *ErrorResponse) GetError() ErrorResponseError
- func (s *ErrorResponse) MarshalJSON() ([]byte, error)
- func (s *ErrorResponse) SetError(val ErrorResponseError)
- func (s *ErrorResponse) UnmarshalJSON(data []byte) error
- type ErrorResponseError
- func (s *ErrorResponseError) Decode(d *jx.Decoder) error
- func (s *ErrorResponseError) Encode(e *jx.Encoder)
- func (s *ErrorResponseError) GetCode() OptNilString
- func (s *ErrorResponseError) GetMessage() string
- func (s *ErrorResponseError) GetParam() OptNilString
- func (s *ErrorResponseError) GetType() string
- func (s *ErrorResponseError) MarshalJSON() ([]byte, error)
- func (s *ErrorResponseError) SetCode(val OptNilString)
- func (s *ErrorResponseError) SetMessage(val string)
- func (s *ErrorResponseError) SetParam(val OptNilString)
- func (s *ErrorResponseError) SetType(val string)
- func (s *ErrorResponseError) UnmarshalJSON(data []byte) error
- type FunctionObject
- func (s *FunctionObject) Decode(d *jx.Decoder) error
- func (s *FunctionObject) Encode(e *jx.Encoder)
- func (s *FunctionObject) GetDescription() OptString
- func (s *FunctionObject) GetName() string
- func (s *FunctionObject) GetParameters() *FunctionObjectParameters
- func (s *FunctionObject) GetStrict() OptNilBool
- func (s *FunctionObject) MarshalJSON() ([]byte, error)
- func (s *FunctionObject) SetDescription(val OptString)
- func (s *FunctionObject) SetName(val string)
- func (s *FunctionObject) SetParameters(val *FunctionObjectParameters)
- func (s *FunctionObject) SetStrict(val OptNilBool)
- func (s *FunctionObject) UnmarshalJSON(data []byte) error
- type FunctionObjectParameters
- type Handler
- type Invoker
- type Labeler
- type ListModelsResponse
- func (s *ListModelsResponse) Decode(d *jx.Decoder) error
- func (s *ListModelsResponse) Encode(e *jx.Encoder)
- func (s *ListModelsResponse) GetData() []Model
- func (s *ListModelsResponse) GetObject() ListModelsResponseObject
- func (s *ListModelsResponse) MarshalJSON() ([]byte, error)
- func (s *ListModelsResponse) SetData(val []Model)
- func (s *ListModelsResponse) SetObject(val ListModelsResponseObject)
- func (s *ListModelsResponse) UnmarshalJSON(data []byte) error
- func (s *ListModelsResponse) Validate() error
- type ListModelsResponseObject
- func (ListModelsResponseObject) AllValues() []ListModelsResponseObject
- func (s *ListModelsResponseObject) Decode(d *jx.Decoder) error
- func (s ListModelsResponseObject) Encode(e *jx.Encoder)
- func (s ListModelsResponseObject) MarshalJSON() ([]byte, error)
- func (s ListModelsResponseObject) MarshalText() ([]byte, error)
- func (s *ListModelsResponseObject) UnmarshalJSON(data []byte) error
- func (s *ListModelsResponseObject) UnmarshalText(data []byte) error
- func (s ListModelsResponseObject) Validate() error
- type Middleware
- type Model
- func (s *Model) Decode(d *jx.Decoder) error
- func (s *Model) Encode(e *jx.Encoder)
- func (s *Model) GetCreated() int
- func (s *Model) GetID() string
- func (s *Model) GetObject() ModelObject
- func (s *Model) GetOwnedBy() string
- func (s *Model) MarshalJSON() ([]byte, error)
- func (s *Model) SetCreated(val int)
- func (s *Model) SetID(val string)
- func (s *Model) SetObject(val ModelObject)
- func (s *Model) SetOwnedBy(val string)
- func (s *Model) UnmarshalJSON(data []byte) error
- func (s *Model) Validate() error
- type ModelObject
- func (ModelObject) AllValues() []ModelObject
- func (s *ModelObject) Decode(d *jx.Decoder) error
- func (s ModelObject) Encode(e *jx.Encoder)
- func (s ModelObject) MarshalJSON() ([]byte, error)
- func (s ModelObject) MarshalText() ([]byte, error)
- func (s *ModelObject) UnmarshalJSON(data []byte) error
- func (s *ModelObject) UnmarshalText(data []byte) error
- func (s ModelObject) Validate() error
- type NilChatCompletionChoiceFinishReason
- func (o *NilChatCompletionChoiceFinishReason) Decode(d *jx.Decoder) error
- func (o NilChatCompletionChoiceFinishReason) Encode(e *jx.Encoder)
- func (o NilChatCompletionChoiceFinishReason) Get() (v ChatCompletionChoiceFinishReason, ok bool)
- func (o NilChatCompletionChoiceFinishReason) IsNull() bool
- func (s NilChatCompletionChoiceFinishReason) MarshalJSON() ([]byte, error)
- func (o NilChatCompletionChoiceFinishReason) Or(d ChatCompletionChoiceFinishReason) ChatCompletionChoiceFinishReason
- func (o *NilChatCompletionChoiceFinishReason) SetTo(v ChatCompletionChoiceFinishReason)
- func (o *NilChatCompletionChoiceFinishReason) SetToNull()
- func (s *NilChatCompletionChoiceFinishReason) UnmarshalJSON(data []byte) error
- type NilString
- func (o *NilString) Decode(d *jx.Decoder) error
- func (o NilString) Encode(e *jx.Encoder)
- func (o NilString) Get() (v string, ok bool)
- func (o NilString) IsNull() bool
- func (s NilString) MarshalJSON() ([]byte, error)
- func (o NilString) Or(d string) string
- func (o *NilString) SetTo(v string)
- func (o *NilString) SetToNull()
- func (s *NilString) UnmarshalJSON(data []byte) error
- type OperationName
- type OptBool
- func (o *OptBool) Decode(d *jx.Decoder) error
- func (o OptBool) Encode(e *jx.Encoder)
- func (o OptBool) Get() (v bool, ok bool)
- func (o OptBool) IsSet() bool
- func (s OptBool) MarshalJSON() ([]byte, error)
- func (o OptBool) Or(d bool) bool
- func (o *OptBool) Reset()
- func (o *OptBool) SetTo(v bool)
- func (s *OptBool) UnmarshalJSON(data []byte) error
- type OptChatCompletionContentPartImageURL
- func (o *OptChatCompletionContentPartImageURL) Decode(d *jx.Decoder) error
- func (o OptChatCompletionContentPartImageURL) Encode(e *jx.Encoder)
- func (o OptChatCompletionContentPartImageURL) Get() (v ChatCompletionContentPartImageURL, ok bool)
- func (o OptChatCompletionContentPartImageURL) IsSet() bool
- func (s OptChatCompletionContentPartImageURL) MarshalJSON() ([]byte, error)
- func (o OptChatCompletionContentPartImageURL) Or(d ChatCompletionContentPartImageURL) ChatCompletionContentPartImageURL
- func (o *OptChatCompletionContentPartImageURL) Reset()
- func (o *OptChatCompletionContentPartImageURL) SetTo(v ChatCompletionContentPartImageURL)
- func (s *OptChatCompletionContentPartImageURL) UnmarshalJSON(data []byte) error
- type OptChatCompletionContentPartImageURLDetail
- func (o *OptChatCompletionContentPartImageURLDetail) Decode(d *jx.Decoder) error
- func (o OptChatCompletionContentPartImageURLDetail) Encode(e *jx.Encoder)
- func (o OptChatCompletionContentPartImageURLDetail) Get() (v ChatCompletionContentPartImageURLDetail, ok bool)
- func (o OptChatCompletionContentPartImageURLDetail) IsSet() bool
- func (s OptChatCompletionContentPartImageURLDetail) MarshalJSON() ([]byte, error)
- func (o OptChatCompletionContentPartImageURLDetail) Or(d ChatCompletionContentPartImageURLDetail) ChatCompletionContentPartImageURLDetail
- func (o *OptChatCompletionContentPartImageURLDetail) Reset()
- func (o *OptChatCompletionContentPartImageURLDetail) SetTo(v ChatCompletionContentPartImageURLDetail)
- func (s *OptChatCompletionContentPartImageURLDetail) UnmarshalJSON(data []byte) error
- type OptChatCompletionMessageFunctionCall
- func (o *OptChatCompletionMessageFunctionCall) Decode(d *jx.Decoder) error
- func (o OptChatCompletionMessageFunctionCall) Encode(e *jx.Encoder)
- func (o OptChatCompletionMessageFunctionCall) Get() (v ChatCompletionMessageFunctionCall, ok bool)
- func (o OptChatCompletionMessageFunctionCall) IsSet() bool
- func (s OptChatCompletionMessageFunctionCall) MarshalJSON() ([]byte, error)
- func (o OptChatCompletionMessageFunctionCall) Or(d ChatCompletionMessageFunctionCall) ChatCompletionMessageFunctionCall
- func (o *OptChatCompletionMessageFunctionCall) Reset()
- func (o *OptChatCompletionMessageFunctionCall) SetTo(v ChatCompletionMessageFunctionCall)
- func (s *OptChatCompletionMessageFunctionCall) UnmarshalJSON(data []byte) error
- type OptCompletionUsage
- func (o *OptCompletionUsage) Decode(d *jx.Decoder) error
- func (o OptCompletionUsage) Encode(e *jx.Encoder)
- func (o OptCompletionUsage) Get() (v CompletionUsage, ok bool)
- func (o OptCompletionUsage) IsSet() bool
- func (s OptCompletionUsage) MarshalJSON() ([]byte, error)
- func (o OptCompletionUsage) Or(d CompletionUsage) CompletionUsage
- func (o *OptCompletionUsage) Reset()
- func (o *OptCompletionUsage) SetTo(v CompletionUsage)
- func (s *OptCompletionUsage) UnmarshalJSON(data []byte) error
- type OptCompletionUsageCompletionTokensDetails
- func (o *OptCompletionUsageCompletionTokensDetails) Decode(d *jx.Decoder) error
- func (o OptCompletionUsageCompletionTokensDetails) Encode(e *jx.Encoder)
- func (o OptCompletionUsageCompletionTokensDetails) Get() (v CompletionUsageCompletionTokensDetails, ok bool)
- func (o OptCompletionUsageCompletionTokensDetails) IsSet() bool
- func (s OptCompletionUsageCompletionTokensDetails) MarshalJSON() ([]byte, error)
- func (o OptCompletionUsageCompletionTokensDetails) Or(d CompletionUsageCompletionTokensDetails) CompletionUsageCompletionTokensDetails
- func (o *OptCompletionUsageCompletionTokensDetails) Reset()
- func (o *OptCompletionUsageCompletionTokensDetails) SetTo(v CompletionUsageCompletionTokensDetails)
- func (s *OptCompletionUsageCompletionTokensDetails) UnmarshalJSON(data []byte) error
- type OptCompletionUsagePromptTokensDetails
- func (o *OptCompletionUsagePromptTokensDetails) Decode(d *jx.Decoder) error
- func (o OptCompletionUsagePromptTokensDetails) Encode(e *jx.Encoder)
- func (o OptCompletionUsagePromptTokensDetails) Get() (v CompletionUsagePromptTokensDetails, ok bool)
- func (o OptCompletionUsagePromptTokensDetails) IsSet() bool
- func (s OptCompletionUsagePromptTokensDetails) MarshalJSON() ([]byte, error)
- func (o OptCompletionUsagePromptTokensDetails) Or(d CompletionUsagePromptTokensDetails) CompletionUsagePromptTokensDetails
- func (o *OptCompletionUsagePromptTokensDetails) Reset()
- func (o *OptCompletionUsagePromptTokensDetails) SetTo(v CompletionUsagePromptTokensDetails)
- func (s *OptCompletionUsagePromptTokensDetails) UnmarshalJSON(data []byte) error
- type OptCreateChatCompletionRequestToolChoice
- func (o *OptCreateChatCompletionRequestToolChoice) Decode(d *jx.Decoder) error
- func (o OptCreateChatCompletionRequestToolChoice) Encode(e *jx.Encoder)
- func (o OptCreateChatCompletionRequestToolChoice) Get() (v CreateChatCompletionRequestToolChoice, ok bool)
- func (o OptCreateChatCompletionRequestToolChoice) IsSet() bool
- func (s OptCreateChatCompletionRequestToolChoice) MarshalJSON() ([]byte, error)
- func (o OptCreateChatCompletionRequestToolChoice) Or(d CreateChatCompletionRequestToolChoice) CreateChatCompletionRequestToolChoice
- func (o *OptCreateChatCompletionRequestToolChoice) Reset()
- func (o *OptCreateChatCompletionRequestToolChoice) SetTo(v CreateChatCompletionRequestToolChoice)
- func (s *OptCreateChatCompletionRequestToolChoice) UnmarshalJSON(data []byte) error
- type OptInt
- func (o *OptInt) Decode(d *jx.Decoder) error
- func (o OptInt) Encode(e *jx.Encoder)
- func (o OptInt) Get() (v int, ok bool)
- func (o OptInt) IsSet() bool
- func (s OptInt) MarshalJSON() ([]byte, error)
- func (o OptInt) Or(d int) int
- func (o *OptInt) Reset()
- func (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptNilBool
- func (o *OptNilBool) Decode(d *jx.Decoder) error
- func (o OptNilBool) Encode(e *jx.Encoder)
- func (o OptNilBool) Get() (v bool, ok bool)
- func (o OptNilBool) IsEmpty() bool
- func (o OptNilBool) IsNull() bool
- func (o OptNilBool) IsSet() bool
- func (s OptNilBool) MarshalJSON() ([]byte, error)
- func (o OptNilBool) Or(d bool) bool
- func (o *OptNilBool) Reset()
- func (o *OptNilBool) SetTo(v bool)
- func (o *OptNilBool) SetToNull()
- func (s *OptNilBool) UnmarshalJSON(data []byte) error
- type OptNilChatCompletionLogprobs
- func (o *OptNilChatCompletionLogprobs) Decode(d *jx.Decoder) error
- func (o OptNilChatCompletionLogprobs) Encode(e *jx.Encoder)
- func (o OptNilChatCompletionLogprobs) Get() (v ChatCompletionLogprobs, ok bool)
- func (o OptNilChatCompletionLogprobs) IsEmpty() bool
- func (o OptNilChatCompletionLogprobs) IsNull() bool
- func (o OptNilChatCompletionLogprobs) IsSet() bool
- func (s OptNilChatCompletionLogprobs) MarshalJSON() ([]byte, error)
- func (o OptNilChatCompletionLogprobs) Or(d ChatCompletionLogprobs) ChatCompletionLogprobs
- func (o *OptNilChatCompletionLogprobs) Reset()
- func (o *OptNilChatCompletionLogprobs) SetTo(v ChatCompletionLogprobs)
- func (o *OptNilChatCompletionLogprobs) SetToNull()
- func (s *OptNilChatCompletionLogprobs) UnmarshalJSON(data []byte) error
- type OptNilChatCompletionMessageParamContent
- func (o *OptNilChatCompletionMessageParamContent) Decode(d *jx.Decoder) error
- func (o OptNilChatCompletionMessageParamContent) Encode(e *jx.Encoder)
- func (o OptNilChatCompletionMessageParamContent) Get() (v ChatCompletionMessageParamContent, ok bool)
- func (o OptNilChatCompletionMessageParamContent) IsEmpty() bool
- func (o OptNilChatCompletionMessageParamContent) IsNull() bool
- func (o OptNilChatCompletionMessageParamContent) IsSet() bool
- func (s OptNilChatCompletionMessageParamContent) MarshalJSON() ([]byte, error)
- func (o OptNilChatCompletionMessageParamContent) Or(d ChatCompletionMessageParamContent) ChatCompletionMessageParamContent
- func (o *OptNilChatCompletionMessageParamContent) Reset()
- func (o *OptNilChatCompletionMessageParamContent) SetTo(v ChatCompletionMessageParamContent)
- func (o *OptNilChatCompletionMessageParamContent) SetToNull()
- func (s *OptNilChatCompletionMessageParamContent) UnmarshalJSON(data []byte) error
- type OptNilChatCompletionStreamOptions
- func (o *OptNilChatCompletionStreamOptions) Decode(d *jx.Decoder) error
- func (o OptNilChatCompletionStreamOptions) Encode(e *jx.Encoder)
- func (o OptNilChatCompletionStreamOptions) Get() (v ChatCompletionStreamOptions, ok bool)
- func (o OptNilChatCompletionStreamOptions) IsEmpty() bool
- func (o OptNilChatCompletionStreamOptions) IsNull() bool
- func (o OptNilChatCompletionStreamOptions) IsSet() bool
- func (s OptNilChatCompletionStreamOptions) MarshalJSON() ([]byte, error)
- func (o OptNilChatCompletionStreamOptions) Or(d ChatCompletionStreamOptions) ChatCompletionStreamOptions
- func (o *OptNilChatCompletionStreamOptions) Reset()
- func (o *OptNilChatCompletionStreamOptions) SetTo(v ChatCompletionStreamOptions)
- func (o *OptNilChatCompletionStreamOptions) SetToNull()
- func (s *OptNilChatCompletionStreamOptions) UnmarshalJSON(data []byte) error
- type OptNilChatCompletionTokenLogprobArray
- func (o *OptNilChatCompletionTokenLogprobArray) Decode(d *jx.Decoder) error
- func (o OptNilChatCompletionTokenLogprobArray) Encode(e *jx.Encoder)
- func (o OptNilChatCompletionTokenLogprobArray) Get() (v []ChatCompletionTokenLogprob, ok bool)
- func (o OptNilChatCompletionTokenLogprobArray) IsEmpty() bool
- func (o OptNilChatCompletionTokenLogprobArray) IsNull() bool
- func (o OptNilChatCompletionTokenLogprobArray) IsSet() bool
- func (s OptNilChatCompletionTokenLogprobArray) MarshalJSON() ([]byte, error)
- func (o OptNilChatCompletionTokenLogprobArray) Or(d []ChatCompletionTokenLogprob) []ChatCompletionTokenLogprob
- func (o *OptNilChatCompletionTokenLogprobArray) Reset()
- func (o *OptNilChatCompletionTokenLogprobArray) SetTo(v []ChatCompletionTokenLogprob)
- func (o *OptNilChatCompletionTokenLogprobArray) SetToNull()
- func (s *OptNilChatCompletionTokenLogprobArray) UnmarshalJSON(data []byte) error
- type OptNilCreateChatCompletionRequestLogitBias
- func (o *OptNilCreateChatCompletionRequestLogitBias) Decode(d *jx.Decoder) error
- func (o OptNilCreateChatCompletionRequestLogitBias) Encode(e *jx.Encoder)
- func (o OptNilCreateChatCompletionRequestLogitBias) Get() (v CreateChatCompletionRequestLogitBias, ok bool)
- func (o OptNilCreateChatCompletionRequestLogitBias) IsEmpty() bool
- func (o OptNilCreateChatCompletionRequestLogitBias) IsNull() bool
- func (o OptNilCreateChatCompletionRequestLogitBias) IsSet() bool
- func (s OptNilCreateChatCompletionRequestLogitBias) MarshalJSON() ([]byte, error)
- func (o OptNilCreateChatCompletionRequestLogitBias) Or(d CreateChatCompletionRequestLogitBias) CreateChatCompletionRequestLogitBias
- func (o *OptNilCreateChatCompletionRequestLogitBias) Reset()
- func (o *OptNilCreateChatCompletionRequestLogitBias) SetTo(v CreateChatCompletionRequestLogitBias)
- func (o *OptNilCreateChatCompletionRequestLogitBias) SetToNull()
- func (s *OptNilCreateChatCompletionRequestLogitBias) UnmarshalJSON(data []byte) error
- type OptNilCreateChatCompletionRequestMetadata
- func (o *OptNilCreateChatCompletionRequestMetadata) Decode(d *jx.Decoder) error
- func (o OptNilCreateChatCompletionRequestMetadata) Encode(e *jx.Encoder)
- func (o OptNilCreateChatCompletionRequestMetadata) Get() (v CreateChatCompletionRequestMetadata, ok bool)
- func (o OptNilCreateChatCompletionRequestMetadata) IsEmpty() bool
- func (o OptNilCreateChatCompletionRequestMetadata) IsNull() bool
- func (o OptNilCreateChatCompletionRequestMetadata) IsSet() bool
- func (s OptNilCreateChatCompletionRequestMetadata) MarshalJSON() ([]byte, error)
- func (o OptNilCreateChatCompletionRequestMetadata) Or(d CreateChatCompletionRequestMetadata) CreateChatCompletionRequestMetadata
- func (o *OptNilCreateChatCompletionRequestMetadata) Reset()
- func (o *OptNilCreateChatCompletionRequestMetadata) SetTo(v CreateChatCompletionRequestMetadata)
- func (o *OptNilCreateChatCompletionRequestMetadata) SetToNull()
- func (s *OptNilCreateChatCompletionRequestMetadata) UnmarshalJSON(data []byte) error
- type OptNilCreateChatCompletionRequestStop
- func (o *OptNilCreateChatCompletionRequestStop) Decode(d *jx.Decoder) error
- func (o OptNilCreateChatCompletionRequestStop) Encode(e *jx.Encoder)
- func (o OptNilCreateChatCompletionRequestStop) Get() (v CreateChatCompletionRequestStop, ok bool)
- func (o OptNilCreateChatCompletionRequestStop) IsEmpty() bool
- func (o OptNilCreateChatCompletionRequestStop) IsNull() bool
- func (o OptNilCreateChatCompletionRequestStop) IsSet() bool
- func (s OptNilCreateChatCompletionRequestStop) MarshalJSON() ([]byte, error)
- func (o OptNilCreateChatCompletionRequestStop) Or(d CreateChatCompletionRequestStop) CreateChatCompletionRequestStop
- func (o *OptNilCreateChatCompletionRequestStop) Reset()
- func (o *OptNilCreateChatCompletionRequestStop) SetTo(v CreateChatCompletionRequestStop)
- func (o *OptNilCreateChatCompletionRequestStop) SetToNull()
- func (s *OptNilCreateChatCompletionRequestStop) UnmarshalJSON(data []byte) error
- type OptNilFloat64
- func (o *OptNilFloat64) Decode(d *jx.Decoder) error
- func (o OptNilFloat64) Encode(e *jx.Encoder)
- func (o OptNilFloat64) Get() (v float64, ok bool)
- func (o OptNilFloat64) IsEmpty() bool
- func (o OptNilFloat64) IsNull() bool
- func (o OptNilFloat64) IsSet() bool
- func (s OptNilFloat64) MarshalJSON() ([]byte, error)
- func (o OptNilFloat64) Or(d float64) float64
- func (o *OptNilFloat64) Reset()
- func (o *OptNilFloat64) SetTo(v float64)
- func (o *OptNilFloat64) SetToNull()
- func (s *OptNilFloat64) UnmarshalJSON(data []byte) error
- type OptNilInt
- func (o *OptNilInt) Decode(d *jx.Decoder) error
- func (o OptNilInt) Encode(e *jx.Encoder)
- func (o OptNilInt) Get() (v int, ok bool)
- func (o OptNilInt) IsEmpty() bool
- func (o OptNilInt) IsNull() bool
- func (o OptNilInt) IsSet() bool
- func (s OptNilInt) MarshalJSON() ([]byte, error)
- func (o OptNilInt) Or(d int) int
- func (o *OptNilInt) Reset()
- func (o *OptNilInt) SetTo(v int)
- func (o *OptNilInt) SetToNull()
- func (s *OptNilInt) UnmarshalJSON(data []byte) error
- type OptNilString
- func (o *OptNilString) Decode(d *jx.Decoder) error
- func (o OptNilString) Encode(e *jx.Encoder)
- func (o OptNilString) Get() (v string, ok bool)
- func (o OptNilString) IsEmpty() bool
- func (o OptNilString) IsNull() bool
- func (o OptNilString) IsSet() bool
- func (s OptNilString) MarshalJSON() ([]byte, error)
- func (o OptNilString) Or(d string) string
- func (o *OptNilString) Reset()
- func (o *OptNilString) SetTo(v string)
- func (o *OptNilString) SetToNull()
- func (s *OptNilString) UnmarshalJSON(data []byte) error
- type OptResponseFormat
- func (o *OptResponseFormat) Decode(d *jx.Decoder) error
- func (o OptResponseFormat) Encode(e *jx.Encoder)
- func (o OptResponseFormat) Get() (v ResponseFormat, ok bool)
- func (o OptResponseFormat) IsSet() bool
- func (s OptResponseFormat) MarshalJSON() ([]byte, error)
- func (o OptResponseFormat) Or(d ResponseFormat) ResponseFormat
- func (o *OptResponseFormat) Reset()
- func (o *OptResponseFormat) SetTo(v ResponseFormat)
- func (s *OptResponseFormat) UnmarshalJSON(data []byte) error
- type OptResponseFormatJSONSchema
- func (o *OptResponseFormatJSONSchema) Decode(d *jx.Decoder) error
- func (o OptResponseFormatJSONSchema) Encode(e *jx.Encoder)
- func (o OptResponseFormatJSONSchema) Get() (v ResponseFormatJSONSchema, ok bool)
- func (o OptResponseFormatJSONSchema) IsSet() bool
- func (s OptResponseFormatJSONSchema) MarshalJSON() ([]byte, error)
- func (o OptResponseFormatJSONSchema) Or(d ResponseFormatJSONSchema) ResponseFormatJSONSchema
- func (o *OptResponseFormatJSONSchema) Reset()
- func (o *OptResponseFormatJSONSchema) SetTo(v ResponseFormatJSONSchema)
- func (s *OptResponseFormatJSONSchema) UnmarshalJSON(data []byte) error
- type OptResponseFormatType
- func (o *OptResponseFormatType) Decode(d *jx.Decoder) error
- func (o OptResponseFormatType) Encode(e *jx.Encoder)
- func (o OptResponseFormatType) Get() (v ResponseFormatType, ok bool)
- func (o OptResponseFormatType) IsSet() bool
- func (s OptResponseFormatType) MarshalJSON() ([]byte, error)
- func (o OptResponseFormatType) Or(d ResponseFormatType) ResponseFormatType
- func (o *OptResponseFormatType) Reset()
- func (o *OptResponseFormatType) SetTo(v ResponseFormatType)
- func (s *OptResponseFormatType) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type Option
- type ResponseFormat
- func (s *ResponseFormat) Decode(d *jx.Decoder) error
- func (s *ResponseFormat) Encode(e *jx.Encoder)
- func (s *ResponseFormat) GetJSONSchema() OptResponseFormatJSONSchema
- func (s *ResponseFormat) GetType() OptResponseFormatType
- func (s *ResponseFormat) MarshalJSON() ([]byte, error)
- func (s *ResponseFormat) SetJSONSchema(val OptResponseFormatJSONSchema)
- func (s *ResponseFormat) SetType(val OptResponseFormatType)
- func (s *ResponseFormat) UnmarshalJSON(data []byte) error
- func (s *ResponseFormat) Validate() error
- type ResponseFormatJSONSchema
- func (s *ResponseFormatJSONSchema) Decode(d *jx.Decoder) error
- func (s *ResponseFormatJSONSchema) Encode(e *jx.Encoder)
- func (s *ResponseFormatJSONSchema) GetDescription() OptString
- func (s *ResponseFormatJSONSchema) GetName() OptString
- func (s *ResponseFormatJSONSchema) GetSchema() *ResponseFormatJSONSchemaSchema
- func (s *ResponseFormatJSONSchema) GetStrict() OptBool
- func (s *ResponseFormatJSONSchema) MarshalJSON() ([]byte, error)
- func (s *ResponseFormatJSONSchema) SetDescription(val OptString)
- func (s *ResponseFormatJSONSchema) SetName(val OptString)
- func (s *ResponseFormatJSONSchema) SetSchema(val *ResponseFormatJSONSchemaSchema)
- func (s *ResponseFormatJSONSchema) SetStrict(val OptBool)
- func (s *ResponseFormatJSONSchema) UnmarshalJSON(data []byte) error
- type ResponseFormatJSONSchemaSchema
- type ResponseFormatType
- func (ResponseFormatType) AllValues() []ResponseFormatType
- func (s *ResponseFormatType) Decode(d *jx.Decoder) error
- func (s ResponseFormatType) Encode(e *jx.Encoder)
- func (s ResponseFormatType) MarshalJSON() ([]byte, error)
- func (s ResponseFormatType) MarshalText() ([]byte, error)
- func (s *ResponseFormatType) UnmarshalJSON(data []byte) error
- func (s *ResponseFormatType) UnmarshalText(data []byte) error
- func (s ResponseFormatType) Validate() error
- type RetrieveModelParams
- type RetrieveModelRes
- type Route
- type SecurityHandler
- type SecuritySource
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type UnimplementedHandler
- func (UnimplementedHandler) CreateChatCompletion(ctx context.Context, req *CreateChatCompletionRequest) (r CreateChatCompletionRes, _ error)
- func (UnimplementedHandler) ListModels(ctx context.Context) (r *ListModelsResponse, _ error)
- func (UnimplementedHandler) RetrieveModel(ctx context.Context, params RetrieveModelParams) (r RetrieveModelRes, _ error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRolesForBearerAuth ¶
GetRolesForBearerAuth returns the required roles for the given operation.
This is useful for authorization scenarios where you need to know which roles are required for an operation.
Example:
requiredRoles := GetRolesForBearerAuth(AddPetOperation)
Returns nil if the operation has no role requirements or if the operation is unknown.
Types ¶
type BearerAuth ¶
func (*BearerAuth) GetRoles ¶
func (s *BearerAuth) GetRoles() []string
GetRoles returns the value of Roles.
func (*BearerAuth) GetToken ¶
func (s *BearerAuth) GetToken() string
GetToken returns the value of Token.
func (*BearerAuth) SetRoles ¶
func (s *BearerAuth) SetRoles(val []string)
SetRoles sets the value of Roles.
func (*BearerAuth) SetToken ¶
func (s *BearerAuth) SetToken(val string)
SetToken sets the value of Token.
type ChatCompletionChoice ¶
type ChatCompletionChoice struct {
// Index of this choice.
Index int `json:"index"`
Message ChatCompletionMessage `json:"message"`
// The reason the model stopped generating.
FinishReason NilChatCompletionChoiceFinishReason `json:"finish_reason"`
Logprobs OptNilChatCompletionLogprobs `json:"logprobs"`
}
Ref: #/components/schemas/ChatCompletionChoice
func (*ChatCompletionChoice) Decode ¶
func (s *ChatCompletionChoice) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionChoice from json.
func (*ChatCompletionChoice) Encode ¶
func (s *ChatCompletionChoice) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionChoice) GetFinishReason ¶
func (s *ChatCompletionChoice) GetFinishReason() NilChatCompletionChoiceFinishReason
GetFinishReason returns the value of FinishReason.
func (*ChatCompletionChoice) GetIndex ¶
func (s *ChatCompletionChoice) GetIndex() int
GetIndex returns the value of Index.
func (*ChatCompletionChoice) GetLogprobs ¶
func (s *ChatCompletionChoice) GetLogprobs() OptNilChatCompletionLogprobs
GetLogprobs returns the value of Logprobs.
func (*ChatCompletionChoice) GetMessage ¶
func (s *ChatCompletionChoice) GetMessage() ChatCompletionMessage
GetMessage returns the value of Message.
func (*ChatCompletionChoice) MarshalJSON ¶
func (s *ChatCompletionChoice) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionChoice) SetFinishReason ¶
func (s *ChatCompletionChoice) SetFinishReason(val NilChatCompletionChoiceFinishReason)
SetFinishReason sets the value of FinishReason.
func (*ChatCompletionChoice) SetIndex ¶
func (s *ChatCompletionChoice) SetIndex(val int)
SetIndex sets the value of Index.
func (*ChatCompletionChoice) SetLogprobs ¶
func (s *ChatCompletionChoice) SetLogprobs(val OptNilChatCompletionLogprobs)
SetLogprobs sets the value of Logprobs.
func (*ChatCompletionChoice) SetMessage ¶
func (s *ChatCompletionChoice) SetMessage(val ChatCompletionMessage)
SetMessage sets the value of Message.
func (*ChatCompletionChoice) UnmarshalJSON ¶
func (s *ChatCompletionChoice) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionChoice) Validate ¶
func (s *ChatCompletionChoice) Validate() error
type ChatCompletionChoiceFinishReason ¶
type ChatCompletionChoiceFinishReason string
The reason the model stopped generating.
const ( ChatCompletionChoiceFinishReasonStop ChatCompletionChoiceFinishReason = "stop" ChatCompletionChoiceFinishReasonLength ChatCompletionChoiceFinishReason = "length" ChatCompletionChoiceFinishReasonToolCalls ChatCompletionChoiceFinishReason = "tool_calls" ChatCompletionChoiceFinishReasonContentFilter ChatCompletionChoiceFinishReason = "content_filter" ChatCompletionChoiceFinishReasonFunctionCall ChatCompletionChoiceFinishReason = "function_call" )
func (ChatCompletionChoiceFinishReason) AllValues ¶
func (ChatCompletionChoiceFinishReason) AllValues() []ChatCompletionChoiceFinishReason
AllValues returns all ChatCompletionChoiceFinishReason values.
func (*ChatCompletionChoiceFinishReason) Decode ¶
func (s *ChatCompletionChoiceFinishReason) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionChoiceFinishReason from json.
func (ChatCompletionChoiceFinishReason) Encode ¶
func (s ChatCompletionChoiceFinishReason) Encode(e *jx.Encoder)
Encode encodes ChatCompletionChoiceFinishReason as json.
func (ChatCompletionChoiceFinishReason) MarshalJSON ¶
func (s ChatCompletionChoiceFinishReason) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ChatCompletionChoiceFinishReason) MarshalText ¶
func (s ChatCompletionChoiceFinishReason) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ChatCompletionChoiceFinishReason) UnmarshalJSON ¶
func (s *ChatCompletionChoiceFinishReason) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionChoiceFinishReason) UnmarshalText ¶
func (s *ChatCompletionChoiceFinishReason) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ChatCompletionChoiceFinishReason) Validate ¶
func (s ChatCompletionChoiceFinishReason) Validate() error
type ChatCompletionContentPart ¶
type ChatCompletionContentPart struct {
Type ChatCompletionContentPartType `json:"type"`
Text OptString `json:"text"`
ImageURL OptChatCompletionContentPartImageURL `json:"image_url"`
}
Ref: #/components/schemas/ChatCompletionContentPart
func (*ChatCompletionContentPart) Decode ¶
func (s *ChatCompletionContentPart) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionContentPart from json.
func (*ChatCompletionContentPart) Encode ¶
func (s *ChatCompletionContentPart) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionContentPart) GetImageURL ¶
func (s *ChatCompletionContentPart) GetImageURL() OptChatCompletionContentPartImageURL
GetImageURL returns the value of ImageURL.
func (*ChatCompletionContentPart) GetText ¶
func (s *ChatCompletionContentPart) GetText() OptString
GetText returns the value of Text.
func (*ChatCompletionContentPart) GetType ¶
func (s *ChatCompletionContentPart) GetType() ChatCompletionContentPartType
GetType returns the value of Type.
func (*ChatCompletionContentPart) MarshalJSON ¶
func (s *ChatCompletionContentPart) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionContentPart) SetImageURL ¶
func (s *ChatCompletionContentPart) SetImageURL(val OptChatCompletionContentPartImageURL)
SetImageURL sets the value of ImageURL.
func (*ChatCompletionContentPart) SetText ¶
func (s *ChatCompletionContentPart) SetText(val OptString)
SetText sets the value of Text.
func (*ChatCompletionContentPart) SetType ¶
func (s *ChatCompletionContentPart) SetType(val ChatCompletionContentPartType)
SetType sets the value of Type.
func (*ChatCompletionContentPart) UnmarshalJSON ¶
func (s *ChatCompletionContentPart) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionContentPart) Validate ¶
func (s *ChatCompletionContentPart) Validate() error
type ChatCompletionContentPartImageURL ¶
type ChatCompletionContentPartImageURL struct {
URL OptString `json:"url"`
Detail OptChatCompletionContentPartImageURLDetail `json:"detail"`
}
func (*ChatCompletionContentPartImageURL) Decode ¶
func (s *ChatCompletionContentPartImageURL) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionContentPartImageURL from json.
func (*ChatCompletionContentPartImageURL) Encode ¶
func (s *ChatCompletionContentPartImageURL) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionContentPartImageURL) GetDetail ¶
func (s *ChatCompletionContentPartImageURL) GetDetail() OptChatCompletionContentPartImageURLDetail
GetDetail returns the value of Detail.
func (*ChatCompletionContentPartImageURL) GetURL ¶
func (s *ChatCompletionContentPartImageURL) GetURL() OptString
GetURL returns the value of URL.
func (*ChatCompletionContentPartImageURL) MarshalJSON ¶
func (s *ChatCompletionContentPartImageURL) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionContentPartImageURL) SetDetail ¶
func (s *ChatCompletionContentPartImageURL) SetDetail(val OptChatCompletionContentPartImageURLDetail)
SetDetail sets the value of Detail.
func (*ChatCompletionContentPartImageURL) SetURL ¶
func (s *ChatCompletionContentPartImageURL) SetURL(val OptString)
SetURL sets the value of URL.
func (*ChatCompletionContentPartImageURL) UnmarshalJSON ¶
func (s *ChatCompletionContentPartImageURL) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionContentPartImageURL) Validate ¶
func (s *ChatCompletionContentPartImageURL) Validate() error
type ChatCompletionContentPartImageURLDetail ¶
type ChatCompletionContentPartImageURLDetail string
const ( ChatCompletionContentPartImageURLDetailAuto ChatCompletionContentPartImageURLDetail = "auto" ChatCompletionContentPartImageURLDetailLow ChatCompletionContentPartImageURLDetail = "low" ChatCompletionContentPartImageURLDetailHigh ChatCompletionContentPartImageURLDetail = "high" )
func (ChatCompletionContentPartImageURLDetail) AllValues ¶
func (ChatCompletionContentPartImageURLDetail) AllValues() []ChatCompletionContentPartImageURLDetail
AllValues returns all ChatCompletionContentPartImageURLDetail values.
func (*ChatCompletionContentPartImageURLDetail) Decode ¶
func (s *ChatCompletionContentPartImageURLDetail) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionContentPartImageURLDetail from json.
func (ChatCompletionContentPartImageURLDetail) Encode ¶
func (s ChatCompletionContentPartImageURLDetail) Encode(e *jx.Encoder)
Encode encodes ChatCompletionContentPartImageURLDetail as json.
func (ChatCompletionContentPartImageURLDetail) MarshalJSON ¶
func (s ChatCompletionContentPartImageURLDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ChatCompletionContentPartImageURLDetail) MarshalText ¶
func (s ChatCompletionContentPartImageURLDetail) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ChatCompletionContentPartImageURLDetail) UnmarshalJSON ¶
func (s *ChatCompletionContentPartImageURLDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionContentPartImageURLDetail) UnmarshalText ¶
func (s *ChatCompletionContentPartImageURLDetail) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ChatCompletionContentPartImageURLDetail) Validate ¶
func (s ChatCompletionContentPartImageURLDetail) Validate() error
type ChatCompletionContentPartType ¶
type ChatCompletionContentPartType string
const ( ChatCompletionContentPartTypeText ChatCompletionContentPartType = "text" ChatCompletionContentPartTypeImageURL ChatCompletionContentPartType = "image_url" )
func (ChatCompletionContentPartType) AllValues ¶
func (ChatCompletionContentPartType) AllValues() []ChatCompletionContentPartType
AllValues returns all ChatCompletionContentPartType values.
func (*ChatCompletionContentPartType) Decode ¶
func (s *ChatCompletionContentPartType) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionContentPartType from json.
func (ChatCompletionContentPartType) Encode ¶
func (s ChatCompletionContentPartType) Encode(e *jx.Encoder)
Encode encodes ChatCompletionContentPartType as json.
func (ChatCompletionContentPartType) MarshalJSON ¶
func (s ChatCompletionContentPartType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ChatCompletionContentPartType) MarshalText ¶
func (s ChatCompletionContentPartType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ChatCompletionContentPartType) UnmarshalJSON ¶
func (s *ChatCompletionContentPartType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionContentPartType) UnmarshalText ¶
func (s *ChatCompletionContentPartType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ChatCompletionContentPartType) Validate ¶
func (s ChatCompletionContentPartType) Validate() error
type ChatCompletionLogprobs ¶
type ChatCompletionLogprobs struct {
Content OptNilChatCompletionTokenLogprobArray `json:"content"`
Refusal OptNilChatCompletionTokenLogprobArray `json:"refusal"`
}
Ref: #/components/schemas/ChatCompletionLogprobs
func (*ChatCompletionLogprobs) Decode ¶
func (s *ChatCompletionLogprobs) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionLogprobs from json.
func (*ChatCompletionLogprobs) Encode ¶
func (s *ChatCompletionLogprobs) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionLogprobs) GetContent ¶
func (s *ChatCompletionLogprobs) GetContent() OptNilChatCompletionTokenLogprobArray
GetContent returns the value of Content.
func (*ChatCompletionLogprobs) GetRefusal ¶
func (s *ChatCompletionLogprobs) GetRefusal() OptNilChatCompletionTokenLogprobArray
GetRefusal returns the value of Refusal.
func (*ChatCompletionLogprobs) MarshalJSON ¶
func (s *ChatCompletionLogprobs) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionLogprobs) SetContent ¶
func (s *ChatCompletionLogprobs) SetContent(val OptNilChatCompletionTokenLogprobArray)
SetContent sets the value of Content.
func (*ChatCompletionLogprobs) SetRefusal ¶
func (s *ChatCompletionLogprobs) SetRefusal(val OptNilChatCompletionTokenLogprobArray)
SetRefusal sets the value of Refusal.
func (*ChatCompletionLogprobs) UnmarshalJSON ¶
func (s *ChatCompletionLogprobs) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionLogprobs) Validate ¶
func (s *ChatCompletionLogprobs) Validate() error
type ChatCompletionMessage ¶
type ChatCompletionMessage struct {
Role ChatCompletionMessageRole `json:"role"`
// The contents of the message.
Content NilString `json:"content"`
ToolCalls []ChatCompletionMessageToolCall `json:"tool_calls"`
// Deprecated: schema marks this property as deprecated.
FunctionCall OptChatCompletionMessageFunctionCall `json:"function_call"`
Refusal OptNilString `json:"refusal"`
}
Ref: #/components/schemas/ChatCompletionMessage
func (*ChatCompletionMessage) Decode ¶
func (s *ChatCompletionMessage) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionMessage from json.
func (*ChatCompletionMessage) Encode ¶
func (s *ChatCompletionMessage) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionMessage) GetContent ¶
func (s *ChatCompletionMessage) GetContent() NilString
GetContent returns the value of Content.
func (*ChatCompletionMessage) GetFunctionCall ¶
func (s *ChatCompletionMessage) GetFunctionCall() OptChatCompletionMessageFunctionCall
GetFunctionCall returns the value of FunctionCall.
func (*ChatCompletionMessage) GetRefusal ¶
func (s *ChatCompletionMessage) GetRefusal() OptNilString
GetRefusal returns the value of Refusal.
func (*ChatCompletionMessage) GetRole ¶
func (s *ChatCompletionMessage) GetRole() ChatCompletionMessageRole
GetRole returns the value of Role.
func (*ChatCompletionMessage) GetToolCalls ¶
func (s *ChatCompletionMessage) GetToolCalls() []ChatCompletionMessageToolCall
GetToolCalls returns the value of ToolCalls.
func (*ChatCompletionMessage) MarshalJSON ¶
func (s *ChatCompletionMessage) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionMessage) SetContent ¶
func (s *ChatCompletionMessage) SetContent(val NilString)
SetContent sets the value of Content.
func (*ChatCompletionMessage) SetFunctionCall ¶
func (s *ChatCompletionMessage) SetFunctionCall(val OptChatCompletionMessageFunctionCall)
SetFunctionCall sets the value of FunctionCall.
func (*ChatCompletionMessage) SetRefusal ¶
func (s *ChatCompletionMessage) SetRefusal(val OptNilString)
SetRefusal sets the value of Refusal.
func (*ChatCompletionMessage) SetRole ¶
func (s *ChatCompletionMessage) SetRole(val ChatCompletionMessageRole)
SetRole sets the value of Role.
func (*ChatCompletionMessage) SetToolCalls ¶
func (s *ChatCompletionMessage) SetToolCalls(val []ChatCompletionMessageToolCall)
SetToolCalls sets the value of ToolCalls.
func (*ChatCompletionMessage) UnmarshalJSON ¶
func (s *ChatCompletionMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionMessage) Validate ¶
func (s *ChatCompletionMessage) Validate() error
type ChatCompletionMessageFunctionCall
deprecated
type ChatCompletionMessageFunctionCall struct {
Name OptString `json:"name"`
Arguments OptString `json:"arguments"`
}
Deprecated: schema marks this type as deprecated.
func (*ChatCompletionMessageFunctionCall) Decode ¶
func (s *ChatCompletionMessageFunctionCall) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionMessageFunctionCall from json.
func (*ChatCompletionMessageFunctionCall) Encode ¶
func (s *ChatCompletionMessageFunctionCall) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionMessageFunctionCall) GetArguments ¶
func (s *ChatCompletionMessageFunctionCall) GetArguments() OptString
GetArguments returns the value of Arguments.
func (*ChatCompletionMessageFunctionCall) GetName ¶
func (s *ChatCompletionMessageFunctionCall) GetName() OptString
GetName returns the value of Name.
func (*ChatCompletionMessageFunctionCall) MarshalJSON ¶
func (s *ChatCompletionMessageFunctionCall) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionMessageFunctionCall) SetArguments ¶
func (s *ChatCompletionMessageFunctionCall) SetArguments(val OptString)
SetArguments sets the value of Arguments.
func (*ChatCompletionMessageFunctionCall) SetName ¶
func (s *ChatCompletionMessageFunctionCall) SetName(val OptString)
SetName sets the value of Name.
func (*ChatCompletionMessageFunctionCall) UnmarshalJSON ¶
func (s *ChatCompletionMessageFunctionCall) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ChatCompletionMessageParam ¶
type ChatCompletionMessageParam struct {
// The role of the message author.
Role ChatCompletionMessageParamRole `json:"role"`
// The contents of the message.
Content OptNilChatCompletionMessageParamContent `json:"content"`
// Optional name for the participant.
Name OptString `json:"name"`
// Tool calls generated by the model.
ToolCalls []ChatCompletionMessageToolCall `json:"tool_calls"`
// Tool call that this message is responding to.
ToolCallID OptString `json:"tool_call_id"`
}
Ref: #/components/schemas/ChatCompletionMessageParam
func (*ChatCompletionMessageParam) Decode ¶
func (s *ChatCompletionMessageParam) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionMessageParam from json.
func (*ChatCompletionMessageParam) Encode ¶
func (s *ChatCompletionMessageParam) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionMessageParam) GetContent ¶
func (s *ChatCompletionMessageParam) GetContent() OptNilChatCompletionMessageParamContent
GetContent returns the value of Content.
func (*ChatCompletionMessageParam) GetName ¶
func (s *ChatCompletionMessageParam) GetName() OptString
GetName returns the value of Name.
func (*ChatCompletionMessageParam) GetRole ¶
func (s *ChatCompletionMessageParam) GetRole() ChatCompletionMessageParamRole
GetRole returns the value of Role.
func (*ChatCompletionMessageParam) GetToolCallID ¶
func (s *ChatCompletionMessageParam) GetToolCallID() OptString
GetToolCallID returns the value of ToolCallID.
func (*ChatCompletionMessageParam) GetToolCalls ¶
func (s *ChatCompletionMessageParam) GetToolCalls() []ChatCompletionMessageToolCall
GetToolCalls returns the value of ToolCalls.
func (*ChatCompletionMessageParam) MarshalJSON ¶
func (s *ChatCompletionMessageParam) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionMessageParam) SetContent ¶
func (s *ChatCompletionMessageParam) SetContent(val OptNilChatCompletionMessageParamContent)
SetContent sets the value of Content.
func (*ChatCompletionMessageParam) SetName ¶
func (s *ChatCompletionMessageParam) SetName(val OptString)
SetName sets the value of Name.
func (*ChatCompletionMessageParam) SetRole ¶
func (s *ChatCompletionMessageParam) SetRole(val ChatCompletionMessageParamRole)
SetRole sets the value of Role.
func (*ChatCompletionMessageParam) SetToolCallID ¶
func (s *ChatCompletionMessageParam) SetToolCallID(val OptString)
SetToolCallID sets the value of ToolCallID.
func (*ChatCompletionMessageParam) SetToolCalls ¶
func (s *ChatCompletionMessageParam) SetToolCalls(val []ChatCompletionMessageToolCall)
SetToolCalls sets the value of ToolCalls.
func (*ChatCompletionMessageParam) UnmarshalJSON ¶
func (s *ChatCompletionMessageParam) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionMessageParam) Validate ¶
func (s *ChatCompletionMessageParam) Validate() error
type ChatCompletionMessageParamContent ¶
type ChatCompletionMessageParamContent struct {
// Type selects the active sum variant, switch on this field.
Type ChatCompletionMessageParamContentType
String string
ChatCompletionContentPartArray []ChatCompletionContentPart
}
The contents of the message. ChatCompletionMessageParamContent represents sum type.
func NewChatCompletionContentPartArrayChatCompletionMessageParamContent ¶
func NewChatCompletionContentPartArrayChatCompletionMessageParamContent(v []ChatCompletionContentPart) ChatCompletionMessageParamContent
NewChatCompletionContentPartArrayChatCompletionMessageParamContent returns new ChatCompletionMessageParamContent from []ChatCompletionContentPart.
func NewStringChatCompletionMessageParamContent ¶
func NewStringChatCompletionMessageParamContent(v string) ChatCompletionMessageParamContent
NewStringChatCompletionMessageParamContent returns new ChatCompletionMessageParamContent from string.
func (*ChatCompletionMessageParamContent) Decode ¶
func (s *ChatCompletionMessageParamContent) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionMessageParamContent from json.
func (ChatCompletionMessageParamContent) Encode ¶
func (s ChatCompletionMessageParamContent) Encode(e *jx.Encoder)
Encode encodes ChatCompletionMessageParamContent as json.
func (ChatCompletionMessageParamContent) GetChatCompletionContentPartArray ¶
func (s ChatCompletionMessageParamContent) GetChatCompletionContentPartArray() (v []ChatCompletionContentPart, ok bool)
GetChatCompletionContentPartArray returns []ChatCompletionContentPart and true boolean if ChatCompletionMessageParamContent is []ChatCompletionContentPart.
func (ChatCompletionMessageParamContent) GetString ¶
func (s ChatCompletionMessageParamContent) GetString() (v string, ok bool)
GetString returns string and true boolean if ChatCompletionMessageParamContent is string.
func (ChatCompletionMessageParamContent) IsChatCompletionContentPartArray ¶
func (s ChatCompletionMessageParamContent) IsChatCompletionContentPartArray() bool
IsChatCompletionContentPartArray reports whether ChatCompletionMessageParamContent is []ChatCompletionContentPart.
func (ChatCompletionMessageParamContent) IsString ¶
func (s ChatCompletionMessageParamContent) IsString() bool
IsString reports whether ChatCompletionMessageParamContent is string.
func (ChatCompletionMessageParamContent) MarshalJSON ¶
func (s ChatCompletionMessageParamContent) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionMessageParamContent) SetChatCompletionContentPartArray ¶
func (s *ChatCompletionMessageParamContent) SetChatCompletionContentPartArray(v []ChatCompletionContentPart)
SetChatCompletionContentPartArray sets ChatCompletionMessageParamContent to []ChatCompletionContentPart.
func (*ChatCompletionMessageParamContent) SetString ¶
func (s *ChatCompletionMessageParamContent) SetString(v string)
SetString sets ChatCompletionMessageParamContent to string.
func (*ChatCompletionMessageParamContent) UnmarshalJSON ¶
func (s *ChatCompletionMessageParamContent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ChatCompletionMessageParamContent) Validate ¶
func (s ChatCompletionMessageParamContent) Validate() error
type ChatCompletionMessageParamContentType ¶
type ChatCompletionMessageParamContentType string
ChatCompletionMessageParamContentType is oneOf type of ChatCompletionMessageParamContent.
const ( StringChatCompletionMessageParamContent ChatCompletionMessageParamContentType = "string" ChatCompletionContentPartArrayChatCompletionMessageParamContent ChatCompletionMessageParamContentType = "[]ChatCompletionContentPart" )
Possible values for ChatCompletionMessageParamContentType.
type ChatCompletionMessageParamRole ¶
type ChatCompletionMessageParamRole string
The role of the message author.
const ( ChatCompletionMessageParamRoleSystem ChatCompletionMessageParamRole = "system" ChatCompletionMessageParamRoleUser ChatCompletionMessageParamRole = "user" ChatCompletionMessageParamRoleAssistant ChatCompletionMessageParamRole = "assistant" ChatCompletionMessageParamRoleTool ChatCompletionMessageParamRole = "tool" )
func (ChatCompletionMessageParamRole) AllValues ¶
func (ChatCompletionMessageParamRole) AllValues() []ChatCompletionMessageParamRole
AllValues returns all ChatCompletionMessageParamRole values.
func (*ChatCompletionMessageParamRole) Decode ¶
func (s *ChatCompletionMessageParamRole) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionMessageParamRole from json.
func (ChatCompletionMessageParamRole) Encode ¶
func (s ChatCompletionMessageParamRole) Encode(e *jx.Encoder)
Encode encodes ChatCompletionMessageParamRole as json.
func (ChatCompletionMessageParamRole) MarshalJSON ¶
func (s ChatCompletionMessageParamRole) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ChatCompletionMessageParamRole) MarshalText ¶
func (s ChatCompletionMessageParamRole) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ChatCompletionMessageParamRole) UnmarshalJSON ¶
func (s *ChatCompletionMessageParamRole) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionMessageParamRole) UnmarshalText ¶
func (s *ChatCompletionMessageParamRole) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ChatCompletionMessageParamRole) Validate ¶
func (s ChatCompletionMessageParamRole) Validate() error
type ChatCompletionMessageRole ¶
type ChatCompletionMessageRole string
const (
ChatCompletionMessageRoleAssistant ChatCompletionMessageRole = "assistant"
)
func (ChatCompletionMessageRole) AllValues ¶
func (ChatCompletionMessageRole) AllValues() []ChatCompletionMessageRole
AllValues returns all ChatCompletionMessageRole values.
func (*ChatCompletionMessageRole) Decode ¶
func (s *ChatCompletionMessageRole) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionMessageRole from json.
func (ChatCompletionMessageRole) Encode ¶
func (s ChatCompletionMessageRole) Encode(e *jx.Encoder)
Encode encodes ChatCompletionMessageRole as json.
func (ChatCompletionMessageRole) MarshalJSON ¶
func (s ChatCompletionMessageRole) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ChatCompletionMessageRole) MarshalText ¶
func (s ChatCompletionMessageRole) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ChatCompletionMessageRole) UnmarshalJSON ¶
func (s *ChatCompletionMessageRole) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionMessageRole) UnmarshalText ¶
func (s *ChatCompletionMessageRole) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ChatCompletionMessageRole) Validate ¶
func (s ChatCompletionMessageRole) Validate() error
type ChatCompletionMessageToolCall ¶
type ChatCompletionMessageToolCall struct {
// The ID of the tool call.
ID string `json:"id"`
Type ChatCompletionMessageToolCallType `json:"type"`
Function ChatCompletionMessageToolCallFunction `json:"function"`
}
Ref: #/components/schemas/ChatCompletionMessageToolCall
func (*ChatCompletionMessageToolCall) Decode ¶
func (s *ChatCompletionMessageToolCall) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionMessageToolCall from json.
func (*ChatCompletionMessageToolCall) Encode ¶
func (s *ChatCompletionMessageToolCall) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionMessageToolCall) GetFunction ¶
func (s *ChatCompletionMessageToolCall) GetFunction() ChatCompletionMessageToolCallFunction
GetFunction returns the value of Function.
func (*ChatCompletionMessageToolCall) GetID ¶
func (s *ChatCompletionMessageToolCall) GetID() string
GetID returns the value of ID.
func (*ChatCompletionMessageToolCall) GetType ¶
func (s *ChatCompletionMessageToolCall) GetType() ChatCompletionMessageToolCallType
GetType returns the value of Type.
func (*ChatCompletionMessageToolCall) MarshalJSON ¶
func (s *ChatCompletionMessageToolCall) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionMessageToolCall) SetFunction ¶
func (s *ChatCompletionMessageToolCall) SetFunction(val ChatCompletionMessageToolCallFunction)
SetFunction sets the value of Function.
func (*ChatCompletionMessageToolCall) SetID ¶
func (s *ChatCompletionMessageToolCall) SetID(val string)
SetID sets the value of ID.
func (*ChatCompletionMessageToolCall) SetType ¶
func (s *ChatCompletionMessageToolCall) SetType(val ChatCompletionMessageToolCallType)
SetType sets the value of Type.
func (*ChatCompletionMessageToolCall) UnmarshalJSON ¶
func (s *ChatCompletionMessageToolCall) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionMessageToolCall) Validate ¶
func (s *ChatCompletionMessageToolCall) Validate() error
type ChatCompletionMessageToolCallFunction ¶
type ChatCompletionMessageToolCallFunction struct {
// The name of the function to call.
Name string `json:"name"`
// JSON arguments to pass to the function.
Arguments string `json:"arguments"`
}
func (*ChatCompletionMessageToolCallFunction) Decode ¶
func (s *ChatCompletionMessageToolCallFunction) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionMessageToolCallFunction from json.
func (*ChatCompletionMessageToolCallFunction) Encode ¶
func (s *ChatCompletionMessageToolCallFunction) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionMessageToolCallFunction) GetArguments ¶
func (s *ChatCompletionMessageToolCallFunction) GetArguments() string
GetArguments returns the value of Arguments.
func (*ChatCompletionMessageToolCallFunction) GetName ¶
func (s *ChatCompletionMessageToolCallFunction) GetName() string
GetName returns the value of Name.
func (*ChatCompletionMessageToolCallFunction) MarshalJSON ¶
func (s *ChatCompletionMessageToolCallFunction) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionMessageToolCallFunction) SetArguments ¶
func (s *ChatCompletionMessageToolCallFunction) SetArguments(val string)
SetArguments sets the value of Arguments.
func (*ChatCompletionMessageToolCallFunction) SetName ¶
func (s *ChatCompletionMessageToolCallFunction) SetName(val string)
SetName sets the value of Name.
func (*ChatCompletionMessageToolCallFunction) UnmarshalJSON ¶
func (s *ChatCompletionMessageToolCallFunction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ChatCompletionMessageToolCallType ¶
type ChatCompletionMessageToolCallType string
const (
ChatCompletionMessageToolCallTypeFunction ChatCompletionMessageToolCallType = "function"
)
func (ChatCompletionMessageToolCallType) AllValues ¶
func (ChatCompletionMessageToolCallType) AllValues() []ChatCompletionMessageToolCallType
AllValues returns all ChatCompletionMessageToolCallType values.
func (*ChatCompletionMessageToolCallType) Decode ¶
func (s *ChatCompletionMessageToolCallType) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionMessageToolCallType from json.
func (ChatCompletionMessageToolCallType) Encode ¶
func (s ChatCompletionMessageToolCallType) Encode(e *jx.Encoder)
Encode encodes ChatCompletionMessageToolCallType as json.
func (ChatCompletionMessageToolCallType) MarshalJSON ¶
func (s ChatCompletionMessageToolCallType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ChatCompletionMessageToolCallType) MarshalText ¶
func (s ChatCompletionMessageToolCallType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ChatCompletionMessageToolCallType) UnmarshalJSON ¶
func (s *ChatCompletionMessageToolCallType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionMessageToolCallType) UnmarshalText ¶
func (s *ChatCompletionMessageToolCallType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ChatCompletionMessageToolCallType) Validate ¶
func (s ChatCompletionMessageToolCallType) Validate() error
type ChatCompletionNamedToolChoice ¶
type ChatCompletionNamedToolChoice struct {
Type ChatCompletionNamedToolChoiceType `json:"type"`
Function ChatCompletionNamedToolChoiceFunction `json:"function"`
}
Ref: #/components/schemas/ChatCompletionNamedToolChoice
func (*ChatCompletionNamedToolChoice) Decode ¶
func (s *ChatCompletionNamedToolChoice) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionNamedToolChoice from json.
func (*ChatCompletionNamedToolChoice) Encode ¶
func (s *ChatCompletionNamedToolChoice) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionNamedToolChoice) GetFunction ¶
func (s *ChatCompletionNamedToolChoice) GetFunction() ChatCompletionNamedToolChoiceFunction
GetFunction returns the value of Function.
func (*ChatCompletionNamedToolChoice) GetType ¶
func (s *ChatCompletionNamedToolChoice) GetType() ChatCompletionNamedToolChoiceType
GetType returns the value of Type.
func (*ChatCompletionNamedToolChoice) MarshalJSON ¶
func (s *ChatCompletionNamedToolChoice) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionNamedToolChoice) SetFunction ¶
func (s *ChatCompletionNamedToolChoice) SetFunction(val ChatCompletionNamedToolChoiceFunction)
SetFunction sets the value of Function.
func (*ChatCompletionNamedToolChoice) SetType ¶
func (s *ChatCompletionNamedToolChoice) SetType(val ChatCompletionNamedToolChoiceType)
SetType sets the value of Type.
func (*ChatCompletionNamedToolChoice) UnmarshalJSON ¶
func (s *ChatCompletionNamedToolChoice) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionNamedToolChoice) Validate ¶
func (s *ChatCompletionNamedToolChoice) Validate() error
type ChatCompletionNamedToolChoiceFunction ¶
type ChatCompletionNamedToolChoiceFunction struct {
Name string `json:"name"`
}
func (*ChatCompletionNamedToolChoiceFunction) Decode ¶
func (s *ChatCompletionNamedToolChoiceFunction) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionNamedToolChoiceFunction from json.
func (*ChatCompletionNamedToolChoiceFunction) Encode ¶
func (s *ChatCompletionNamedToolChoiceFunction) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionNamedToolChoiceFunction) GetName ¶
func (s *ChatCompletionNamedToolChoiceFunction) GetName() string
GetName returns the value of Name.
func (*ChatCompletionNamedToolChoiceFunction) MarshalJSON ¶
func (s *ChatCompletionNamedToolChoiceFunction) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionNamedToolChoiceFunction) SetName ¶
func (s *ChatCompletionNamedToolChoiceFunction) SetName(val string)
SetName sets the value of Name.
func (*ChatCompletionNamedToolChoiceFunction) UnmarshalJSON ¶
func (s *ChatCompletionNamedToolChoiceFunction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ChatCompletionNamedToolChoiceType ¶
type ChatCompletionNamedToolChoiceType string
const (
ChatCompletionNamedToolChoiceTypeFunction ChatCompletionNamedToolChoiceType = "function"
)
func (ChatCompletionNamedToolChoiceType) AllValues ¶
func (ChatCompletionNamedToolChoiceType) AllValues() []ChatCompletionNamedToolChoiceType
AllValues returns all ChatCompletionNamedToolChoiceType values.
func (*ChatCompletionNamedToolChoiceType) Decode ¶
func (s *ChatCompletionNamedToolChoiceType) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionNamedToolChoiceType from json.
func (ChatCompletionNamedToolChoiceType) Encode ¶
func (s ChatCompletionNamedToolChoiceType) Encode(e *jx.Encoder)
Encode encodes ChatCompletionNamedToolChoiceType as json.
func (ChatCompletionNamedToolChoiceType) MarshalJSON ¶
func (s ChatCompletionNamedToolChoiceType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ChatCompletionNamedToolChoiceType) MarshalText ¶
func (s ChatCompletionNamedToolChoiceType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ChatCompletionNamedToolChoiceType) UnmarshalJSON ¶
func (s *ChatCompletionNamedToolChoiceType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionNamedToolChoiceType) UnmarshalText ¶
func (s *ChatCompletionNamedToolChoiceType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ChatCompletionNamedToolChoiceType) Validate ¶
func (s ChatCompletionNamedToolChoiceType) Validate() error
type ChatCompletionStreamOptions ¶
type ChatCompletionStreamOptions struct {
// If true, include usage information in the final chunk.
IncludeUsage OptBool `json:"include_usage"`
}
Ref: #/components/schemas/ChatCompletionStreamOptions
func (*ChatCompletionStreamOptions) Decode ¶
func (s *ChatCompletionStreamOptions) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionStreamOptions from json.
func (*ChatCompletionStreamOptions) Encode ¶
func (s *ChatCompletionStreamOptions) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionStreamOptions) GetIncludeUsage ¶
func (s *ChatCompletionStreamOptions) GetIncludeUsage() OptBool
GetIncludeUsage returns the value of IncludeUsage.
func (*ChatCompletionStreamOptions) MarshalJSON ¶
func (s *ChatCompletionStreamOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionStreamOptions) SetIncludeUsage ¶
func (s *ChatCompletionStreamOptions) SetIncludeUsage(val OptBool)
SetIncludeUsage sets the value of IncludeUsage.
func (*ChatCompletionStreamOptions) UnmarshalJSON ¶
func (s *ChatCompletionStreamOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ChatCompletionTokenLogprob ¶
type ChatCompletionTokenLogprob struct {
Token string `json:"token"`
Logprob float64 `json:"logprob"`
Bytes []int `json:"bytes"`
TopLogprobs []ChatCompletionTokenLogprobTopLogprobsItem `json:"top_logprobs"`
}
Ref: #/components/schemas/ChatCompletionTokenLogprob
func (*ChatCompletionTokenLogprob) Decode ¶
func (s *ChatCompletionTokenLogprob) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionTokenLogprob from json.
func (*ChatCompletionTokenLogprob) Encode ¶
func (s *ChatCompletionTokenLogprob) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionTokenLogprob) GetBytes ¶
func (s *ChatCompletionTokenLogprob) GetBytes() []int
GetBytes returns the value of Bytes.
func (*ChatCompletionTokenLogprob) GetLogprob ¶
func (s *ChatCompletionTokenLogprob) GetLogprob() float64
GetLogprob returns the value of Logprob.
func (*ChatCompletionTokenLogprob) GetToken ¶
func (s *ChatCompletionTokenLogprob) GetToken() string
GetToken returns the value of Token.
func (*ChatCompletionTokenLogprob) GetTopLogprobs ¶
func (s *ChatCompletionTokenLogprob) GetTopLogprobs() []ChatCompletionTokenLogprobTopLogprobsItem
GetTopLogprobs returns the value of TopLogprobs.
func (*ChatCompletionTokenLogprob) MarshalJSON ¶
func (s *ChatCompletionTokenLogprob) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionTokenLogprob) SetBytes ¶
func (s *ChatCompletionTokenLogprob) SetBytes(val []int)
SetBytes sets the value of Bytes.
func (*ChatCompletionTokenLogprob) SetLogprob ¶
func (s *ChatCompletionTokenLogprob) SetLogprob(val float64)
SetLogprob sets the value of Logprob.
func (*ChatCompletionTokenLogprob) SetToken ¶
func (s *ChatCompletionTokenLogprob) SetToken(val string)
SetToken sets the value of Token.
func (*ChatCompletionTokenLogprob) SetTopLogprobs ¶
func (s *ChatCompletionTokenLogprob) SetTopLogprobs(val []ChatCompletionTokenLogprobTopLogprobsItem)
SetTopLogprobs sets the value of TopLogprobs.
func (*ChatCompletionTokenLogprob) UnmarshalJSON ¶
func (s *ChatCompletionTokenLogprob) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionTokenLogprob) Validate ¶
func (s *ChatCompletionTokenLogprob) Validate() error
type ChatCompletionTokenLogprobTopLogprobsItem ¶
type ChatCompletionTokenLogprobTopLogprobsItem struct {
Token string `json:"token"`
Logprob float64 `json:"logprob"`
Bytes []int `json:"bytes"`
}
func (*ChatCompletionTokenLogprobTopLogprobsItem) Decode ¶
func (s *ChatCompletionTokenLogprobTopLogprobsItem) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionTokenLogprobTopLogprobsItem from json.
func (*ChatCompletionTokenLogprobTopLogprobsItem) Encode ¶
func (s *ChatCompletionTokenLogprobTopLogprobsItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionTokenLogprobTopLogprobsItem) GetBytes ¶
func (s *ChatCompletionTokenLogprobTopLogprobsItem) GetBytes() []int
GetBytes returns the value of Bytes.
func (*ChatCompletionTokenLogprobTopLogprobsItem) GetLogprob ¶
func (s *ChatCompletionTokenLogprobTopLogprobsItem) GetLogprob() float64
GetLogprob returns the value of Logprob.
func (*ChatCompletionTokenLogprobTopLogprobsItem) GetToken ¶
func (s *ChatCompletionTokenLogprobTopLogprobsItem) GetToken() string
GetToken returns the value of Token.
func (*ChatCompletionTokenLogprobTopLogprobsItem) MarshalJSON ¶
func (s *ChatCompletionTokenLogprobTopLogprobsItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionTokenLogprobTopLogprobsItem) SetBytes ¶
func (s *ChatCompletionTokenLogprobTopLogprobsItem) SetBytes(val []int)
SetBytes sets the value of Bytes.
func (*ChatCompletionTokenLogprobTopLogprobsItem) SetLogprob ¶
func (s *ChatCompletionTokenLogprobTopLogprobsItem) SetLogprob(val float64)
SetLogprob sets the value of Logprob.
func (*ChatCompletionTokenLogprobTopLogprobsItem) SetToken ¶
func (s *ChatCompletionTokenLogprobTopLogprobsItem) SetToken(val string)
SetToken sets the value of Token.
func (*ChatCompletionTokenLogprobTopLogprobsItem) UnmarshalJSON ¶
func (s *ChatCompletionTokenLogprobTopLogprobsItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionTokenLogprobTopLogprobsItem) Validate ¶
func (s *ChatCompletionTokenLogprobTopLogprobsItem) Validate() error
type ChatCompletionTool ¶
type ChatCompletionTool struct {
Type ChatCompletionToolType `json:"type"`
Function FunctionObject `json:"function"`
}
Ref: #/components/schemas/ChatCompletionTool
func (*ChatCompletionTool) Decode ¶
func (s *ChatCompletionTool) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionTool from json.
func (*ChatCompletionTool) Encode ¶
func (s *ChatCompletionTool) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionTool) GetFunction ¶
func (s *ChatCompletionTool) GetFunction() FunctionObject
GetFunction returns the value of Function.
func (*ChatCompletionTool) GetType ¶
func (s *ChatCompletionTool) GetType() ChatCompletionToolType
GetType returns the value of Type.
func (*ChatCompletionTool) MarshalJSON ¶
func (s *ChatCompletionTool) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionTool) SetFunction ¶
func (s *ChatCompletionTool) SetFunction(val FunctionObject)
SetFunction sets the value of Function.
func (*ChatCompletionTool) SetType ¶
func (s *ChatCompletionTool) SetType(val ChatCompletionToolType)
SetType sets the value of Type.
func (*ChatCompletionTool) UnmarshalJSON ¶
func (s *ChatCompletionTool) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionTool) Validate ¶
func (s *ChatCompletionTool) Validate() error
type ChatCompletionToolType ¶
type ChatCompletionToolType string
const (
ChatCompletionToolTypeFunction ChatCompletionToolType = "function"
)
func (ChatCompletionToolType) AllValues ¶
func (ChatCompletionToolType) AllValues() []ChatCompletionToolType
AllValues returns all ChatCompletionToolType values.
func (*ChatCompletionToolType) Decode ¶
func (s *ChatCompletionToolType) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionToolType from json.
func (ChatCompletionToolType) Encode ¶
func (s ChatCompletionToolType) Encode(e *jx.Encoder)
Encode encodes ChatCompletionToolType as json.
func (ChatCompletionToolType) MarshalJSON ¶
func (s ChatCompletionToolType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ChatCompletionToolType) MarshalText ¶
func (s ChatCompletionToolType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ChatCompletionToolType) UnmarshalJSON ¶
func (s *ChatCompletionToolType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionToolType) UnmarshalText ¶
func (s *ChatCompletionToolType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ChatCompletionToolType) Validate ¶
func (s ChatCompletionToolType) Validate() error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) CreateChatCompletion ¶
func (c *Client) CreateChatCompletion(ctx context.Context, request *CreateChatCompletionRequest) (CreateChatCompletionRes, error)
CreateChatCompletion invokes createChatCompletion operation.
Creates a model response for the given chat conversation.
POST /chat/completions
func (*Client) ListModels ¶
func (c *Client) ListModels(ctx context.Context) (*ListModelsResponse, error)
ListModels invokes listModels operation.
Lists the currently available models.
GET /models
func (*Client) RetrieveModel ¶
func (c *Client) RetrieveModel(ctx context.Context, params RetrieveModelParams) (RetrieveModelRes, error)
RetrieveModel invokes retrieveModel operation.
Retrieves a model instance.
GET /models/{model}
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type CompletionUsage ¶
type CompletionUsage struct {
// Number of tokens in the prompt.
PromptTokens int `json:"prompt_tokens"`
// Number of tokens in the completion.
CompletionTokens int `json:"completion_tokens"`
// Total number of tokens used.
TotalTokens int `json:"total_tokens"`
PromptTokensDetails OptCompletionUsagePromptTokensDetails `json:"prompt_tokens_details"`
CompletionTokensDetails OptCompletionUsageCompletionTokensDetails `json:"completion_tokens_details"`
}
Ref: #/components/schemas/CompletionUsage
func (*CompletionUsage) Decode ¶
func (s *CompletionUsage) Decode(d *jx.Decoder) error
Decode decodes CompletionUsage from json.
func (*CompletionUsage) Encode ¶
func (s *CompletionUsage) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CompletionUsage) GetCompletionTokens ¶
func (s *CompletionUsage) GetCompletionTokens() int
GetCompletionTokens returns the value of CompletionTokens.
func (*CompletionUsage) GetCompletionTokensDetails ¶
func (s *CompletionUsage) GetCompletionTokensDetails() OptCompletionUsageCompletionTokensDetails
GetCompletionTokensDetails returns the value of CompletionTokensDetails.
func (*CompletionUsage) GetPromptTokens ¶
func (s *CompletionUsage) GetPromptTokens() int
GetPromptTokens returns the value of PromptTokens.
func (*CompletionUsage) GetPromptTokensDetails ¶
func (s *CompletionUsage) GetPromptTokensDetails() OptCompletionUsagePromptTokensDetails
GetPromptTokensDetails returns the value of PromptTokensDetails.
func (*CompletionUsage) GetTotalTokens ¶
func (s *CompletionUsage) GetTotalTokens() int
GetTotalTokens returns the value of TotalTokens.
func (*CompletionUsage) MarshalJSON ¶
func (s *CompletionUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CompletionUsage) SetCompletionTokens ¶
func (s *CompletionUsage) SetCompletionTokens(val int)
SetCompletionTokens sets the value of CompletionTokens.
func (*CompletionUsage) SetCompletionTokensDetails ¶
func (s *CompletionUsage) SetCompletionTokensDetails(val OptCompletionUsageCompletionTokensDetails)
SetCompletionTokensDetails sets the value of CompletionTokensDetails.
func (*CompletionUsage) SetPromptTokens ¶
func (s *CompletionUsage) SetPromptTokens(val int)
SetPromptTokens sets the value of PromptTokens.
func (*CompletionUsage) SetPromptTokensDetails ¶
func (s *CompletionUsage) SetPromptTokensDetails(val OptCompletionUsagePromptTokensDetails)
SetPromptTokensDetails sets the value of PromptTokensDetails.
func (*CompletionUsage) SetTotalTokens ¶
func (s *CompletionUsage) SetTotalTokens(val int)
SetTotalTokens sets the value of TotalTokens.
func (*CompletionUsage) UnmarshalJSON ¶
func (s *CompletionUsage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CompletionUsageCompletionTokensDetails ¶
type CompletionUsageCompletionTokensDetails struct {
ReasoningTokens OptInt `json:"reasoning_tokens"`
AudioTokens OptInt `json:"audio_tokens"`
AcceptedPredictionTokens OptInt `json:"accepted_prediction_tokens"`
RejectedPredictionTokens OptInt `json:"rejected_prediction_tokens"`
}
func (*CompletionUsageCompletionTokensDetails) Decode ¶
func (s *CompletionUsageCompletionTokensDetails) Decode(d *jx.Decoder) error
Decode decodes CompletionUsageCompletionTokensDetails from json.
func (*CompletionUsageCompletionTokensDetails) Encode ¶
func (s *CompletionUsageCompletionTokensDetails) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CompletionUsageCompletionTokensDetails) GetAcceptedPredictionTokens ¶
func (s *CompletionUsageCompletionTokensDetails) GetAcceptedPredictionTokens() OptInt
GetAcceptedPredictionTokens returns the value of AcceptedPredictionTokens.
func (*CompletionUsageCompletionTokensDetails) GetAudioTokens ¶
func (s *CompletionUsageCompletionTokensDetails) GetAudioTokens() OptInt
GetAudioTokens returns the value of AudioTokens.
func (*CompletionUsageCompletionTokensDetails) GetReasoningTokens ¶
func (s *CompletionUsageCompletionTokensDetails) GetReasoningTokens() OptInt
GetReasoningTokens returns the value of ReasoningTokens.
func (*CompletionUsageCompletionTokensDetails) GetRejectedPredictionTokens ¶
func (s *CompletionUsageCompletionTokensDetails) GetRejectedPredictionTokens() OptInt
GetRejectedPredictionTokens returns the value of RejectedPredictionTokens.
func (*CompletionUsageCompletionTokensDetails) MarshalJSON ¶
func (s *CompletionUsageCompletionTokensDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CompletionUsageCompletionTokensDetails) SetAcceptedPredictionTokens ¶
func (s *CompletionUsageCompletionTokensDetails) SetAcceptedPredictionTokens(val OptInt)
SetAcceptedPredictionTokens sets the value of AcceptedPredictionTokens.
func (*CompletionUsageCompletionTokensDetails) SetAudioTokens ¶
func (s *CompletionUsageCompletionTokensDetails) SetAudioTokens(val OptInt)
SetAudioTokens sets the value of AudioTokens.
func (*CompletionUsageCompletionTokensDetails) SetReasoningTokens ¶
func (s *CompletionUsageCompletionTokensDetails) SetReasoningTokens(val OptInt)
SetReasoningTokens sets the value of ReasoningTokens.
func (*CompletionUsageCompletionTokensDetails) SetRejectedPredictionTokens ¶
func (s *CompletionUsageCompletionTokensDetails) SetRejectedPredictionTokens(val OptInt)
SetRejectedPredictionTokens sets the value of RejectedPredictionTokens.
func (*CompletionUsageCompletionTokensDetails) UnmarshalJSON ¶
func (s *CompletionUsageCompletionTokensDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CompletionUsagePromptTokensDetails ¶
type CompletionUsagePromptTokensDetails struct {
CachedTokens OptInt `json:"cached_tokens"`
AudioTokens OptInt `json:"audio_tokens"`
}
func (*CompletionUsagePromptTokensDetails) Decode ¶
func (s *CompletionUsagePromptTokensDetails) Decode(d *jx.Decoder) error
Decode decodes CompletionUsagePromptTokensDetails from json.
func (*CompletionUsagePromptTokensDetails) Encode ¶
func (s *CompletionUsagePromptTokensDetails) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CompletionUsagePromptTokensDetails) GetAudioTokens ¶
func (s *CompletionUsagePromptTokensDetails) GetAudioTokens() OptInt
GetAudioTokens returns the value of AudioTokens.
func (*CompletionUsagePromptTokensDetails) GetCachedTokens ¶
func (s *CompletionUsagePromptTokensDetails) GetCachedTokens() OptInt
GetCachedTokens returns the value of CachedTokens.
func (*CompletionUsagePromptTokensDetails) MarshalJSON ¶
func (s *CompletionUsagePromptTokensDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CompletionUsagePromptTokensDetails) SetAudioTokens ¶
func (s *CompletionUsagePromptTokensDetails) SetAudioTokens(val OptInt)
SetAudioTokens sets the value of AudioTokens.
func (*CompletionUsagePromptTokensDetails) SetCachedTokens ¶
func (s *CompletionUsagePromptTokensDetails) SetCachedTokens(val OptInt)
SetCachedTokens sets the value of CachedTokens.
func (*CompletionUsagePromptTokensDetails) UnmarshalJSON ¶
func (s *CompletionUsagePromptTokensDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateChatCompletionBadRequest ¶
type CreateChatCompletionBadRequest ErrorResponse
func (*CreateChatCompletionBadRequest) Decode ¶
func (s *CreateChatCompletionBadRequest) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionBadRequest from json.
func (*CreateChatCompletionBadRequest) Encode ¶
func (s *CreateChatCompletionBadRequest) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionBadRequest as json.
func (*CreateChatCompletionBadRequest) MarshalJSON ¶
func (s *CreateChatCompletionBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateChatCompletionBadRequest) UnmarshalJSON ¶
func (s *CreateChatCompletionBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateChatCompletionInternalServerError ¶
type CreateChatCompletionInternalServerError ErrorResponse
func (*CreateChatCompletionInternalServerError) Decode ¶
func (s *CreateChatCompletionInternalServerError) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionInternalServerError from json.
func (*CreateChatCompletionInternalServerError) Encode ¶
func (s *CreateChatCompletionInternalServerError) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionInternalServerError as json.
func (*CreateChatCompletionInternalServerError) MarshalJSON ¶
func (s *CreateChatCompletionInternalServerError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateChatCompletionInternalServerError) UnmarshalJSON ¶
func (s *CreateChatCompletionInternalServerError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateChatCompletionRequest ¶
type CreateChatCompletionRequest struct {
// ID of the model to use.
Model string `json:"model"`
// A list of messages comprising the conversation.
Messages []ChatCompletionMessageParam `json:"messages"`
// Sampling temperature between 0 and 2.
Temperature OptNilFloat64 `json:"temperature"`
// Nucleus sampling probability.
TopP OptNilFloat64 `json:"top_p"`
// Number of chat completion choices to generate.
N OptNilInt `json:"n"`
// If true, partial message deltas will be sent as SSE.
Stream OptNilBool `json:"stream"`
// Stop sequences.
Stop OptNilCreateChatCompletionRequestStop `json:"stop"`
// Maximum number of tokens to generate.
MaxTokens OptNilInt `json:"max_tokens"`
// Maximum number of tokens to generate (alternative to max_tokens).
MaxCompletionTokens OptNilInt `json:"max_completion_tokens"`
// Penalty for token presence.
PresencePenalty OptNilFloat64 `json:"presence_penalty"`
// Penalty for token frequency.
FrequencyPenalty OptNilFloat64 `json:"frequency_penalty"`
// Modify likelihood of specified tokens.
LogitBias OptNilCreateChatCompletionRequestLogitBias `json:"logit_bias"`
// Unique identifier for the end-user.
User OptString `json:"user"`
// List of tools the model may call.
Tools []ChatCompletionTool `json:"tools"`
// Controls which tool is called by the model.
ToolChoice OptCreateChatCompletionRequestToolChoice `json:"tool_choice"`
ResponseFormat OptResponseFormat `json:"response_format"`
// Seed for deterministic sampling.
Seed OptNilInt `json:"seed"`
StreamOptions OptNilChatCompletionStreamOptions `json:"stream_options"`
// Custom metadata.
Metadata OptNilCreateChatCompletionRequestMetadata `json:"metadata"`
}
Ref: #/components/schemas/CreateChatCompletionRequest
func (*CreateChatCompletionRequest) Decode ¶
func (s *CreateChatCompletionRequest) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequest from json.
func (*CreateChatCompletionRequest) Encode ¶
func (s *CreateChatCompletionRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateChatCompletionRequest) GetFrequencyPenalty ¶
func (s *CreateChatCompletionRequest) GetFrequencyPenalty() OptNilFloat64
GetFrequencyPenalty returns the value of FrequencyPenalty.
func (*CreateChatCompletionRequest) GetLogitBias ¶
func (s *CreateChatCompletionRequest) GetLogitBias() OptNilCreateChatCompletionRequestLogitBias
GetLogitBias returns the value of LogitBias.
func (*CreateChatCompletionRequest) GetMaxCompletionTokens ¶
func (s *CreateChatCompletionRequest) GetMaxCompletionTokens() OptNilInt
GetMaxCompletionTokens returns the value of MaxCompletionTokens.
func (*CreateChatCompletionRequest) GetMaxTokens ¶
func (s *CreateChatCompletionRequest) GetMaxTokens() OptNilInt
GetMaxTokens returns the value of MaxTokens.
func (*CreateChatCompletionRequest) GetMessages ¶
func (s *CreateChatCompletionRequest) GetMessages() []ChatCompletionMessageParam
GetMessages returns the value of Messages.
func (*CreateChatCompletionRequest) GetMetadata ¶
func (s *CreateChatCompletionRequest) GetMetadata() OptNilCreateChatCompletionRequestMetadata
GetMetadata returns the value of Metadata.
func (*CreateChatCompletionRequest) GetModel ¶
func (s *CreateChatCompletionRequest) GetModel() string
GetModel returns the value of Model.
func (*CreateChatCompletionRequest) GetN ¶
func (s *CreateChatCompletionRequest) GetN() OptNilInt
GetN returns the value of N.
func (*CreateChatCompletionRequest) GetPresencePenalty ¶
func (s *CreateChatCompletionRequest) GetPresencePenalty() OptNilFloat64
GetPresencePenalty returns the value of PresencePenalty.
func (*CreateChatCompletionRequest) GetResponseFormat ¶
func (s *CreateChatCompletionRequest) GetResponseFormat() OptResponseFormat
GetResponseFormat returns the value of ResponseFormat.
func (*CreateChatCompletionRequest) GetSeed ¶
func (s *CreateChatCompletionRequest) GetSeed() OptNilInt
GetSeed returns the value of Seed.
func (*CreateChatCompletionRequest) GetStop ¶
func (s *CreateChatCompletionRequest) GetStop() OptNilCreateChatCompletionRequestStop
GetStop returns the value of Stop.
func (*CreateChatCompletionRequest) GetStream ¶
func (s *CreateChatCompletionRequest) GetStream() OptNilBool
GetStream returns the value of Stream.
func (*CreateChatCompletionRequest) GetStreamOptions ¶
func (s *CreateChatCompletionRequest) GetStreamOptions() OptNilChatCompletionStreamOptions
GetStreamOptions returns the value of StreamOptions.
func (*CreateChatCompletionRequest) GetTemperature ¶
func (s *CreateChatCompletionRequest) GetTemperature() OptNilFloat64
GetTemperature returns the value of Temperature.
func (*CreateChatCompletionRequest) GetToolChoice ¶
func (s *CreateChatCompletionRequest) GetToolChoice() OptCreateChatCompletionRequestToolChoice
GetToolChoice returns the value of ToolChoice.
func (*CreateChatCompletionRequest) GetTools ¶
func (s *CreateChatCompletionRequest) GetTools() []ChatCompletionTool
GetTools returns the value of Tools.
func (*CreateChatCompletionRequest) GetTopP ¶
func (s *CreateChatCompletionRequest) GetTopP() OptNilFloat64
GetTopP returns the value of TopP.
func (*CreateChatCompletionRequest) GetUser ¶
func (s *CreateChatCompletionRequest) GetUser() OptString
GetUser returns the value of User.
func (*CreateChatCompletionRequest) MarshalJSON ¶
func (s *CreateChatCompletionRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateChatCompletionRequest) SetFrequencyPenalty ¶
func (s *CreateChatCompletionRequest) SetFrequencyPenalty(val OptNilFloat64)
SetFrequencyPenalty sets the value of FrequencyPenalty.
func (*CreateChatCompletionRequest) SetLogitBias ¶
func (s *CreateChatCompletionRequest) SetLogitBias(val OptNilCreateChatCompletionRequestLogitBias)
SetLogitBias sets the value of LogitBias.
func (*CreateChatCompletionRequest) SetMaxCompletionTokens ¶
func (s *CreateChatCompletionRequest) SetMaxCompletionTokens(val OptNilInt)
SetMaxCompletionTokens sets the value of MaxCompletionTokens.
func (*CreateChatCompletionRequest) SetMaxTokens ¶
func (s *CreateChatCompletionRequest) SetMaxTokens(val OptNilInt)
SetMaxTokens sets the value of MaxTokens.
func (*CreateChatCompletionRequest) SetMessages ¶
func (s *CreateChatCompletionRequest) SetMessages(val []ChatCompletionMessageParam)
SetMessages sets the value of Messages.
func (*CreateChatCompletionRequest) SetMetadata ¶
func (s *CreateChatCompletionRequest) SetMetadata(val OptNilCreateChatCompletionRequestMetadata)
SetMetadata sets the value of Metadata.
func (*CreateChatCompletionRequest) SetModel ¶
func (s *CreateChatCompletionRequest) SetModel(val string)
SetModel sets the value of Model.
func (*CreateChatCompletionRequest) SetN ¶
func (s *CreateChatCompletionRequest) SetN(val OptNilInt)
SetN sets the value of N.
func (*CreateChatCompletionRequest) SetPresencePenalty ¶
func (s *CreateChatCompletionRequest) SetPresencePenalty(val OptNilFloat64)
SetPresencePenalty sets the value of PresencePenalty.
func (*CreateChatCompletionRequest) SetResponseFormat ¶
func (s *CreateChatCompletionRequest) SetResponseFormat(val OptResponseFormat)
SetResponseFormat sets the value of ResponseFormat.
func (*CreateChatCompletionRequest) SetSeed ¶
func (s *CreateChatCompletionRequest) SetSeed(val OptNilInt)
SetSeed sets the value of Seed.
func (*CreateChatCompletionRequest) SetStop ¶
func (s *CreateChatCompletionRequest) SetStop(val OptNilCreateChatCompletionRequestStop)
SetStop sets the value of Stop.
func (*CreateChatCompletionRequest) SetStream ¶
func (s *CreateChatCompletionRequest) SetStream(val OptNilBool)
SetStream sets the value of Stream.
func (*CreateChatCompletionRequest) SetStreamOptions ¶
func (s *CreateChatCompletionRequest) SetStreamOptions(val OptNilChatCompletionStreamOptions)
SetStreamOptions sets the value of StreamOptions.
func (*CreateChatCompletionRequest) SetTemperature ¶
func (s *CreateChatCompletionRequest) SetTemperature(val OptNilFloat64)
SetTemperature sets the value of Temperature.
func (*CreateChatCompletionRequest) SetToolChoice ¶
func (s *CreateChatCompletionRequest) SetToolChoice(val OptCreateChatCompletionRequestToolChoice)
SetToolChoice sets the value of ToolChoice.
func (*CreateChatCompletionRequest) SetTools ¶
func (s *CreateChatCompletionRequest) SetTools(val []ChatCompletionTool)
SetTools sets the value of Tools.
func (*CreateChatCompletionRequest) SetTopP ¶
func (s *CreateChatCompletionRequest) SetTopP(val OptNilFloat64)
SetTopP sets the value of TopP.
func (*CreateChatCompletionRequest) SetUser ¶
func (s *CreateChatCompletionRequest) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateChatCompletionRequest) UnmarshalJSON ¶
func (s *CreateChatCompletionRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateChatCompletionRequest) Validate ¶
func (s *CreateChatCompletionRequest) Validate() error
type CreateChatCompletionRequestLogitBias ¶
Modify likelihood of specified tokens.
func (*CreateChatCompletionRequestLogitBias) Decode ¶
func (s *CreateChatCompletionRequestLogitBias) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequestLogitBias from json.
func (CreateChatCompletionRequestLogitBias) Encode ¶
func (s CreateChatCompletionRequestLogitBias) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (CreateChatCompletionRequestLogitBias) MarshalJSON ¶
func (s CreateChatCompletionRequestLogitBias) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateChatCompletionRequestLogitBias) UnmarshalJSON ¶
func (s *CreateChatCompletionRequestLogitBias) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateChatCompletionRequestMetadata ¶
Custom metadata.
func (*CreateChatCompletionRequestMetadata) Decode ¶
func (s *CreateChatCompletionRequestMetadata) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequestMetadata from json.
func (CreateChatCompletionRequestMetadata) Encode ¶
func (s CreateChatCompletionRequestMetadata) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (CreateChatCompletionRequestMetadata) MarshalJSON ¶
func (s CreateChatCompletionRequestMetadata) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateChatCompletionRequestMetadata) UnmarshalJSON ¶
func (s *CreateChatCompletionRequestMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateChatCompletionRequestStop ¶
type CreateChatCompletionRequestStop struct {
// Type selects the active sum variant, switch on this field.
Type CreateChatCompletionRequestStopType
String string
StringArray []string
}
Stop sequences. CreateChatCompletionRequestStop represents sum type.
func NewStringArrayCreateChatCompletionRequestStop ¶
func NewStringArrayCreateChatCompletionRequestStop(v []string) CreateChatCompletionRequestStop
NewStringArrayCreateChatCompletionRequestStop returns new CreateChatCompletionRequestStop from []string.
func NewStringCreateChatCompletionRequestStop ¶
func NewStringCreateChatCompletionRequestStop(v string) CreateChatCompletionRequestStop
NewStringCreateChatCompletionRequestStop returns new CreateChatCompletionRequestStop from string.
func (*CreateChatCompletionRequestStop) Decode ¶
func (s *CreateChatCompletionRequestStop) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequestStop from json.
func (CreateChatCompletionRequestStop) Encode ¶
func (s CreateChatCompletionRequestStop) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionRequestStop as json.
func (CreateChatCompletionRequestStop) GetString ¶
func (s CreateChatCompletionRequestStop) GetString() (v string, ok bool)
GetString returns string and true boolean if CreateChatCompletionRequestStop is string.
func (CreateChatCompletionRequestStop) GetStringArray ¶
func (s CreateChatCompletionRequestStop) GetStringArray() (v []string, ok bool)
GetStringArray returns []string and true boolean if CreateChatCompletionRequestStop is []string.
func (CreateChatCompletionRequestStop) IsString ¶
func (s CreateChatCompletionRequestStop) IsString() bool
IsString reports whether CreateChatCompletionRequestStop is string.
func (CreateChatCompletionRequestStop) IsStringArray ¶
func (s CreateChatCompletionRequestStop) IsStringArray() bool
IsStringArray reports whether CreateChatCompletionRequestStop is []string.
func (CreateChatCompletionRequestStop) MarshalJSON ¶
func (s CreateChatCompletionRequestStop) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateChatCompletionRequestStop) SetString ¶
func (s *CreateChatCompletionRequestStop) SetString(v string)
SetString sets CreateChatCompletionRequestStop to string.
func (*CreateChatCompletionRequestStop) SetStringArray ¶
func (s *CreateChatCompletionRequestStop) SetStringArray(v []string)
SetStringArray sets CreateChatCompletionRequestStop to []string.
func (*CreateChatCompletionRequestStop) UnmarshalJSON ¶
func (s *CreateChatCompletionRequestStop) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (CreateChatCompletionRequestStop) Validate ¶
func (s CreateChatCompletionRequestStop) Validate() error
type CreateChatCompletionRequestStopType ¶
type CreateChatCompletionRequestStopType string
CreateChatCompletionRequestStopType is oneOf type of CreateChatCompletionRequestStop.
const ( StringCreateChatCompletionRequestStop CreateChatCompletionRequestStopType = "string" StringArrayCreateChatCompletionRequestStop CreateChatCompletionRequestStopType = "[]string" )
Possible values for CreateChatCompletionRequestStopType.
type CreateChatCompletionRequestToolChoice ¶
type CreateChatCompletionRequestToolChoice struct {
// Type selects the active sum variant, switch on this field.
Type CreateChatCompletionRequestToolChoiceType
CreateChatCompletionRequestToolChoice0 CreateChatCompletionRequestToolChoice0
ChatCompletionNamedToolChoice ChatCompletionNamedToolChoice
}
Controls which tool is called by the model. CreateChatCompletionRequestToolChoice represents sum type.
func NewChatCompletionNamedToolChoiceCreateChatCompletionRequestToolChoice ¶
func NewChatCompletionNamedToolChoiceCreateChatCompletionRequestToolChoice(v ChatCompletionNamedToolChoice) CreateChatCompletionRequestToolChoice
NewChatCompletionNamedToolChoiceCreateChatCompletionRequestToolChoice returns new CreateChatCompletionRequestToolChoice from ChatCompletionNamedToolChoice.
func NewCreateChatCompletionRequestToolChoice0CreateChatCompletionRequestToolChoice ¶
func NewCreateChatCompletionRequestToolChoice0CreateChatCompletionRequestToolChoice(v CreateChatCompletionRequestToolChoice0) CreateChatCompletionRequestToolChoice
NewCreateChatCompletionRequestToolChoice0CreateChatCompletionRequestToolChoice returns new CreateChatCompletionRequestToolChoice from CreateChatCompletionRequestToolChoice0.
func (*CreateChatCompletionRequestToolChoice) Decode ¶
func (s *CreateChatCompletionRequestToolChoice) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequestToolChoice from json.
func (CreateChatCompletionRequestToolChoice) Encode ¶
func (s CreateChatCompletionRequestToolChoice) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionRequestToolChoice as json.
func (CreateChatCompletionRequestToolChoice) GetChatCompletionNamedToolChoice ¶
func (s CreateChatCompletionRequestToolChoice) GetChatCompletionNamedToolChoice() (v ChatCompletionNamedToolChoice, ok bool)
GetChatCompletionNamedToolChoice returns ChatCompletionNamedToolChoice and true boolean if CreateChatCompletionRequestToolChoice is ChatCompletionNamedToolChoice.
func (CreateChatCompletionRequestToolChoice) GetCreateChatCompletionRequestToolChoice0 ¶
func (s CreateChatCompletionRequestToolChoice) GetCreateChatCompletionRequestToolChoice0() (v CreateChatCompletionRequestToolChoice0, ok bool)
GetCreateChatCompletionRequestToolChoice0 returns CreateChatCompletionRequestToolChoice0 and true boolean if CreateChatCompletionRequestToolChoice is CreateChatCompletionRequestToolChoice0.
func (CreateChatCompletionRequestToolChoice) IsChatCompletionNamedToolChoice ¶
func (s CreateChatCompletionRequestToolChoice) IsChatCompletionNamedToolChoice() bool
IsChatCompletionNamedToolChoice reports whether CreateChatCompletionRequestToolChoice is ChatCompletionNamedToolChoice.
func (CreateChatCompletionRequestToolChoice) IsCreateChatCompletionRequestToolChoice0 ¶
func (s CreateChatCompletionRequestToolChoice) IsCreateChatCompletionRequestToolChoice0() bool
IsCreateChatCompletionRequestToolChoice0 reports whether CreateChatCompletionRequestToolChoice is CreateChatCompletionRequestToolChoice0.
func (CreateChatCompletionRequestToolChoice) MarshalJSON ¶
func (s CreateChatCompletionRequestToolChoice) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateChatCompletionRequestToolChoice) SetChatCompletionNamedToolChoice ¶
func (s *CreateChatCompletionRequestToolChoice) SetChatCompletionNamedToolChoice(v ChatCompletionNamedToolChoice)
SetChatCompletionNamedToolChoice sets CreateChatCompletionRequestToolChoice to ChatCompletionNamedToolChoice.
func (*CreateChatCompletionRequestToolChoice) SetCreateChatCompletionRequestToolChoice0 ¶
func (s *CreateChatCompletionRequestToolChoice) SetCreateChatCompletionRequestToolChoice0(v CreateChatCompletionRequestToolChoice0)
SetCreateChatCompletionRequestToolChoice0 sets CreateChatCompletionRequestToolChoice to CreateChatCompletionRequestToolChoice0.
func (*CreateChatCompletionRequestToolChoice) UnmarshalJSON ¶
func (s *CreateChatCompletionRequestToolChoice) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (CreateChatCompletionRequestToolChoice) Validate ¶
func (s CreateChatCompletionRequestToolChoice) Validate() error
type CreateChatCompletionRequestToolChoice0 ¶
type CreateChatCompletionRequestToolChoice0 string
const ( CreateChatCompletionRequestToolChoice0None CreateChatCompletionRequestToolChoice0 = "none" CreateChatCompletionRequestToolChoice0Auto CreateChatCompletionRequestToolChoice0 = "auto" CreateChatCompletionRequestToolChoice0Required CreateChatCompletionRequestToolChoice0 = "required" )
func (CreateChatCompletionRequestToolChoice0) AllValues ¶
func (CreateChatCompletionRequestToolChoice0) AllValues() []CreateChatCompletionRequestToolChoice0
AllValues returns all CreateChatCompletionRequestToolChoice0 values.
func (*CreateChatCompletionRequestToolChoice0) Decode ¶
func (s *CreateChatCompletionRequestToolChoice0) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequestToolChoice0 from json.
func (CreateChatCompletionRequestToolChoice0) Encode ¶
func (s CreateChatCompletionRequestToolChoice0) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionRequestToolChoice0 as json.
func (CreateChatCompletionRequestToolChoice0) MarshalJSON ¶
func (s CreateChatCompletionRequestToolChoice0) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (CreateChatCompletionRequestToolChoice0) MarshalText ¶
func (s CreateChatCompletionRequestToolChoice0) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateChatCompletionRequestToolChoice0) UnmarshalJSON ¶
func (s *CreateChatCompletionRequestToolChoice0) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateChatCompletionRequestToolChoice0) UnmarshalText ¶
func (s *CreateChatCompletionRequestToolChoice0) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateChatCompletionRequestToolChoice0) Validate ¶
func (s CreateChatCompletionRequestToolChoice0) Validate() error
type CreateChatCompletionRequestToolChoiceType ¶
type CreateChatCompletionRequestToolChoiceType string
CreateChatCompletionRequestToolChoiceType is oneOf type of CreateChatCompletionRequestToolChoice.
const ( CreateChatCompletionRequestToolChoice0CreateChatCompletionRequestToolChoice CreateChatCompletionRequestToolChoiceType = "CreateChatCompletionRequestToolChoice0" ChatCompletionNamedToolChoiceCreateChatCompletionRequestToolChoice CreateChatCompletionRequestToolChoiceType = "ChatCompletionNamedToolChoice" )
Possible values for CreateChatCompletionRequestToolChoiceType.
type CreateChatCompletionRes ¶
type CreateChatCompletionRes interface {
// contains filtered or unexported methods
}
type CreateChatCompletionResponse ¶
type CreateChatCompletionResponse struct {
// Unique identifier for the completion.
ID string `json:"id"`
Object CreateChatCompletionResponseObject `json:"object"`
// Unix timestamp of when the completion was created.
Created int `json:"created"`
// The model used for completion.
Model string `json:"model"`
Choices []ChatCompletionChoice `json:"choices"`
Usage OptCompletionUsage `json:"usage"`
// Backend configuration fingerprint.
SystemFingerprint OptString `json:"system_fingerprint"`
// The service tier used.
ServiceTier OptNilString `json:"service_tier"`
}
Ref: #/components/schemas/CreateChatCompletionResponse
func (*CreateChatCompletionResponse) Decode ¶
func (s *CreateChatCompletionResponse) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionResponse from json.
func (*CreateChatCompletionResponse) Encode ¶
func (s *CreateChatCompletionResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateChatCompletionResponse) GetChoices ¶
func (s *CreateChatCompletionResponse) GetChoices() []ChatCompletionChoice
GetChoices returns the value of Choices.
func (*CreateChatCompletionResponse) GetCreated ¶
func (s *CreateChatCompletionResponse) GetCreated() int
GetCreated returns the value of Created.
func (*CreateChatCompletionResponse) GetID ¶
func (s *CreateChatCompletionResponse) GetID() string
GetID returns the value of ID.
func (*CreateChatCompletionResponse) GetModel ¶
func (s *CreateChatCompletionResponse) GetModel() string
GetModel returns the value of Model.
func (*CreateChatCompletionResponse) GetObject ¶
func (s *CreateChatCompletionResponse) GetObject() CreateChatCompletionResponseObject
GetObject returns the value of Object.
func (*CreateChatCompletionResponse) GetServiceTier ¶
func (s *CreateChatCompletionResponse) GetServiceTier() OptNilString
GetServiceTier returns the value of ServiceTier.
func (*CreateChatCompletionResponse) GetSystemFingerprint ¶
func (s *CreateChatCompletionResponse) GetSystemFingerprint() OptString
GetSystemFingerprint returns the value of SystemFingerprint.
func (*CreateChatCompletionResponse) GetUsage ¶
func (s *CreateChatCompletionResponse) GetUsage() OptCompletionUsage
GetUsage returns the value of Usage.
func (*CreateChatCompletionResponse) MarshalJSON ¶
func (s *CreateChatCompletionResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateChatCompletionResponse) SetChoices ¶
func (s *CreateChatCompletionResponse) SetChoices(val []ChatCompletionChoice)
SetChoices sets the value of Choices.
func (*CreateChatCompletionResponse) SetCreated ¶
func (s *CreateChatCompletionResponse) SetCreated(val int)
SetCreated sets the value of Created.
func (*CreateChatCompletionResponse) SetID ¶
func (s *CreateChatCompletionResponse) SetID(val string)
SetID sets the value of ID.
func (*CreateChatCompletionResponse) SetModel ¶
func (s *CreateChatCompletionResponse) SetModel(val string)
SetModel sets the value of Model.
func (*CreateChatCompletionResponse) SetObject ¶
func (s *CreateChatCompletionResponse) SetObject(val CreateChatCompletionResponseObject)
SetObject sets the value of Object.
func (*CreateChatCompletionResponse) SetServiceTier ¶
func (s *CreateChatCompletionResponse) SetServiceTier(val OptNilString)
SetServiceTier sets the value of ServiceTier.
func (*CreateChatCompletionResponse) SetSystemFingerprint ¶
func (s *CreateChatCompletionResponse) SetSystemFingerprint(val OptString)
SetSystemFingerprint sets the value of SystemFingerprint.
func (*CreateChatCompletionResponse) SetUsage ¶
func (s *CreateChatCompletionResponse) SetUsage(val OptCompletionUsage)
SetUsage sets the value of Usage.
func (*CreateChatCompletionResponse) UnmarshalJSON ¶
func (s *CreateChatCompletionResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateChatCompletionResponse) Validate ¶
func (s *CreateChatCompletionResponse) Validate() error
type CreateChatCompletionResponseObject ¶
type CreateChatCompletionResponseObject string
const (
CreateChatCompletionResponseObjectChatCompletion CreateChatCompletionResponseObject = "chat.completion"
)
func (CreateChatCompletionResponseObject) AllValues ¶
func (CreateChatCompletionResponseObject) AllValues() []CreateChatCompletionResponseObject
AllValues returns all CreateChatCompletionResponseObject values.
func (*CreateChatCompletionResponseObject) Decode ¶
func (s *CreateChatCompletionResponseObject) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionResponseObject from json.
func (CreateChatCompletionResponseObject) Encode ¶
func (s CreateChatCompletionResponseObject) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionResponseObject as json.
func (CreateChatCompletionResponseObject) MarshalJSON ¶
func (s CreateChatCompletionResponseObject) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (CreateChatCompletionResponseObject) MarshalText ¶
func (s CreateChatCompletionResponseObject) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateChatCompletionResponseObject) UnmarshalJSON ¶
func (s *CreateChatCompletionResponseObject) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateChatCompletionResponseObject) UnmarshalText ¶
func (s *CreateChatCompletionResponseObject) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateChatCompletionResponseObject) Validate ¶
func (s CreateChatCompletionResponseObject) Validate() error
type CreateChatCompletionUnauthorized ¶
type CreateChatCompletionUnauthorized ErrorResponse
func (*CreateChatCompletionUnauthorized) Decode ¶
func (s *CreateChatCompletionUnauthorized) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionUnauthorized from json.
func (*CreateChatCompletionUnauthorized) Encode ¶
func (s *CreateChatCompletionUnauthorized) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionUnauthorized as json.
func (*CreateChatCompletionUnauthorized) MarshalJSON ¶
func (s *CreateChatCompletionUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateChatCompletionUnauthorized) UnmarshalJSON ¶
func (s *CreateChatCompletionUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ErrorResponse ¶
type ErrorResponse struct {
Error ErrorResponseError `json:"error"`
}
Ref: #/components/schemas/ErrorResponse
func (*ErrorResponse) Decode ¶
func (s *ErrorResponse) Decode(d *jx.Decoder) error
Decode decodes ErrorResponse from json.
func (*ErrorResponse) Encode ¶
func (s *ErrorResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ErrorResponse) GetError ¶
func (s *ErrorResponse) GetError() ErrorResponseError
GetError returns the value of Error.
func (*ErrorResponse) MarshalJSON ¶
func (s *ErrorResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ErrorResponse) SetError ¶
func (s *ErrorResponse) SetError(val ErrorResponseError)
SetError sets the value of Error.
func (*ErrorResponse) UnmarshalJSON ¶
func (s *ErrorResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ErrorResponseError ¶
type ErrorResponseError struct {
// Human-readable error message.
Message string `json:"message"`
// Error type.
Type string `json:"type"`
// The parameter that caused the error.
Param OptNilString `json:"param"`
// Error code.
Code OptNilString `json:"code"`
}
func (*ErrorResponseError) Decode ¶
func (s *ErrorResponseError) Decode(d *jx.Decoder) error
Decode decodes ErrorResponseError from json.
func (*ErrorResponseError) Encode ¶
func (s *ErrorResponseError) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ErrorResponseError) GetCode ¶
func (s *ErrorResponseError) GetCode() OptNilString
GetCode returns the value of Code.
func (*ErrorResponseError) GetMessage ¶
func (s *ErrorResponseError) GetMessage() string
GetMessage returns the value of Message.
func (*ErrorResponseError) GetParam ¶
func (s *ErrorResponseError) GetParam() OptNilString
GetParam returns the value of Param.
func (*ErrorResponseError) GetType ¶
func (s *ErrorResponseError) GetType() string
GetType returns the value of Type.
func (*ErrorResponseError) MarshalJSON ¶
func (s *ErrorResponseError) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ErrorResponseError) SetCode ¶
func (s *ErrorResponseError) SetCode(val OptNilString)
SetCode sets the value of Code.
func (*ErrorResponseError) SetMessage ¶
func (s *ErrorResponseError) SetMessage(val string)
SetMessage sets the value of Message.
func (*ErrorResponseError) SetParam ¶
func (s *ErrorResponseError) SetParam(val OptNilString)
SetParam sets the value of Param.
func (*ErrorResponseError) SetType ¶
func (s *ErrorResponseError) SetType(val string)
SetType sets the value of Type.
func (*ErrorResponseError) UnmarshalJSON ¶
func (s *ErrorResponseError) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type FunctionObject ¶
type FunctionObject struct {
// The name of the function.
Name string `json:"name"`
// Description of what the function does.
Description OptString `json:"description"`
// JSON Schema for the function parameters.
Parameters *FunctionObjectParameters `json:"parameters"`
// Whether to enable strict schema adherence.
Strict OptNilBool `json:"strict"`
}
Ref: #/components/schemas/FunctionObject
func (*FunctionObject) Decode ¶
func (s *FunctionObject) Decode(d *jx.Decoder) error
Decode decodes FunctionObject from json.
func (*FunctionObject) Encode ¶
func (s *FunctionObject) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*FunctionObject) GetDescription ¶
func (s *FunctionObject) GetDescription() OptString
GetDescription returns the value of Description.
func (*FunctionObject) GetName ¶
func (s *FunctionObject) GetName() string
GetName returns the value of Name.
func (*FunctionObject) GetParameters ¶
func (s *FunctionObject) GetParameters() *FunctionObjectParameters
GetParameters returns the value of Parameters.
func (*FunctionObject) GetStrict ¶
func (s *FunctionObject) GetStrict() OptNilBool
GetStrict returns the value of Strict.
func (*FunctionObject) MarshalJSON ¶
func (s *FunctionObject) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*FunctionObject) SetDescription ¶
func (s *FunctionObject) SetDescription(val OptString)
SetDescription sets the value of Description.
func (*FunctionObject) SetName ¶
func (s *FunctionObject) SetName(val string)
SetName sets the value of Name.
func (*FunctionObject) SetParameters ¶
func (s *FunctionObject) SetParameters(val *FunctionObjectParameters)
SetParameters sets the value of Parameters.
func (*FunctionObject) SetStrict ¶
func (s *FunctionObject) SetStrict(val OptNilBool)
SetStrict sets the value of Strict.
func (*FunctionObject) UnmarshalJSON ¶
func (s *FunctionObject) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type FunctionObjectParameters ¶
type FunctionObjectParameters struct{}
JSON Schema for the function parameters.
func (*FunctionObjectParameters) Decode ¶
func (s *FunctionObjectParameters) Decode(d *jx.Decoder) error
Decode decodes FunctionObjectParameters from json.
func (*FunctionObjectParameters) Encode ¶
func (s *FunctionObjectParameters) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*FunctionObjectParameters) MarshalJSON ¶
func (s *FunctionObjectParameters) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*FunctionObjectParameters) UnmarshalJSON ¶
func (s *FunctionObjectParameters) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Handler ¶
type Handler interface {
// CreateChatCompletion implements createChatCompletion operation.
//
// Creates a model response for the given chat conversation.
//
// POST /chat/completions
CreateChatCompletion(ctx context.Context, req *CreateChatCompletionRequest) (CreateChatCompletionRes, error)
// ListModels implements listModels operation.
//
// Lists the currently available models.
//
// GET /models
ListModels(ctx context.Context) (*ListModelsResponse, error)
// RetrieveModel implements retrieveModel operation.
//
// Retrieves a model instance.
//
// GET /models/{model}
RetrieveModel(ctx context.Context, params RetrieveModelParams) (RetrieveModelRes, error)
}
Handler handles operations described by OpenAPI v3 specification.
type Invoker ¶
type Invoker interface {
// CreateChatCompletion invokes createChatCompletion operation.
//
// Creates a model response for the given chat conversation.
//
// POST /chat/completions
CreateChatCompletion(ctx context.Context, request *CreateChatCompletionRequest) (CreateChatCompletionRes, error)
// ListModels invokes listModels operation.
//
// Lists the currently available models.
//
// GET /models
ListModels(ctx context.Context) (*ListModelsResponse, error)
// RetrieveModel invokes retrieveModel operation.
//
// Retrieves a model instance.
//
// GET /models/{model}
RetrieveModel(ctx context.Context, params RetrieveModelParams) (RetrieveModelRes, error)
}
Invoker invokes operations described by OpenAPI v3 specification.
type Labeler ¶
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶
LabelerFromContext retrieves the Labeler from the provided context, if present.
If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.
func (*Labeler) AttributeSet ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type ListModelsResponse ¶
type ListModelsResponse struct {
Object ListModelsResponseObject `json:"object"`
Data []Model `json:"data"`
}
Ref: #/components/schemas/ListModelsResponse
func (*ListModelsResponse) Decode ¶
func (s *ListModelsResponse) Decode(d *jx.Decoder) error
Decode decodes ListModelsResponse from json.
func (*ListModelsResponse) Encode ¶
func (s *ListModelsResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ListModelsResponse) GetData ¶
func (s *ListModelsResponse) GetData() []Model
GetData returns the value of Data.
func (*ListModelsResponse) GetObject ¶
func (s *ListModelsResponse) GetObject() ListModelsResponseObject
GetObject returns the value of Object.
func (*ListModelsResponse) MarshalJSON ¶
func (s *ListModelsResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListModelsResponse) SetData ¶
func (s *ListModelsResponse) SetData(val []Model)
SetData sets the value of Data.
func (*ListModelsResponse) SetObject ¶
func (s *ListModelsResponse) SetObject(val ListModelsResponseObject)
SetObject sets the value of Object.
func (*ListModelsResponse) UnmarshalJSON ¶
func (s *ListModelsResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ListModelsResponse) Validate ¶
func (s *ListModelsResponse) Validate() error
type ListModelsResponseObject ¶
type ListModelsResponseObject string
const (
ListModelsResponseObjectList ListModelsResponseObject = "list"
)
func (ListModelsResponseObject) AllValues ¶
func (ListModelsResponseObject) AllValues() []ListModelsResponseObject
AllValues returns all ListModelsResponseObject values.
func (*ListModelsResponseObject) Decode ¶
func (s *ListModelsResponseObject) Decode(d *jx.Decoder) error
Decode decodes ListModelsResponseObject from json.
func (ListModelsResponseObject) Encode ¶
func (s ListModelsResponseObject) Encode(e *jx.Encoder)
Encode encodes ListModelsResponseObject as json.
func (ListModelsResponseObject) MarshalJSON ¶
func (s ListModelsResponseObject) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ListModelsResponseObject) MarshalText ¶
func (s ListModelsResponseObject) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ListModelsResponseObject) UnmarshalJSON ¶
func (s *ListModelsResponseObject) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ListModelsResponseObject) UnmarshalText ¶
func (s *ListModelsResponseObject) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ListModelsResponseObject) Validate ¶
func (s ListModelsResponseObject) Validate() error
type Model ¶
type Model struct {
// The model identifier.
ID string `json:"id"`
Object ModelObject `json:"object"`
// Unix timestamp when the model was created.
Created int `json:"created"`
// Organization that owns the model.
OwnedBy string `json:"owned_by"`
}
Ref: #/components/schemas/Model
func (*Model) GetCreated ¶
GetCreated returns the value of Created.
func (*Model) GetObject ¶
func (s *Model) GetObject() ModelObject
GetObject returns the value of Object.
func (*Model) GetOwnedBy ¶
GetOwnedBy returns the value of OwnedBy.
func (*Model) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Model) SetCreated ¶
SetCreated sets the value of Created.
func (*Model) SetObject ¶
func (s *Model) SetObject(val ModelObject)
SetObject sets the value of Object.
func (*Model) SetOwnedBy ¶
SetOwnedBy sets the value of OwnedBy.
func (*Model) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ModelObject ¶
type ModelObject string
const (
ModelObjectModel ModelObject = "model"
)
func (ModelObject) AllValues ¶
func (ModelObject) AllValues() []ModelObject
AllValues returns all ModelObject values.
func (*ModelObject) Decode ¶
func (s *ModelObject) Decode(d *jx.Decoder) error
Decode decodes ModelObject from json.
func (ModelObject) Encode ¶
func (s ModelObject) Encode(e *jx.Encoder)
Encode encodes ModelObject as json.
func (ModelObject) MarshalJSON ¶
func (s ModelObject) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ModelObject) MarshalText ¶
func (s ModelObject) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ModelObject) UnmarshalJSON ¶
func (s *ModelObject) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ModelObject) UnmarshalText ¶
func (s *ModelObject) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ModelObject) Validate ¶
func (s ModelObject) Validate() error
type NilChatCompletionChoiceFinishReason ¶
type NilChatCompletionChoiceFinishReason struct {
Value ChatCompletionChoiceFinishReason
Null bool
}
NilChatCompletionChoiceFinishReason is nullable ChatCompletionChoiceFinishReason.
func NewNilChatCompletionChoiceFinishReason ¶
func NewNilChatCompletionChoiceFinishReason(v ChatCompletionChoiceFinishReason) NilChatCompletionChoiceFinishReason
NewNilChatCompletionChoiceFinishReason returns new NilChatCompletionChoiceFinishReason with value set to v.
func (*NilChatCompletionChoiceFinishReason) Decode ¶
func (o *NilChatCompletionChoiceFinishReason) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionChoiceFinishReason from json.
func (NilChatCompletionChoiceFinishReason) Encode ¶
func (o NilChatCompletionChoiceFinishReason) Encode(e *jx.Encoder)
Encode encodes ChatCompletionChoiceFinishReason as json.
func (NilChatCompletionChoiceFinishReason) Get ¶
func (o NilChatCompletionChoiceFinishReason) Get() (v ChatCompletionChoiceFinishReason, ok bool)
Get returns value and boolean that denotes whether value was set.
func (NilChatCompletionChoiceFinishReason) IsNull ¶
func (o NilChatCompletionChoiceFinishReason) IsNull() bool
IsNull returns true if value is Null.
func (NilChatCompletionChoiceFinishReason) MarshalJSON ¶
func (s NilChatCompletionChoiceFinishReason) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (NilChatCompletionChoiceFinishReason) Or ¶
func (o NilChatCompletionChoiceFinishReason) Or(d ChatCompletionChoiceFinishReason) ChatCompletionChoiceFinishReason
Or returns value if set, or given parameter if does not.
func (*NilChatCompletionChoiceFinishReason) SetTo ¶
func (o *NilChatCompletionChoiceFinishReason) SetTo(v ChatCompletionChoiceFinishReason)
SetTo sets value to v.
func (*NilChatCompletionChoiceFinishReason) SetToNull ¶
func (o *NilChatCompletionChoiceFinishReason) SetToNull()
SetToNull sets value to null.
func (*NilChatCompletionChoiceFinishReason) UnmarshalJSON ¶
func (s *NilChatCompletionChoiceFinishReason) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type NilString ¶
NilString is nullable string.
func NewNilString ¶
NewNilString returns new NilString with value set to v.
func (NilString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*NilString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const ( CreateChatCompletionOperation OperationName = "CreateChatCompletion" ListModelsOperation OperationName = "ListModels" RetrieveModelOperation OperationName = "RetrieveModel" )
type OptBool ¶
OptBool is optional bool.
func NewOptBool ¶
NewOptBool returns new OptBool with value set to v.
func (OptBool) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptBool) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptChatCompletionContentPartImageURL ¶
type OptChatCompletionContentPartImageURL struct {
Value ChatCompletionContentPartImageURL
Set bool
}
OptChatCompletionContentPartImageURL is optional ChatCompletionContentPartImageURL.
func NewOptChatCompletionContentPartImageURL ¶
func NewOptChatCompletionContentPartImageURL(v ChatCompletionContentPartImageURL) OptChatCompletionContentPartImageURL
NewOptChatCompletionContentPartImageURL returns new OptChatCompletionContentPartImageURL with value set to v.
func (*OptChatCompletionContentPartImageURL) Decode ¶
func (o *OptChatCompletionContentPartImageURL) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionContentPartImageURL from json.
func (OptChatCompletionContentPartImageURL) Encode ¶
func (o OptChatCompletionContentPartImageURL) Encode(e *jx.Encoder)
Encode encodes ChatCompletionContentPartImageURL as json.
func (OptChatCompletionContentPartImageURL) Get ¶
func (o OptChatCompletionContentPartImageURL) Get() (v ChatCompletionContentPartImageURL, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptChatCompletionContentPartImageURL) IsSet ¶
func (o OptChatCompletionContentPartImageURL) IsSet() bool
IsSet returns true if OptChatCompletionContentPartImageURL was set.
func (OptChatCompletionContentPartImageURL) MarshalJSON ¶
func (s OptChatCompletionContentPartImageURL) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptChatCompletionContentPartImageURL) Or ¶
func (o OptChatCompletionContentPartImageURL) Or(d ChatCompletionContentPartImageURL) ChatCompletionContentPartImageURL
Or returns value if set, or given parameter if does not.
func (*OptChatCompletionContentPartImageURL) Reset ¶
func (o *OptChatCompletionContentPartImageURL) Reset()
Reset unsets value.
func (*OptChatCompletionContentPartImageURL) SetTo ¶
func (o *OptChatCompletionContentPartImageURL) SetTo(v ChatCompletionContentPartImageURL)
SetTo sets value to v.
func (*OptChatCompletionContentPartImageURL) UnmarshalJSON ¶
func (s *OptChatCompletionContentPartImageURL) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptChatCompletionContentPartImageURLDetail ¶
type OptChatCompletionContentPartImageURLDetail struct {
Value ChatCompletionContentPartImageURLDetail
Set bool
}
OptChatCompletionContentPartImageURLDetail is optional ChatCompletionContentPartImageURLDetail.
func NewOptChatCompletionContentPartImageURLDetail ¶
func NewOptChatCompletionContentPartImageURLDetail(v ChatCompletionContentPartImageURLDetail) OptChatCompletionContentPartImageURLDetail
NewOptChatCompletionContentPartImageURLDetail returns new OptChatCompletionContentPartImageURLDetail with value set to v.
func (*OptChatCompletionContentPartImageURLDetail) Decode ¶
func (o *OptChatCompletionContentPartImageURLDetail) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionContentPartImageURLDetail from json.
func (OptChatCompletionContentPartImageURLDetail) Encode ¶
func (o OptChatCompletionContentPartImageURLDetail) Encode(e *jx.Encoder)
Encode encodes ChatCompletionContentPartImageURLDetail as json.
func (OptChatCompletionContentPartImageURLDetail) Get ¶
func (o OptChatCompletionContentPartImageURLDetail) Get() (v ChatCompletionContentPartImageURLDetail, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptChatCompletionContentPartImageURLDetail) IsSet ¶
func (o OptChatCompletionContentPartImageURLDetail) IsSet() bool
IsSet returns true if OptChatCompletionContentPartImageURLDetail was set.
func (OptChatCompletionContentPartImageURLDetail) MarshalJSON ¶
func (s OptChatCompletionContentPartImageURLDetail) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptChatCompletionContentPartImageURLDetail) Or ¶
func (o OptChatCompletionContentPartImageURLDetail) Or(d ChatCompletionContentPartImageURLDetail) ChatCompletionContentPartImageURLDetail
Or returns value if set, or given parameter if does not.
func (*OptChatCompletionContentPartImageURLDetail) Reset ¶
func (o *OptChatCompletionContentPartImageURLDetail) Reset()
Reset unsets value.
func (*OptChatCompletionContentPartImageURLDetail) SetTo ¶
func (o *OptChatCompletionContentPartImageURLDetail) SetTo(v ChatCompletionContentPartImageURLDetail)
SetTo sets value to v.
func (*OptChatCompletionContentPartImageURLDetail) UnmarshalJSON ¶
func (s *OptChatCompletionContentPartImageURLDetail) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptChatCompletionMessageFunctionCall ¶
type OptChatCompletionMessageFunctionCall struct {
Value ChatCompletionMessageFunctionCall
Set bool
}
OptChatCompletionMessageFunctionCall is optional ChatCompletionMessageFunctionCall.
func NewOptChatCompletionMessageFunctionCall ¶
func NewOptChatCompletionMessageFunctionCall(v ChatCompletionMessageFunctionCall) OptChatCompletionMessageFunctionCall
NewOptChatCompletionMessageFunctionCall returns new OptChatCompletionMessageFunctionCall with value set to v.
func (*OptChatCompletionMessageFunctionCall) Decode ¶
func (o *OptChatCompletionMessageFunctionCall) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionMessageFunctionCall from json.
func (OptChatCompletionMessageFunctionCall) Encode ¶
func (o OptChatCompletionMessageFunctionCall) Encode(e *jx.Encoder)
Encode encodes ChatCompletionMessageFunctionCall as json.
func (OptChatCompletionMessageFunctionCall) Get ¶
func (o OptChatCompletionMessageFunctionCall) Get() (v ChatCompletionMessageFunctionCall, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptChatCompletionMessageFunctionCall) IsSet ¶
func (o OptChatCompletionMessageFunctionCall) IsSet() bool
IsSet returns true if OptChatCompletionMessageFunctionCall was set.
func (OptChatCompletionMessageFunctionCall) MarshalJSON ¶
func (s OptChatCompletionMessageFunctionCall) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptChatCompletionMessageFunctionCall) Or ¶
func (o OptChatCompletionMessageFunctionCall) Or(d ChatCompletionMessageFunctionCall) ChatCompletionMessageFunctionCall
Or returns value if set, or given parameter if does not.
func (*OptChatCompletionMessageFunctionCall) Reset ¶
func (o *OptChatCompletionMessageFunctionCall) Reset()
Reset unsets value.
func (*OptChatCompletionMessageFunctionCall) SetTo ¶
func (o *OptChatCompletionMessageFunctionCall) SetTo(v ChatCompletionMessageFunctionCall)
SetTo sets value to v.
func (*OptChatCompletionMessageFunctionCall) UnmarshalJSON ¶
func (s *OptChatCompletionMessageFunctionCall) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptCompletionUsage ¶
type OptCompletionUsage struct {
Value CompletionUsage
Set bool
}
OptCompletionUsage is optional CompletionUsage.
func NewOptCompletionUsage ¶
func NewOptCompletionUsage(v CompletionUsage) OptCompletionUsage
NewOptCompletionUsage returns new OptCompletionUsage with value set to v.
func (*OptCompletionUsage) Decode ¶
func (o *OptCompletionUsage) Decode(d *jx.Decoder) error
Decode decodes CompletionUsage from json.
func (OptCompletionUsage) Encode ¶
func (o OptCompletionUsage) Encode(e *jx.Encoder)
Encode encodes CompletionUsage as json.
func (OptCompletionUsage) Get ¶
func (o OptCompletionUsage) Get() (v CompletionUsage, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptCompletionUsage) IsSet ¶
func (o OptCompletionUsage) IsSet() bool
IsSet returns true if OptCompletionUsage was set.
func (OptCompletionUsage) MarshalJSON ¶
func (s OptCompletionUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptCompletionUsage) Or ¶
func (o OptCompletionUsage) Or(d CompletionUsage) CompletionUsage
Or returns value if set, or given parameter if does not.
func (*OptCompletionUsage) SetTo ¶
func (o *OptCompletionUsage) SetTo(v CompletionUsage)
SetTo sets value to v.
func (*OptCompletionUsage) UnmarshalJSON ¶
func (s *OptCompletionUsage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptCompletionUsageCompletionTokensDetails ¶
type OptCompletionUsageCompletionTokensDetails struct {
Value CompletionUsageCompletionTokensDetails
Set bool
}
OptCompletionUsageCompletionTokensDetails is optional CompletionUsageCompletionTokensDetails.
func NewOptCompletionUsageCompletionTokensDetails ¶
func NewOptCompletionUsageCompletionTokensDetails(v CompletionUsageCompletionTokensDetails) OptCompletionUsageCompletionTokensDetails
NewOptCompletionUsageCompletionTokensDetails returns new OptCompletionUsageCompletionTokensDetails with value set to v.
func (*OptCompletionUsageCompletionTokensDetails) Decode ¶
func (o *OptCompletionUsageCompletionTokensDetails) Decode(d *jx.Decoder) error
Decode decodes CompletionUsageCompletionTokensDetails from json.
func (OptCompletionUsageCompletionTokensDetails) Encode ¶
func (o OptCompletionUsageCompletionTokensDetails) Encode(e *jx.Encoder)
Encode encodes CompletionUsageCompletionTokensDetails as json.
func (OptCompletionUsageCompletionTokensDetails) Get ¶
func (o OptCompletionUsageCompletionTokensDetails) Get() (v CompletionUsageCompletionTokensDetails, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptCompletionUsageCompletionTokensDetails) IsSet ¶
func (o OptCompletionUsageCompletionTokensDetails) IsSet() bool
IsSet returns true if OptCompletionUsageCompletionTokensDetails was set.
func (OptCompletionUsageCompletionTokensDetails) MarshalJSON ¶
func (s OptCompletionUsageCompletionTokensDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptCompletionUsageCompletionTokensDetails) Or ¶
func (o OptCompletionUsageCompletionTokensDetails) Or(d CompletionUsageCompletionTokensDetails) CompletionUsageCompletionTokensDetails
Or returns value if set, or given parameter if does not.
func (*OptCompletionUsageCompletionTokensDetails) Reset ¶
func (o *OptCompletionUsageCompletionTokensDetails) Reset()
Reset unsets value.
func (*OptCompletionUsageCompletionTokensDetails) SetTo ¶
func (o *OptCompletionUsageCompletionTokensDetails) SetTo(v CompletionUsageCompletionTokensDetails)
SetTo sets value to v.
func (*OptCompletionUsageCompletionTokensDetails) UnmarshalJSON ¶
func (s *OptCompletionUsageCompletionTokensDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptCompletionUsagePromptTokensDetails ¶
type OptCompletionUsagePromptTokensDetails struct {
Value CompletionUsagePromptTokensDetails
Set bool
}
OptCompletionUsagePromptTokensDetails is optional CompletionUsagePromptTokensDetails.
func NewOptCompletionUsagePromptTokensDetails ¶
func NewOptCompletionUsagePromptTokensDetails(v CompletionUsagePromptTokensDetails) OptCompletionUsagePromptTokensDetails
NewOptCompletionUsagePromptTokensDetails returns new OptCompletionUsagePromptTokensDetails with value set to v.
func (*OptCompletionUsagePromptTokensDetails) Decode ¶
func (o *OptCompletionUsagePromptTokensDetails) Decode(d *jx.Decoder) error
Decode decodes CompletionUsagePromptTokensDetails from json.
func (OptCompletionUsagePromptTokensDetails) Encode ¶
func (o OptCompletionUsagePromptTokensDetails) Encode(e *jx.Encoder)
Encode encodes CompletionUsagePromptTokensDetails as json.
func (OptCompletionUsagePromptTokensDetails) Get ¶
func (o OptCompletionUsagePromptTokensDetails) Get() (v CompletionUsagePromptTokensDetails, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptCompletionUsagePromptTokensDetails) IsSet ¶
func (o OptCompletionUsagePromptTokensDetails) IsSet() bool
IsSet returns true if OptCompletionUsagePromptTokensDetails was set.
func (OptCompletionUsagePromptTokensDetails) MarshalJSON ¶
func (s OptCompletionUsagePromptTokensDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptCompletionUsagePromptTokensDetails) Or ¶
func (o OptCompletionUsagePromptTokensDetails) Or(d CompletionUsagePromptTokensDetails) CompletionUsagePromptTokensDetails
Or returns value if set, or given parameter if does not.
func (*OptCompletionUsagePromptTokensDetails) Reset ¶
func (o *OptCompletionUsagePromptTokensDetails) Reset()
Reset unsets value.
func (*OptCompletionUsagePromptTokensDetails) SetTo ¶
func (o *OptCompletionUsagePromptTokensDetails) SetTo(v CompletionUsagePromptTokensDetails)
SetTo sets value to v.
func (*OptCompletionUsagePromptTokensDetails) UnmarshalJSON ¶
func (s *OptCompletionUsagePromptTokensDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptCreateChatCompletionRequestToolChoice ¶
type OptCreateChatCompletionRequestToolChoice struct {
Value CreateChatCompletionRequestToolChoice
Set bool
}
OptCreateChatCompletionRequestToolChoice is optional CreateChatCompletionRequestToolChoice.
func NewOptCreateChatCompletionRequestToolChoice ¶
func NewOptCreateChatCompletionRequestToolChoice(v CreateChatCompletionRequestToolChoice) OptCreateChatCompletionRequestToolChoice
NewOptCreateChatCompletionRequestToolChoice returns new OptCreateChatCompletionRequestToolChoice with value set to v.
func (*OptCreateChatCompletionRequestToolChoice) Decode ¶
func (o *OptCreateChatCompletionRequestToolChoice) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequestToolChoice from json.
func (OptCreateChatCompletionRequestToolChoice) Encode ¶
func (o OptCreateChatCompletionRequestToolChoice) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionRequestToolChoice as json.
func (OptCreateChatCompletionRequestToolChoice) Get ¶
func (o OptCreateChatCompletionRequestToolChoice) Get() (v CreateChatCompletionRequestToolChoice, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptCreateChatCompletionRequestToolChoice) IsSet ¶
func (o OptCreateChatCompletionRequestToolChoice) IsSet() bool
IsSet returns true if OptCreateChatCompletionRequestToolChoice was set.
func (OptCreateChatCompletionRequestToolChoice) MarshalJSON ¶
func (s OptCreateChatCompletionRequestToolChoice) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptCreateChatCompletionRequestToolChoice) Or ¶
func (o OptCreateChatCompletionRequestToolChoice) Or(d CreateChatCompletionRequestToolChoice) CreateChatCompletionRequestToolChoice
Or returns value if set, or given parameter if does not.
func (*OptCreateChatCompletionRequestToolChoice) Reset ¶
func (o *OptCreateChatCompletionRequestToolChoice) Reset()
Reset unsets value.
func (*OptCreateChatCompletionRequestToolChoice) SetTo ¶
func (o *OptCreateChatCompletionRequestToolChoice) SetTo(v CreateChatCompletionRequestToolChoice)
SetTo sets value to v.
func (*OptCreateChatCompletionRequestToolChoice) UnmarshalJSON ¶
func (s *OptCreateChatCompletionRequestToolChoice) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt ¶
OptInt is optional int.
func (OptInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilBool ¶
OptNilBool is optional nullable bool.
func NewOptNilBool ¶
func NewOptNilBool(v bool) OptNilBool
NewOptNilBool returns new OptNilBool with value set to v.
func (*OptNilBool) Decode ¶
func (o *OptNilBool) Decode(d *jx.Decoder) error
Decode decodes bool from json.
func (OptNilBool) Get ¶
func (o OptNilBool) Get() (v bool, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilBool) IsEmpty ¶
func (o OptNilBool) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilBool) IsSet ¶
func (o OptNilBool) IsSet() bool
IsSet returns true if OptNilBool was set.
func (OptNilBool) MarshalJSON ¶
func (s OptNilBool) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilBool) Or ¶
func (o OptNilBool) Or(d bool) bool
Or returns value if set, or given parameter if does not.
func (*OptNilBool) UnmarshalJSON ¶
func (s *OptNilBool) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilChatCompletionLogprobs ¶
type OptNilChatCompletionLogprobs struct {
Value ChatCompletionLogprobs
Set bool
Null bool
}
OptNilChatCompletionLogprobs is optional nullable ChatCompletionLogprobs.
func NewOptNilChatCompletionLogprobs ¶
func NewOptNilChatCompletionLogprobs(v ChatCompletionLogprobs) OptNilChatCompletionLogprobs
NewOptNilChatCompletionLogprobs returns new OptNilChatCompletionLogprobs with value set to v.
func (*OptNilChatCompletionLogprobs) Decode ¶
func (o *OptNilChatCompletionLogprobs) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionLogprobs from json.
func (OptNilChatCompletionLogprobs) Encode ¶
func (o OptNilChatCompletionLogprobs) Encode(e *jx.Encoder)
Encode encodes ChatCompletionLogprobs as json.
func (OptNilChatCompletionLogprobs) Get ¶
func (o OptNilChatCompletionLogprobs) Get() (v ChatCompletionLogprobs, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilChatCompletionLogprobs) IsEmpty ¶
func (o OptNilChatCompletionLogprobs) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilChatCompletionLogprobs) IsNull ¶
func (o OptNilChatCompletionLogprobs) IsNull() bool
IsNull returns true if value is Null.
func (OptNilChatCompletionLogprobs) IsSet ¶
func (o OptNilChatCompletionLogprobs) IsSet() bool
IsSet returns true if OptNilChatCompletionLogprobs was set.
func (OptNilChatCompletionLogprobs) MarshalJSON ¶
func (s OptNilChatCompletionLogprobs) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*OptNilChatCompletionLogprobs) Reset ¶
func (o *OptNilChatCompletionLogprobs) Reset()
Reset unsets value.
func (*OptNilChatCompletionLogprobs) SetTo ¶
func (o *OptNilChatCompletionLogprobs) SetTo(v ChatCompletionLogprobs)
SetTo sets value to v.
func (*OptNilChatCompletionLogprobs) SetToNull ¶
func (o *OptNilChatCompletionLogprobs) SetToNull()
SetToNull sets value to null.
func (*OptNilChatCompletionLogprobs) UnmarshalJSON ¶
func (s *OptNilChatCompletionLogprobs) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilChatCompletionMessageParamContent ¶
type OptNilChatCompletionMessageParamContent struct {
Value ChatCompletionMessageParamContent
Set bool
Null bool
}
OptNilChatCompletionMessageParamContent is optional nullable ChatCompletionMessageParamContent.
func NewOptNilChatCompletionMessageParamContent ¶
func NewOptNilChatCompletionMessageParamContent(v ChatCompletionMessageParamContent) OptNilChatCompletionMessageParamContent
NewOptNilChatCompletionMessageParamContent returns new OptNilChatCompletionMessageParamContent with value set to v.
func (*OptNilChatCompletionMessageParamContent) Decode ¶
func (o *OptNilChatCompletionMessageParamContent) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionMessageParamContent from json.
func (OptNilChatCompletionMessageParamContent) Encode ¶
func (o OptNilChatCompletionMessageParamContent) Encode(e *jx.Encoder)
Encode encodes ChatCompletionMessageParamContent as json.
func (OptNilChatCompletionMessageParamContent) Get ¶
func (o OptNilChatCompletionMessageParamContent) Get() (v ChatCompletionMessageParamContent, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilChatCompletionMessageParamContent) IsEmpty ¶
func (o OptNilChatCompletionMessageParamContent) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilChatCompletionMessageParamContent) IsNull ¶
func (o OptNilChatCompletionMessageParamContent) IsNull() bool
IsNull returns true if value is Null.
func (OptNilChatCompletionMessageParamContent) IsSet ¶
func (o OptNilChatCompletionMessageParamContent) IsSet() bool
IsSet returns true if OptNilChatCompletionMessageParamContent was set.
func (OptNilChatCompletionMessageParamContent) MarshalJSON ¶
func (s OptNilChatCompletionMessageParamContent) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilChatCompletionMessageParamContent) Or ¶
func (o OptNilChatCompletionMessageParamContent) Or(d ChatCompletionMessageParamContent) ChatCompletionMessageParamContent
Or returns value if set, or given parameter if does not.
func (*OptNilChatCompletionMessageParamContent) Reset ¶
func (o *OptNilChatCompletionMessageParamContent) Reset()
Reset unsets value.
func (*OptNilChatCompletionMessageParamContent) SetTo ¶
func (o *OptNilChatCompletionMessageParamContent) SetTo(v ChatCompletionMessageParamContent)
SetTo sets value to v.
func (*OptNilChatCompletionMessageParamContent) SetToNull ¶
func (o *OptNilChatCompletionMessageParamContent) SetToNull()
SetToNull sets value to null.
func (*OptNilChatCompletionMessageParamContent) UnmarshalJSON ¶
func (s *OptNilChatCompletionMessageParamContent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilChatCompletionStreamOptions ¶
type OptNilChatCompletionStreamOptions struct {
Value ChatCompletionStreamOptions
Set bool
Null bool
}
OptNilChatCompletionStreamOptions is optional nullable ChatCompletionStreamOptions.
func NewOptNilChatCompletionStreamOptions ¶
func NewOptNilChatCompletionStreamOptions(v ChatCompletionStreamOptions) OptNilChatCompletionStreamOptions
NewOptNilChatCompletionStreamOptions returns new OptNilChatCompletionStreamOptions with value set to v.
func (*OptNilChatCompletionStreamOptions) Decode ¶
func (o *OptNilChatCompletionStreamOptions) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionStreamOptions from json.
func (OptNilChatCompletionStreamOptions) Encode ¶
func (o OptNilChatCompletionStreamOptions) Encode(e *jx.Encoder)
Encode encodes ChatCompletionStreamOptions as json.
func (OptNilChatCompletionStreamOptions) Get ¶
func (o OptNilChatCompletionStreamOptions) Get() (v ChatCompletionStreamOptions, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilChatCompletionStreamOptions) IsEmpty ¶
func (o OptNilChatCompletionStreamOptions) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilChatCompletionStreamOptions) IsNull ¶
func (o OptNilChatCompletionStreamOptions) IsNull() bool
IsNull returns true if value is Null.
func (OptNilChatCompletionStreamOptions) IsSet ¶
func (o OptNilChatCompletionStreamOptions) IsSet() bool
IsSet returns true if OptNilChatCompletionStreamOptions was set.
func (OptNilChatCompletionStreamOptions) MarshalJSON ¶
func (s OptNilChatCompletionStreamOptions) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilChatCompletionStreamOptions) Or ¶
func (o OptNilChatCompletionStreamOptions) Or(d ChatCompletionStreamOptions) ChatCompletionStreamOptions
Or returns value if set, or given parameter if does not.
func (*OptNilChatCompletionStreamOptions) Reset ¶
func (o *OptNilChatCompletionStreamOptions) Reset()
Reset unsets value.
func (*OptNilChatCompletionStreamOptions) SetTo ¶
func (o *OptNilChatCompletionStreamOptions) SetTo(v ChatCompletionStreamOptions)
SetTo sets value to v.
func (*OptNilChatCompletionStreamOptions) SetToNull ¶
func (o *OptNilChatCompletionStreamOptions) SetToNull()
SetToNull sets value to null.
func (*OptNilChatCompletionStreamOptions) UnmarshalJSON ¶
func (s *OptNilChatCompletionStreamOptions) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilChatCompletionTokenLogprobArray ¶
type OptNilChatCompletionTokenLogprobArray struct {
Value []ChatCompletionTokenLogprob
Set bool
Null bool
}
OptNilChatCompletionTokenLogprobArray is optional nullable []ChatCompletionTokenLogprob.
func NewOptNilChatCompletionTokenLogprobArray ¶
func NewOptNilChatCompletionTokenLogprobArray(v []ChatCompletionTokenLogprob) OptNilChatCompletionTokenLogprobArray
NewOptNilChatCompletionTokenLogprobArray returns new OptNilChatCompletionTokenLogprobArray with value set to v.
func (*OptNilChatCompletionTokenLogprobArray) Decode ¶
func (o *OptNilChatCompletionTokenLogprobArray) Decode(d *jx.Decoder) error
Decode decodes []ChatCompletionTokenLogprob from json.
func (OptNilChatCompletionTokenLogprobArray) Encode ¶
func (o OptNilChatCompletionTokenLogprobArray) Encode(e *jx.Encoder)
Encode encodes []ChatCompletionTokenLogprob as json.
func (OptNilChatCompletionTokenLogprobArray) Get ¶
func (o OptNilChatCompletionTokenLogprobArray) Get() (v []ChatCompletionTokenLogprob, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilChatCompletionTokenLogprobArray) IsEmpty ¶
func (o OptNilChatCompletionTokenLogprobArray) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilChatCompletionTokenLogprobArray) IsNull ¶
func (o OptNilChatCompletionTokenLogprobArray) IsNull() bool
IsNull returns true if value is Null.
func (OptNilChatCompletionTokenLogprobArray) IsSet ¶
func (o OptNilChatCompletionTokenLogprobArray) IsSet() bool
IsSet returns true if OptNilChatCompletionTokenLogprobArray was set.
func (OptNilChatCompletionTokenLogprobArray) MarshalJSON ¶
func (s OptNilChatCompletionTokenLogprobArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilChatCompletionTokenLogprobArray) Or ¶
func (o OptNilChatCompletionTokenLogprobArray) Or(d []ChatCompletionTokenLogprob) []ChatCompletionTokenLogprob
Or returns value if set, or given parameter if does not.
func (*OptNilChatCompletionTokenLogprobArray) Reset ¶
func (o *OptNilChatCompletionTokenLogprobArray) Reset()
Reset unsets value.
func (*OptNilChatCompletionTokenLogprobArray) SetTo ¶
func (o *OptNilChatCompletionTokenLogprobArray) SetTo(v []ChatCompletionTokenLogprob)
SetTo sets value to v.
func (*OptNilChatCompletionTokenLogprobArray) SetToNull ¶
func (o *OptNilChatCompletionTokenLogprobArray) SetToNull()
SetToNull sets value to null.
func (*OptNilChatCompletionTokenLogprobArray) UnmarshalJSON ¶
func (s *OptNilChatCompletionTokenLogprobArray) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilCreateChatCompletionRequestLogitBias ¶
type OptNilCreateChatCompletionRequestLogitBias struct {
Value CreateChatCompletionRequestLogitBias
Set bool
Null bool
}
OptNilCreateChatCompletionRequestLogitBias is optional nullable CreateChatCompletionRequestLogitBias.
func NewOptNilCreateChatCompletionRequestLogitBias ¶
func NewOptNilCreateChatCompletionRequestLogitBias(v CreateChatCompletionRequestLogitBias) OptNilCreateChatCompletionRequestLogitBias
NewOptNilCreateChatCompletionRequestLogitBias returns new OptNilCreateChatCompletionRequestLogitBias with value set to v.
func (*OptNilCreateChatCompletionRequestLogitBias) Decode ¶
func (o *OptNilCreateChatCompletionRequestLogitBias) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequestLogitBias from json.
func (OptNilCreateChatCompletionRequestLogitBias) Encode ¶
func (o OptNilCreateChatCompletionRequestLogitBias) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionRequestLogitBias as json.
func (OptNilCreateChatCompletionRequestLogitBias) Get ¶
func (o OptNilCreateChatCompletionRequestLogitBias) Get() (v CreateChatCompletionRequestLogitBias, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateChatCompletionRequestLogitBias) IsEmpty ¶
func (o OptNilCreateChatCompletionRequestLogitBias) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilCreateChatCompletionRequestLogitBias) IsNull ¶
func (o OptNilCreateChatCompletionRequestLogitBias) IsNull() bool
IsNull returns true if value is Null.
func (OptNilCreateChatCompletionRequestLogitBias) IsSet ¶
func (o OptNilCreateChatCompletionRequestLogitBias) IsSet() bool
IsSet returns true if OptNilCreateChatCompletionRequestLogitBias was set.
func (OptNilCreateChatCompletionRequestLogitBias) MarshalJSON ¶
func (s OptNilCreateChatCompletionRequestLogitBias) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilCreateChatCompletionRequestLogitBias) Or ¶
func (o OptNilCreateChatCompletionRequestLogitBias) Or(d CreateChatCompletionRequestLogitBias) CreateChatCompletionRequestLogitBias
Or returns value if set, or given parameter if does not.
func (*OptNilCreateChatCompletionRequestLogitBias) Reset ¶
func (o *OptNilCreateChatCompletionRequestLogitBias) Reset()
Reset unsets value.
func (*OptNilCreateChatCompletionRequestLogitBias) SetTo ¶
func (o *OptNilCreateChatCompletionRequestLogitBias) SetTo(v CreateChatCompletionRequestLogitBias)
SetTo sets value to v.
func (*OptNilCreateChatCompletionRequestLogitBias) SetToNull ¶
func (o *OptNilCreateChatCompletionRequestLogitBias) SetToNull()
SetToNull sets value to null.
func (*OptNilCreateChatCompletionRequestLogitBias) UnmarshalJSON ¶
func (s *OptNilCreateChatCompletionRequestLogitBias) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilCreateChatCompletionRequestMetadata ¶
type OptNilCreateChatCompletionRequestMetadata struct {
Value CreateChatCompletionRequestMetadata
Set bool
Null bool
}
OptNilCreateChatCompletionRequestMetadata is optional nullable CreateChatCompletionRequestMetadata.
func NewOptNilCreateChatCompletionRequestMetadata ¶
func NewOptNilCreateChatCompletionRequestMetadata(v CreateChatCompletionRequestMetadata) OptNilCreateChatCompletionRequestMetadata
NewOptNilCreateChatCompletionRequestMetadata returns new OptNilCreateChatCompletionRequestMetadata with value set to v.
func (*OptNilCreateChatCompletionRequestMetadata) Decode ¶
func (o *OptNilCreateChatCompletionRequestMetadata) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequestMetadata from json.
func (OptNilCreateChatCompletionRequestMetadata) Encode ¶
func (o OptNilCreateChatCompletionRequestMetadata) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionRequestMetadata as json.
func (OptNilCreateChatCompletionRequestMetadata) Get ¶
func (o OptNilCreateChatCompletionRequestMetadata) Get() (v CreateChatCompletionRequestMetadata, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateChatCompletionRequestMetadata) IsEmpty ¶
func (o OptNilCreateChatCompletionRequestMetadata) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilCreateChatCompletionRequestMetadata) IsNull ¶
func (o OptNilCreateChatCompletionRequestMetadata) IsNull() bool
IsNull returns true if value is Null.
func (OptNilCreateChatCompletionRequestMetadata) IsSet ¶
func (o OptNilCreateChatCompletionRequestMetadata) IsSet() bool
IsSet returns true if OptNilCreateChatCompletionRequestMetadata was set.
func (OptNilCreateChatCompletionRequestMetadata) MarshalJSON ¶
func (s OptNilCreateChatCompletionRequestMetadata) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilCreateChatCompletionRequestMetadata) Or ¶
func (o OptNilCreateChatCompletionRequestMetadata) Or(d CreateChatCompletionRequestMetadata) CreateChatCompletionRequestMetadata
Or returns value if set, or given parameter if does not.
func (*OptNilCreateChatCompletionRequestMetadata) Reset ¶
func (o *OptNilCreateChatCompletionRequestMetadata) Reset()
Reset unsets value.
func (*OptNilCreateChatCompletionRequestMetadata) SetTo ¶
func (o *OptNilCreateChatCompletionRequestMetadata) SetTo(v CreateChatCompletionRequestMetadata)
SetTo sets value to v.
func (*OptNilCreateChatCompletionRequestMetadata) SetToNull ¶
func (o *OptNilCreateChatCompletionRequestMetadata) SetToNull()
SetToNull sets value to null.
func (*OptNilCreateChatCompletionRequestMetadata) UnmarshalJSON ¶
func (s *OptNilCreateChatCompletionRequestMetadata) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilCreateChatCompletionRequestStop ¶
type OptNilCreateChatCompletionRequestStop struct {
Value CreateChatCompletionRequestStop
Set bool
Null bool
}
OptNilCreateChatCompletionRequestStop is optional nullable CreateChatCompletionRequestStop.
func NewOptNilCreateChatCompletionRequestStop ¶
func NewOptNilCreateChatCompletionRequestStop(v CreateChatCompletionRequestStop) OptNilCreateChatCompletionRequestStop
NewOptNilCreateChatCompletionRequestStop returns new OptNilCreateChatCompletionRequestStop with value set to v.
func (*OptNilCreateChatCompletionRequestStop) Decode ¶
func (o *OptNilCreateChatCompletionRequestStop) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequestStop from json.
func (OptNilCreateChatCompletionRequestStop) Encode ¶
func (o OptNilCreateChatCompletionRequestStop) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionRequestStop as json.
func (OptNilCreateChatCompletionRequestStop) Get ¶
func (o OptNilCreateChatCompletionRequestStop) Get() (v CreateChatCompletionRequestStop, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateChatCompletionRequestStop) IsEmpty ¶
func (o OptNilCreateChatCompletionRequestStop) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilCreateChatCompletionRequestStop) IsNull ¶
func (o OptNilCreateChatCompletionRequestStop) IsNull() bool
IsNull returns true if value is Null.
func (OptNilCreateChatCompletionRequestStop) IsSet ¶
func (o OptNilCreateChatCompletionRequestStop) IsSet() bool
IsSet returns true if OptNilCreateChatCompletionRequestStop was set.
func (OptNilCreateChatCompletionRequestStop) MarshalJSON ¶
func (s OptNilCreateChatCompletionRequestStop) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilCreateChatCompletionRequestStop) Or ¶
func (o OptNilCreateChatCompletionRequestStop) Or(d CreateChatCompletionRequestStop) CreateChatCompletionRequestStop
Or returns value if set, or given parameter if does not.
func (*OptNilCreateChatCompletionRequestStop) Reset ¶
func (o *OptNilCreateChatCompletionRequestStop) Reset()
Reset unsets value.
func (*OptNilCreateChatCompletionRequestStop) SetTo ¶
func (o *OptNilCreateChatCompletionRequestStop) SetTo(v CreateChatCompletionRequestStop)
SetTo sets value to v.
func (*OptNilCreateChatCompletionRequestStop) SetToNull ¶
func (o *OptNilCreateChatCompletionRequestStop) SetToNull()
SetToNull sets value to null.
func (*OptNilCreateChatCompletionRequestStop) UnmarshalJSON ¶
func (s *OptNilCreateChatCompletionRequestStop) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilFloat64 ¶
OptNilFloat64 is optional nullable float64.
func NewOptNilFloat64 ¶
func NewOptNilFloat64(v float64) OptNilFloat64
NewOptNilFloat64 returns new OptNilFloat64 with value set to v.
func (*OptNilFloat64) Decode ¶
func (o *OptNilFloat64) Decode(d *jx.Decoder) error
Decode decodes float64 from json.
func (OptNilFloat64) Encode ¶
func (o OptNilFloat64) Encode(e *jx.Encoder)
Encode encodes float64 as json.
func (OptNilFloat64) Get ¶
func (o OptNilFloat64) Get() (v float64, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilFloat64) IsEmpty ¶
func (o OptNilFloat64) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilFloat64) IsNull ¶
func (o OptNilFloat64) IsNull() bool
IsNull returns true if value is Null.
func (OptNilFloat64) IsSet ¶
func (o OptNilFloat64) IsSet() bool
IsSet returns true if OptNilFloat64 was set.
func (OptNilFloat64) MarshalJSON ¶
func (s OptNilFloat64) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilFloat64) Or ¶
func (o OptNilFloat64) Or(d float64) float64
Or returns value if set, or given parameter if does not.
func (*OptNilFloat64) UnmarshalJSON ¶
func (s *OptNilFloat64) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilInt ¶
OptNilInt is optional nullable int.
func NewOptNilInt ¶
NewOptNilInt returns new OptNilInt with value set to v.
func (OptNilInt) IsEmpty ¶
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptNilInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilString ¶
OptNilString is optional nullable string.
func NewOptNilString ¶
func NewOptNilString(v string) OptNilString
NewOptNilString returns new OptNilString with value set to v.
func (*OptNilString) Decode ¶
func (o *OptNilString) Decode(d *jx.Decoder) error
Decode decodes string from json.
func (OptNilString) Encode ¶
func (o OptNilString) Encode(e *jx.Encoder)
Encode encodes string as json.
func (OptNilString) Get ¶
func (o OptNilString) Get() (v string, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilString) IsEmpty ¶
func (o OptNilString) IsEmpty() bool
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilString) IsNull ¶
func (o OptNilString) IsNull() bool
IsNull returns true if value is Null.
func (OptNilString) IsSet ¶
func (o OptNilString) IsSet() bool
IsSet returns true if OptNilString was set.
func (OptNilString) MarshalJSON ¶
func (s OptNilString) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilString) Or ¶
func (o OptNilString) Or(d string) string
Or returns value if set, or given parameter if does not.
func (*OptNilString) UnmarshalJSON ¶
func (s *OptNilString) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptResponseFormat ¶
type OptResponseFormat struct {
Value ResponseFormat
Set bool
}
OptResponseFormat is optional ResponseFormat.
func NewOptResponseFormat ¶
func NewOptResponseFormat(v ResponseFormat) OptResponseFormat
NewOptResponseFormat returns new OptResponseFormat with value set to v.
func (*OptResponseFormat) Decode ¶
func (o *OptResponseFormat) Decode(d *jx.Decoder) error
Decode decodes ResponseFormat from json.
func (OptResponseFormat) Encode ¶
func (o OptResponseFormat) Encode(e *jx.Encoder)
Encode encodes ResponseFormat as json.
func (OptResponseFormat) Get ¶
func (o OptResponseFormat) Get() (v ResponseFormat, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptResponseFormat) IsSet ¶
func (o OptResponseFormat) IsSet() bool
IsSet returns true if OptResponseFormat was set.
func (OptResponseFormat) MarshalJSON ¶
func (s OptResponseFormat) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptResponseFormat) Or ¶
func (o OptResponseFormat) Or(d ResponseFormat) ResponseFormat
Or returns value if set, or given parameter if does not.
func (*OptResponseFormat) SetTo ¶
func (o *OptResponseFormat) SetTo(v ResponseFormat)
SetTo sets value to v.
func (*OptResponseFormat) UnmarshalJSON ¶
func (s *OptResponseFormat) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptResponseFormatJSONSchema ¶
type OptResponseFormatJSONSchema struct {
Value ResponseFormatJSONSchema
Set bool
}
OptResponseFormatJSONSchema is optional ResponseFormatJSONSchema.
func NewOptResponseFormatJSONSchema ¶
func NewOptResponseFormatJSONSchema(v ResponseFormatJSONSchema) OptResponseFormatJSONSchema
NewOptResponseFormatJSONSchema returns new OptResponseFormatJSONSchema with value set to v.
func (*OptResponseFormatJSONSchema) Decode ¶
func (o *OptResponseFormatJSONSchema) Decode(d *jx.Decoder) error
Decode decodes ResponseFormatJSONSchema from json.
func (OptResponseFormatJSONSchema) Encode ¶
func (o OptResponseFormatJSONSchema) Encode(e *jx.Encoder)
Encode encodes ResponseFormatJSONSchema as json.
func (OptResponseFormatJSONSchema) Get ¶
func (o OptResponseFormatJSONSchema) Get() (v ResponseFormatJSONSchema, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptResponseFormatJSONSchema) IsSet ¶
func (o OptResponseFormatJSONSchema) IsSet() bool
IsSet returns true if OptResponseFormatJSONSchema was set.
func (OptResponseFormatJSONSchema) MarshalJSON ¶
func (s OptResponseFormatJSONSchema) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*OptResponseFormatJSONSchema) Reset ¶
func (o *OptResponseFormatJSONSchema) Reset()
Reset unsets value.
func (*OptResponseFormatJSONSchema) SetTo ¶
func (o *OptResponseFormatJSONSchema) SetTo(v ResponseFormatJSONSchema)
SetTo sets value to v.
func (*OptResponseFormatJSONSchema) UnmarshalJSON ¶
func (s *OptResponseFormatJSONSchema) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptResponseFormatType ¶
type OptResponseFormatType struct {
Value ResponseFormatType
Set bool
}
OptResponseFormatType is optional ResponseFormatType.
func NewOptResponseFormatType ¶
func NewOptResponseFormatType(v ResponseFormatType) OptResponseFormatType
NewOptResponseFormatType returns new OptResponseFormatType with value set to v.
func (*OptResponseFormatType) Decode ¶
func (o *OptResponseFormatType) Decode(d *jx.Decoder) error
Decode decodes ResponseFormatType from json.
func (OptResponseFormatType) Encode ¶
func (o OptResponseFormatType) Encode(e *jx.Encoder)
Encode encodes ResponseFormatType as json.
func (OptResponseFormatType) Get ¶
func (o OptResponseFormatType) Get() (v ResponseFormatType, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptResponseFormatType) IsSet ¶
func (o OptResponseFormatType) IsSet() bool
IsSet returns true if OptResponseFormatType was set.
func (OptResponseFormatType) MarshalJSON ¶
func (s OptResponseFormatType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptResponseFormatType) Or ¶
func (o OptResponseFormatType) Or(d ResponseFormatType) ResponseFormatType
Or returns value if set, or given parameter if does not.
func (*OptResponseFormatType) SetTo ¶
func (o *OptResponseFormatType) SetTo(v ResponseFormatType)
SetTo sets value to v.
func (*OptResponseFormatType) UnmarshalJSON ¶
func (s *OptResponseFormatType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface {
ServerOption
ClientOption
}
Option is config option.
func WithAttributes ¶
WithAttributes specifies default otel attributes.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type ResponseFormat ¶
type ResponseFormat struct {
Type OptResponseFormatType `json:"type"`
JSONSchema OptResponseFormatJSONSchema `json:"json_schema"`
}
Ref: #/components/schemas/ResponseFormat
func (*ResponseFormat) Decode ¶
func (s *ResponseFormat) Decode(d *jx.Decoder) error
Decode decodes ResponseFormat from json.
func (*ResponseFormat) Encode ¶
func (s *ResponseFormat) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ResponseFormat) GetJSONSchema ¶
func (s *ResponseFormat) GetJSONSchema() OptResponseFormatJSONSchema
GetJSONSchema returns the value of JSONSchema.
func (*ResponseFormat) GetType ¶
func (s *ResponseFormat) GetType() OptResponseFormatType
GetType returns the value of Type.
func (*ResponseFormat) MarshalJSON ¶
func (s *ResponseFormat) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ResponseFormat) SetJSONSchema ¶
func (s *ResponseFormat) SetJSONSchema(val OptResponseFormatJSONSchema)
SetJSONSchema sets the value of JSONSchema.
func (*ResponseFormat) SetType ¶
func (s *ResponseFormat) SetType(val OptResponseFormatType)
SetType sets the value of Type.
func (*ResponseFormat) UnmarshalJSON ¶
func (s *ResponseFormat) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ResponseFormat) Validate ¶
func (s *ResponseFormat) Validate() error
type ResponseFormatJSONSchema ¶
type ResponseFormatJSONSchema struct {
Name OptString `json:"name"`
Description OptString `json:"description"`
Schema *ResponseFormatJSONSchemaSchema `json:"schema"`
Strict OptBool `json:"strict"`
}
func (*ResponseFormatJSONSchema) Decode ¶
func (s *ResponseFormatJSONSchema) Decode(d *jx.Decoder) error
Decode decodes ResponseFormatJSONSchema from json.
func (*ResponseFormatJSONSchema) Encode ¶
func (s *ResponseFormatJSONSchema) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ResponseFormatJSONSchema) GetDescription ¶
func (s *ResponseFormatJSONSchema) GetDescription() OptString
GetDescription returns the value of Description.
func (*ResponseFormatJSONSchema) GetName ¶
func (s *ResponseFormatJSONSchema) GetName() OptString
GetName returns the value of Name.
func (*ResponseFormatJSONSchema) GetSchema ¶
func (s *ResponseFormatJSONSchema) GetSchema() *ResponseFormatJSONSchemaSchema
GetSchema returns the value of Schema.
func (*ResponseFormatJSONSchema) GetStrict ¶
func (s *ResponseFormatJSONSchema) GetStrict() OptBool
GetStrict returns the value of Strict.
func (*ResponseFormatJSONSchema) MarshalJSON ¶
func (s *ResponseFormatJSONSchema) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ResponseFormatJSONSchema) SetDescription ¶
func (s *ResponseFormatJSONSchema) SetDescription(val OptString)
SetDescription sets the value of Description.
func (*ResponseFormatJSONSchema) SetName ¶
func (s *ResponseFormatJSONSchema) SetName(val OptString)
SetName sets the value of Name.
func (*ResponseFormatJSONSchema) SetSchema ¶
func (s *ResponseFormatJSONSchema) SetSchema(val *ResponseFormatJSONSchemaSchema)
SetSchema sets the value of Schema.
func (*ResponseFormatJSONSchema) SetStrict ¶
func (s *ResponseFormatJSONSchema) SetStrict(val OptBool)
SetStrict sets the value of Strict.
func (*ResponseFormatJSONSchema) UnmarshalJSON ¶
func (s *ResponseFormatJSONSchema) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ResponseFormatJSONSchemaSchema ¶
type ResponseFormatJSONSchemaSchema struct{}
func (*ResponseFormatJSONSchemaSchema) Decode ¶
func (s *ResponseFormatJSONSchemaSchema) Decode(d *jx.Decoder) error
Decode decodes ResponseFormatJSONSchemaSchema from json.
func (*ResponseFormatJSONSchemaSchema) Encode ¶
func (s *ResponseFormatJSONSchemaSchema) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ResponseFormatJSONSchemaSchema) MarshalJSON ¶
func (s *ResponseFormatJSONSchemaSchema) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ResponseFormatJSONSchemaSchema) UnmarshalJSON ¶
func (s *ResponseFormatJSONSchemaSchema) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ResponseFormatType ¶
type ResponseFormatType string
const ( ResponseFormatTypeText ResponseFormatType = "text" ResponseFormatTypeJSONObject ResponseFormatType = "json_object" ResponseFormatTypeJSONSchema ResponseFormatType = "json_schema" )
func (ResponseFormatType) AllValues ¶
func (ResponseFormatType) AllValues() []ResponseFormatType
AllValues returns all ResponseFormatType values.
func (*ResponseFormatType) Decode ¶
func (s *ResponseFormatType) Decode(d *jx.Decoder) error
Decode decodes ResponseFormatType from json.
func (ResponseFormatType) Encode ¶
func (s ResponseFormatType) Encode(e *jx.Encoder)
Encode encodes ResponseFormatType as json.
func (ResponseFormatType) MarshalJSON ¶
func (s ResponseFormatType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ResponseFormatType) MarshalText ¶
func (s ResponseFormatType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ResponseFormatType) UnmarshalJSON ¶
func (s *ResponseFormatType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ResponseFormatType) UnmarshalText ¶
func (s *ResponseFormatType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ResponseFormatType) Validate ¶
func (s ResponseFormatType) Validate() error
type RetrieveModelParams ¶
type RetrieveModelParams struct {
// The ID of the model to retrieve.
Model string
}
RetrieveModelParams is parameters of retrieveModel operation.
type RetrieveModelRes ¶
type RetrieveModelRes interface {
// contains filtered or unexported methods
}
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationGroup ¶
OperationGroup returns the x-ogen-operation-group value.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type SecurityHandler ¶
type SecurityHandler interface {
// HandleBearerAuth handles BearerAuth security.
HandleBearerAuth(ctx context.Context, operationName OperationName, t BearerAuth) (context.Context, error)
}
SecurityHandler is handler for security parameters.
type SecuritySource ¶
type SecuritySource interface {
// BearerAuth provides BearerAuth security value.
BearerAuth(ctx context.Context, operationName OperationName) (BearerAuth, error)
}
SecuritySource is provider of security values (tokens, passwords, etc.).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) CreateChatCompletion ¶
func (UnimplementedHandler) CreateChatCompletion(ctx context.Context, req *CreateChatCompletionRequest) (r CreateChatCompletionRes, _ error)
CreateChatCompletion implements createChatCompletion operation.
Creates a model response for the given chat conversation.
POST /chat/completions
func (UnimplementedHandler) ListModels ¶
func (UnimplementedHandler) ListModels(ctx context.Context) (r *ListModelsResponse, _ error)
ListModels implements listModels operation.
Lists the currently available models.
GET /models
func (UnimplementedHandler) RetrieveModel ¶
func (UnimplementedHandler) RetrieveModel(ctx context.Context, params RetrieveModelParams) (r RetrieveModelRes, _ error)
RetrieveModel implements retrieveModel operation.
Retrieves a model instance.
GET /models/{model}
Source Files
¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_defaults_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_labeler_gen.go
- oas_middleware_gen.go
- oas_operations_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_security_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go