Documentation ¶
Index ¶
- func NewBearerAuthClient(serverURL, token string) (*bearerAuthClient, error)
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type CancelFineTuneParams
- type ChatCompletionRequestMessage
- func (s *ChatCompletionRequestMessage) Decode(d *jx.Decoder) error
- func (s *ChatCompletionRequestMessage) Encode(e *jx.Encoder)
- func (s *ChatCompletionRequestMessage) GetContent() string
- func (s *ChatCompletionRequestMessage) GetName() OptString
- func (s *ChatCompletionRequestMessage) GetRole() ChatCompletionRequestMessageRole
- func (s *ChatCompletionRequestMessage) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionRequestMessage) SetContent(val string)
- func (s *ChatCompletionRequestMessage) SetName(val OptString)
- func (s *ChatCompletionRequestMessage) SetRole(val ChatCompletionRequestMessageRole)
- func (s *ChatCompletionRequestMessage) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionRequestMessage) Validate() error
- type ChatCompletionRequestMessageRole
- func (s *ChatCompletionRequestMessageRole) Decode(d *jx.Decoder) error
- func (s ChatCompletionRequestMessageRole) Encode(e *jx.Encoder)
- func (s ChatCompletionRequestMessageRole) MarshalJSON() ([]byte, error)
- func (s ChatCompletionRequestMessageRole) MarshalText() ([]byte, error)
- func (s *ChatCompletionRequestMessageRole) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionRequestMessageRole) UnmarshalText(data []byte) error
- func (s ChatCompletionRequestMessageRole) Validate() error
- type ChatCompletionResponseMessage
- func (s *ChatCompletionResponseMessage) Decode(d *jx.Decoder) error
- func (s *ChatCompletionResponseMessage) Encode(e *jx.Encoder)
- func (s *ChatCompletionResponseMessage) GetContent() string
- func (s *ChatCompletionResponseMessage) GetRole() ChatCompletionResponseMessageRole
- func (s *ChatCompletionResponseMessage) MarshalJSON() ([]byte, error)
- func (s *ChatCompletionResponseMessage) SetContent(val string)
- func (s *ChatCompletionResponseMessage) SetRole(val ChatCompletionResponseMessageRole)
- func (s *ChatCompletionResponseMessage) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionResponseMessage) Validate() error
- type ChatCompletionResponseMessageRole
- func (s *ChatCompletionResponseMessageRole) Decode(d *jx.Decoder) error
- func (s ChatCompletionResponseMessageRole) Encode(e *jx.Encoder)
- func (s ChatCompletionResponseMessageRole) MarshalJSON() ([]byte, error)
- func (s ChatCompletionResponseMessageRole) MarshalText() ([]byte, error)
- func (s *ChatCompletionResponseMessageRole) UnmarshalJSON(data []byte) error
- func (s *ChatCompletionResponseMessageRole) UnmarshalText(data []byte) error
- func (s ChatCompletionResponseMessageRole) Validate() error
- type Client
- func (c *Client) CancelFineTune(ctx context.Context, params CancelFineTuneParams) (FineTune, error)
- func (c *Client) CreateChatCompletion(ctx context.Context, request *CreateChatCompletionRequest) (*CreateChatCompletionResponse, error)
- func (c *Client) CreateEdit(ctx context.Context, request *CreateEditRequest) (*CreateEditResponse, error)
- func (c *Client) CreateFineTune(ctx context.Context, request *CreateFineTuneRequest) (FineTune, error)
- func (c *Client) CreateImage(ctx context.Context, request *CreateImageRequest) (ImagesResponse, error)
- func (c *Client) CreateImageEdit(ctx context.Context, request *CreateImageEditRequestForm) (ImagesResponse, error)
- func (c *Client) CreateImageVariation(ctx context.Context, request *CreateImageVariationRequestForm) (ImagesResponse, error)
- func (c *Client) CreateModeration(ctx context.Context, request *CreateModerationRequest) (*CreateModerationResponse, error)
- func (c *Client) DeleteFile(ctx context.Context, params DeleteFileParams) (*DeleteFileResponse, error)
- func (c *Client) DeleteModel(ctx context.Context, params DeleteModelParams) (*DeleteModelResponse, error)
- func (c *Client) DownloadFile(ctx context.Context, params DownloadFileParams) (string, error)
- func (c *Client) ListFiles(ctx context.Context) (*ListFilesResponse, error)
- func (c *Client) ListFineTuneEvents(ctx context.Context, params ListFineTuneEventsParams) (*ListFineTuneEventsResponse, error)
- func (c *Client) ListFineTunes(ctx context.Context) (*ListFineTunesResponse, error)
- func (c *Client) ListModels(ctx context.Context) (*ListModelsResponse, error)
- func (c *Client) RetrieveFile(ctx context.Context, params RetrieveFileParams) (OpenAIFile, error)
- func (c *Client) RetrieveFineTune(ctx context.Context, params RetrieveFineTuneParams) (FineTune, error)
- func (c *Client) RetrieveModel(ctx context.Context, params RetrieveModelParams) (Model, error)
- type ClientOption
- 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() OptCreateChatCompletionRequestLogitBias
- func (s *CreateChatCompletionRequest) GetMaxTokens() OptInt
- func (s *CreateChatCompletionRequest) GetMessages() []ChatCompletionRequestMessage
- func (s *CreateChatCompletionRequest) GetModel() string
- func (s *CreateChatCompletionRequest) GetN() OptNilInt
- func (s *CreateChatCompletionRequest) GetPresencePenalty() OptNilFloat64
- func (s *CreateChatCompletionRequest) GetStop() OptCreateChatCompletionRequestStop
- func (s *CreateChatCompletionRequest) GetStream() OptNilBool
- func (s *CreateChatCompletionRequest) GetTemperature() OptNilFloat64
- 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 OptCreateChatCompletionRequestLogitBias)
- func (s *CreateChatCompletionRequest) SetMaxTokens(val OptInt)
- func (s *CreateChatCompletionRequest) SetMessages(val []ChatCompletionRequestMessage)
- func (s *CreateChatCompletionRequest) SetModel(val string)
- func (s *CreateChatCompletionRequest) SetN(val OptNilInt)
- func (s *CreateChatCompletionRequest) SetPresencePenalty(val OptNilFloat64)
- func (s *CreateChatCompletionRequest) SetStop(val OptCreateChatCompletionRequestStop)
- func (s *CreateChatCompletionRequest) SetStream(val OptNilBool)
- func (s *CreateChatCompletionRequest) SetTemperature(val OptNilFloat64)
- 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
- func (s *CreateChatCompletionRequestLogitBias) Decode(d *jx.Decoder) error
- func (s *CreateChatCompletionRequestLogitBias) Encode(e *jx.Encoder)
- func (s *CreateChatCompletionRequestLogitBias) MarshalJSON() ([]byte, error)
- func (s *CreateChatCompletionRequestLogitBias) UnmarshalJSON(data []byte) error
- type CreateChatCompletionRequestStop
- func (s *CreateChatCompletionRequestStop) Decode(d *jx.Decoder) error
- func (s CreateChatCompletionRequestStop) Encode(e *jx.Encoder)
- func (s CreateChatCompletionRequestStop) GetNull() (v struct{}, ok bool)
- func (s CreateChatCompletionRequestStop) GetString() (v string, ok bool)
- func (s CreateChatCompletionRequestStop) GetStringArray() (v []string, ok bool)
- func (s CreateChatCompletionRequestStop) IsNull() bool
- func (s CreateChatCompletionRequestStop) IsString() bool
- func (s CreateChatCompletionRequestStop) IsStringArray() bool
- func (s CreateChatCompletionRequestStop) MarshalJSON() ([]byte, error)
- func (s *CreateChatCompletionRequestStop) SetNull(v struct{})
- 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 CreateChatCompletionResponse
- func (s *CreateChatCompletionResponse) Decode(d *jx.Decoder) error
- func (s *CreateChatCompletionResponse) Encode(e *jx.Encoder)
- func (s *CreateChatCompletionResponse) GetChoices() []CreateChatCompletionResponseChoicesItem
- func (s *CreateChatCompletionResponse) GetCreated() int
- func (s *CreateChatCompletionResponse) GetID() string
- func (s *CreateChatCompletionResponse) GetModel() string
- func (s *CreateChatCompletionResponse) GetObject() string
- func (s *CreateChatCompletionResponse) GetUsage() OptCreateChatCompletionResponseUsage
- func (s *CreateChatCompletionResponse) MarshalJSON() ([]byte, error)
- func (s *CreateChatCompletionResponse) SetChoices(val []CreateChatCompletionResponseChoicesItem)
- func (s *CreateChatCompletionResponse) SetCreated(val int)
- func (s *CreateChatCompletionResponse) SetID(val string)
- func (s *CreateChatCompletionResponse) SetModel(val string)
- func (s *CreateChatCompletionResponse) SetObject(val string)
- func (s *CreateChatCompletionResponse) SetUsage(val OptCreateChatCompletionResponseUsage)
- func (s *CreateChatCompletionResponse) UnmarshalJSON(data []byte) error
- func (s *CreateChatCompletionResponse) Validate() error
- type CreateChatCompletionResponseChoicesItem
- func (s *CreateChatCompletionResponseChoicesItem) Decode(d *jx.Decoder) error
- func (s *CreateChatCompletionResponseChoicesItem) Encode(e *jx.Encoder)
- func (s *CreateChatCompletionResponseChoicesItem) GetFinishReason() OptString
- func (s *CreateChatCompletionResponseChoicesItem) GetIndex() OptInt
- func (s *CreateChatCompletionResponseChoicesItem) GetMessage() OptChatCompletionResponseMessage
- func (s *CreateChatCompletionResponseChoicesItem) MarshalJSON() ([]byte, error)
- func (s *CreateChatCompletionResponseChoicesItem) SetFinishReason(val OptString)
- func (s *CreateChatCompletionResponseChoicesItem) SetIndex(val OptInt)
- func (s *CreateChatCompletionResponseChoicesItem) SetMessage(val OptChatCompletionResponseMessage)
- func (s *CreateChatCompletionResponseChoicesItem) UnmarshalJSON(data []byte) error
- func (s *CreateChatCompletionResponseChoicesItem) Validate() error
- type CreateChatCompletionResponseUsage
- func (s *CreateChatCompletionResponseUsage) Decode(d *jx.Decoder) error
- func (s *CreateChatCompletionResponseUsage) Encode(e *jx.Encoder)
- func (s *CreateChatCompletionResponseUsage) GetCompletionTokens() int
- func (s *CreateChatCompletionResponseUsage) GetPromptTokens() int
- func (s *CreateChatCompletionResponseUsage) GetTotalTokens() int
- func (s *CreateChatCompletionResponseUsage) MarshalJSON() ([]byte, error)
- func (s *CreateChatCompletionResponseUsage) SetCompletionTokens(val int)
- func (s *CreateChatCompletionResponseUsage) SetPromptTokens(val int)
- func (s *CreateChatCompletionResponseUsage) SetTotalTokens(val int)
- func (s *CreateChatCompletionResponseUsage) UnmarshalJSON(data []byte) error
- type CreateEditRequest
- func (s *CreateEditRequest) Decode(d *jx.Decoder) error
- func (s *CreateEditRequest) Encode(e *jx.Encoder)
- func (s *CreateEditRequest) GetInput() OptNilString
- func (s *CreateEditRequest) GetInstruction() string
- func (s *CreateEditRequest) GetModel() string
- func (s *CreateEditRequest) GetN() OptNilInt
- func (s *CreateEditRequest) GetTemperature() OptNilFloat64
- func (s *CreateEditRequest) GetTopP() OptNilFloat64
- func (s *CreateEditRequest) MarshalJSON() ([]byte, error)
- func (s *CreateEditRequest) SetInput(val OptNilString)
- func (s *CreateEditRequest) SetInstruction(val string)
- func (s *CreateEditRequest) SetModel(val string)
- func (s *CreateEditRequest) SetN(val OptNilInt)
- func (s *CreateEditRequest) SetTemperature(val OptNilFloat64)
- func (s *CreateEditRequest) SetTopP(val OptNilFloat64)
- func (s *CreateEditRequest) UnmarshalJSON(data []byte) error
- func (s *CreateEditRequest) Validate() error
- type CreateEditResponse
- func (s *CreateEditResponse) Decode(d *jx.Decoder) error
- func (s *CreateEditResponse) Encode(e *jx.Encoder)
- func (s *CreateEditResponse) GetChoices() []CreateEditResponseChoicesItem
- func (s *CreateEditResponse) GetCreated() int
- func (s *CreateEditResponse) GetObject() string
- func (s *CreateEditResponse) GetUsage() CreateEditResponseUsage
- func (s *CreateEditResponse) MarshalJSON() ([]byte, error)
- func (s *CreateEditResponse) SetChoices(val []CreateEditResponseChoicesItem)
- func (s *CreateEditResponse) SetCreated(val int)
- func (s *CreateEditResponse) SetObject(val string)
- func (s *CreateEditResponse) SetUsage(val CreateEditResponseUsage)
- func (s *CreateEditResponse) UnmarshalJSON(data []byte) error
- func (s *CreateEditResponse) Validate() error
- type CreateEditResponseChoicesItem
- func (s *CreateEditResponseChoicesItem) Decode(d *jx.Decoder) error
- func (s *CreateEditResponseChoicesItem) Encode(e *jx.Encoder)
- func (s *CreateEditResponseChoicesItem) GetFinishReason() OptString
- func (s *CreateEditResponseChoicesItem) GetIndex() OptInt
- func (s *CreateEditResponseChoicesItem) GetLogprobs() OptNilCreateEditResponseChoicesItemLogprobs
- func (s *CreateEditResponseChoicesItem) GetText() OptString
- func (s *CreateEditResponseChoicesItem) MarshalJSON() ([]byte, error)
- func (s *CreateEditResponseChoicesItem) SetFinishReason(val OptString)
- func (s *CreateEditResponseChoicesItem) SetIndex(val OptInt)
- func (s *CreateEditResponseChoicesItem) SetLogprobs(val OptNilCreateEditResponseChoicesItemLogprobs)
- func (s *CreateEditResponseChoicesItem) SetText(val OptString)
- func (s *CreateEditResponseChoicesItem) UnmarshalJSON(data []byte) error
- func (s *CreateEditResponseChoicesItem) Validate() error
- type CreateEditResponseChoicesItemLogprobs
- func (s *CreateEditResponseChoicesItemLogprobs) Decode(d *jx.Decoder) error
- func (s *CreateEditResponseChoicesItemLogprobs) Encode(e *jx.Encoder)
- func (s *CreateEditResponseChoicesItemLogprobs) GetTextOffset() []int
- func (s *CreateEditResponseChoicesItemLogprobs) GetTokenLogprobs() []float64
- func (s *CreateEditResponseChoicesItemLogprobs) GetTokens() []string
- func (s *CreateEditResponseChoicesItemLogprobs) GetTopLogprobs() []CreateEditResponseChoicesItemLogprobsTopLogprobsItem
- func (s *CreateEditResponseChoicesItemLogprobs) MarshalJSON() ([]byte, error)
- func (s *CreateEditResponseChoicesItemLogprobs) SetTextOffset(val []int)
- func (s *CreateEditResponseChoicesItemLogprobs) SetTokenLogprobs(val []float64)
- func (s *CreateEditResponseChoicesItemLogprobs) SetTokens(val []string)
- func (s *CreateEditResponseChoicesItemLogprobs) SetTopLogprobs(val []CreateEditResponseChoicesItemLogprobsTopLogprobsItem)
- func (s *CreateEditResponseChoicesItemLogprobs) UnmarshalJSON(data []byte) error
- func (s *CreateEditResponseChoicesItemLogprobs) Validate() error
- type CreateEditResponseChoicesItemLogprobsTopLogprobsItem
- func (s *CreateEditResponseChoicesItemLogprobsTopLogprobsItem) Decode(d *jx.Decoder) error
- func (s *CreateEditResponseChoicesItemLogprobsTopLogprobsItem) Encode(e *jx.Encoder)
- func (s *CreateEditResponseChoicesItemLogprobsTopLogprobsItem) MarshalJSON() ([]byte, error)
- func (s *CreateEditResponseChoicesItemLogprobsTopLogprobsItem) UnmarshalJSON(data []byte) error
- type CreateEditResponseUsage
- func (s *CreateEditResponseUsage) Decode(d *jx.Decoder) error
- func (s *CreateEditResponseUsage) Encode(e *jx.Encoder)
- func (s *CreateEditResponseUsage) GetCompletionTokens() int
- func (s *CreateEditResponseUsage) GetPromptTokens() int
- func (s *CreateEditResponseUsage) GetTotalTokens() int
- func (s *CreateEditResponseUsage) MarshalJSON() ([]byte, error)
- func (s *CreateEditResponseUsage) SetCompletionTokens(val int)
- func (s *CreateEditResponseUsage) SetPromptTokens(val int)
- func (s *CreateEditResponseUsage) SetTotalTokens(val int)
- func (s *CreateEditResponseUsage) UnmarshalJSON(data []byte) error
- type CreateFineTuneRequest
- func (s *CreateFineTuneRequest) Decode(d *jx.Decoder) error
- func (s *CreateFineTuneRequest) Encode(e *jx.Encoder)
- func (s *CreateFineTuneRequest) GetBatchSize() OptNilInt
- func (s *CreateFineTuneRequest) GetClassificationBetas() OptNilFloat64Array
- func (s *CreateFineTuneRequest) GetClassificationNClasses() OptNilInt
- func (s *CreateFineTuneRequest) GetClassificationPositiveClass() OptNilString
- func (s *CreateFineTuneRequest) GetComputeClassificationMetrics() OptNilBool
- func (s *CreateFineTuneRequest) GetLearningRateMultiplier() OptNilFloat64
- func (s *CreateFineTuneRequest) GetModel() OptNilString
- func (s *CreateFineTuneRequest) GetNEpochs() OptNilInt
- func (s *CreateFineTuneRequest) GetPromptLossWeight() OptNilFloat64
- func (s *CreateFineTuneRequest) GetSuffix() OptNilString
- func (s *CreateFineTuneRequest) GetTrainingFile() string
- func (s *CreateFineTuneRequest) GetValidationFile() OptNilString
- func (s *CreateFineTuneRequest) MarshalJSON() ([]byte, error)
- func (s *CreateFineTuneRequest) SetBatchSize(val OptNilInt)
- func (s *CreateFineTuneRequest) SetClassificationBetas(val OptNilFloat64Array)
- func (s *CreateFineTuneRequest) SetClassificationNClasses(val OptNilInt)
- func (s *CreateFineTuneRequest) SetClassificationPositiveClass(val OptNilString)
- func (s *CreateFineTuneRequest) SetComputeClassificationMetrics(val OptNilBool)
- func (s *CreateFineTuneRequest) SetLearningRateMultiplier(val OptNilFloat64)
- func (s *CreateFineTuneRequest) SetModel(val OptNilString)
- func (s *CreateFineTuneRequest) SetNEpochs(val OptNilInt)
- func (s *CreateFineTuneRequest) SetPromptLossWeight(val OptNilFloat64)
- func (s *CreateFineTuneRequest) SetSuffix(val OptNilString)
- func (s *CreateFineTuneRequest) SetTrainingFile(val string)
- func (s *CreateFineTuneRequest) SetValidationFile(val OptNilString)
- func (s *CreateFineTuneRequest) UnmarshalJSON(data []byte) error
- func (s *CreateFineTuneRequest) Validate() error
- type CreateImageEditRequest
- func (s *CreateImageEditRequest) GetImage() string
- func (s *CreateImageEditRequest) GetMask() OptString
- func (s *CreateImageEditRequest) GetN() OptNilInt
- func (s *CreateImageEditRequest) GetPrompt() string
- func (s *CreateImageEditRequest) GetResponseFormat() OptNilCreateImageEditRequestResponseFormat
- func (s *CreateImageEditRequest) GetSize() OptNilCreateImageEditRequestSize
- func (s *CreateImageEditRequest) GetUser() OptString
- func (s *CreateImageEditRequest) SetImage(val string)
- func (s *CreateImageEditRequest) SetMask(val OptString)
- func (s *CreateImageEditRequest) SetN(val OptNilInt)
- func (s *CreateImageEditRequest) SetPrompt(val string)
- func (s *CreateImageEditRequest) SetResponseFormat(val OptNilCreateImageEditRequestResponseFormat)
- func (s *CreateImageEditRequest) SetSize(val OptNilCreateImageEditRequestSize)
- func (s *CreateImageEditRequest) SetUser(val OptString)
- func (s *CreateImageEditRequest) Validate() error
- type CreateImageEditRequestForm
- func (s *CreateImageEditRequestForm) GetImage() ht.MultipartFile
- func (s *CreateImageEditRequestForm) GetMask() OptMultipartFile
- func (s *CreateImageEditRequestForm) GetN() OptNilInt
- func (s *CreateImageEditRequestForm) GetPrompt() string
- func (s *CreateImageEditRequestForm) GetResponseFormat() OptNilCreateImageEditRequestResponseFormat
- func (s *CreateImageEditRequestForm) GetSize() OptNilCreateImageEditRequestSize
- func (s *CreateImageEditRequestForm) GetUser() OptString
- func (s *CreateImageEditRequestForm) SetImage(val ht.MultipartFile)
- func (s *CreateImageEditRequestForm) SetMask(val OptMultipartFile)
- func (s *CreateImageEditRequestForm) SetN(val OptNilInt)
- func (s *CreateImageEditRequestForm) SetPrompt(val string)
- func (s *CreateImageEditRequestForm) SetResponseFormat(val OptNilCreateImageEditRequestResponseFormat)
- func (s *CreateImageEditRequestForm) SetSize(val OptNilCreateImageEditRequestSize)
- func (s *CreateImageEditRequestForm) SetUser(val OptString)
- func (s *CreateImageEditRequestForm) Validate() error
- type CreateImageEditRequestResponseFormat
- type CreateImageEditRequestSize
- type CreateImageRequest
- func (s *CreateImageRequest) Decode(d *jx.Decoder) error
- func (s *CreateImageRequest) Encode(e *jx.Encoder)
- func (s *CreateImageRequest) GetN() OptNilInt
- func (s *CreateImageRequest) GetPrompt() string
- func (s *CreateImageRequest) GetResponseFormat() OptNilCreateImageRequestResponseFormat
- func (s *CreateImageRequest) GetSize() OptNilCreateImageRequestSize
- func (s *CreateImageRequest) GetUser() OptString
- func (s *CreateImageRequest) MarshalJSON() ([]byte, error)
- func (s *CreateImageRequest) SetN(val OptNilInt)
- func (s *CreateImageRequest) SetPrompt(val string)
- func (s *CreateImageRequest) SetResponseFormat(val OptNilCreateImageRequestResponseFormat)
- func (s *CreateImageRequest) SetSize(val OptNilCreateImageRequestSize)
- func (s *CreateImageRequest) SetUser(val OptString)
- func (s *CreateImageRequest) UnmarshalJSON(data []byte) error
- func (s *CreateImageRequest) Validate() error
- type CreateImageRequestResponseFormat
- func (s *CreateImageRequestResponseFormat) Decode(d *jx.Decoder) error
- func (s CreateImageRequestResponseFormat) Encode(e *jx.Encoder)
- func (s CreateImageRequestResponseFormat) MarshalJSON() ([]byte, error)
- func (s CreateImageRequestResponseFormat) MarshalText() ([]byte, error)
- func (s *CreateImageRequestResponseFormat) UnmarshalJSON(data []byte) error
- func (s *CreateImageRequestResponseFormat) UnmarshalText(data []byte) error
- func (s CreateImageRequestResponseFormat) Validate() error
- type CreateImageRequestSize
- func (s *CreateImageRequestSize) Decode(d *jx.Decoder) error
- func (s CreateImageRequestSize) Encode(e *jx.Encoder)
- func (s CreateImageRequestSize) MarshalJSON() ([]byte, error)
- func (s CreateImageRequestSize) MarshalText() ([]byte, error)
- func (s *CreateImageRequestSize) UnmarshalJSON(data []byte) error
- func (s *CreateImageRequestSize) UnmarshalText(data []byte) error
- func (s CreateImageRequestSize) Validate() error
- type CreateImageVariationRequest
- func (s *CreateImageVariationRequest) GetImage() string
- func (s *CreateImageVariationRequest) GetN() OptNilInt
- func (s *CreateImageVariationRequest) GetResponseFormat() OptNilCreateImageVariationRequestResponseFormat
- func (s *CreateImageVariationRequest) GetSize() OptNilCreateImageVariationRequestSize
- func (s *CreateImageVariationRequest) GetUser() OptString
- func (s *CreateImageVariationRequest) SetImage(val string)
- func (s *CreateImageVariationRequest) SetN(val OptNilInt)
- func (s *CreateImageVariationRequest) SetResponseFormat(val OptNilCreateImageVariationRequestResponseFormat)
- func (s *CreateImageVariationRequest) SetSize(val OptNilCreateImageVariationRequestSize)
- func (s *CreateImageVariationRequest) SetUser(val OptString)
- func (s *CreateImageVariationRequest) Validate() error
- type CreateImageVariationRequestForm
- func (s *CreateImageVariationRequestForm) GetImage() ht.MultipartFile
- func (s *CreateImageVariationRequestForm) GetN() OptNilInt
- func (s *CreateImageVariationRequestForm) GetResponseFormat() OptNilCreateImageVariationRequestResponseFormat
- func (s *CreateImageVariationRequestForm) GetSize() OptNilCreateImageVariationRequestSize
- func (s *CreateImageVariationRequestForm) GetUser() OptString
- func (s *CreateImageVariationRequestForm) SetImage(val ht.MultipartFile)
- func (s *CreateImageVariationRequestForm) SetN(val OptNilInt)
- func (s *CreateImageVariationRequestForm) SetResponseFormat(val OptNilCreateImageVariationRequestResponseFormat)
- func (s *CreateImageVariationRequestForm) SetSize(val OptNilCreateImageVariationRequestSize)
- func (s *CreateImageVariationRequestForm) SetUser(val OptString)
- func (s *CreateImageVariationRequestForm) Validate() error
- type CreateImageVariationRequestResponseFormat
- type CreateImageVariationRequestSize
- type CreateModerationRequest
- func (s *CreateModerationRequest) Decode(d *jx.Decoder) error
- func (s *CreateModerationRequest) Encode(e *jx.Encoder)
- func (s *CreateModerationRequest) GetInput() CreateModerationRequestInput
- func (s *CreateModerationRequest) GetModel() OptString
- func (s *CreateModerationRequest) MarshalJSON() ([]byte, error)
- func (s *CreateModerationRequest) SetInput(val CreateModerationRequestInput)
- func (s *CreateModerationRequest) SetModel(val OptString)
- func (s *CreateModerationRequest) UnmarshalJSON(data []byte) error
- func (s *CreateModerationRequest) Validate() error
- type CreateModerationRequestInput
- func (s *CreateModerationRequestInput) Decode(d *jx.Decoder) error
- func (s CreateModerationRequestInput) Encode(e *jx.Encoder)
- func (s CreateModerationRequestInput) GetString() (v string, ok bool)
- func (s CreateModerationRequestInput) GetStringArray() (v []string, ok bool)
- func (s CreateModerationRequestInput) IsString() bool
- func (s CreateModerationRequestInput) IsStringArray() bool
- func (s CreateModerationRequestInput) MarshalJSON() ([]byte, error)
- func (s *CreateModerationRequestInput) SetString(v string)
- func (s *CreateModerationRequestInput) SetStringArray(v []string)
- func (s *CreateModerationRequestInput) UnmarshalJSON(data []byte) error
- func (s CreateModerationRequestInput) Validate() error
- type CreateModerationRequestInputType
- type CreateModerationResponse
- func (s *CreateModerationResponse) Decode(d *jx.Decoder) error
- func (s *CreateModerationResponse) Encode(e *jx.Encoder)
- func (s *CreateModerationResponse) GetID() string
- func (s *CreateModerationResponse) GetModel() string
- func (s *CreateModerationResponse) GetResults() []CreateModerationResponseResultsItem
- func (s *CreateModerationResponse) MarshalJSON() ([]byte, error)
- func (s *CreateModerationResponse) SetID(val string)
- func (s *CreateModerationResponse) SetModel(val string)
- func (s *CreateModerationResponse) SetResults(val []CreateModerationResponseResultsItem)
- func (s *CreateModerationResponse) UnmarshalJSON(data []byte) error
- func (s *CreateModerationResponse) Validate() error
- type CreateModerationResponseResultsItem
- func (s *CreateModerationResponseResultsItem) Decode(d *jx.Decoder) error
- func (s *CreateModerationResponseResultsItem) Encode(e *jx.Encoder)
- func (s *CreateModerationResponseResultsItem) GetCategories() CreateModerationResponseResultsItemCategories
- func (s *CreateModerationResponseResultsItem) GetCategoryScores() CreateModerationResponseResultsItemCategoryScores
- func (s *CreateModerationResponseResultsItem) GetFlagged() bool
- func (s *CreateModerationResponseResultsItem) MarshalJSON() ([]byte, error)
- func (s *CreateModerationResponseResultsItem) SetCategories(val CreateModerationResponseResultsItemCategories)
- func (s *CreateModerationResponseResultsItem) SetCategoryScores(val CreateModerationResponseResultsItemCategoryScores)
- func (s *CreateModerationResponseResultsItem) SetFlagged(val bool)
- func (s *CreateModerationResponseResultsItem) UnmarshalJSON(data []byte) error
- func (s *CreateModerationResponseResultsItem) Validate() error
- type CreateModerationResponseResultsItemCategories
- func (s *CreateModerationResponseResultsItemCategories) Decode(d *jx.Decoder) error
- func (s *CreateModerationResponseResultsItemCategories) Encode(e *jx.Encoder)
- func (s *CreateModerationResponseResultsItemCategories) GetHate() bool
- func (s *CreateModerationResponseResultsItemCategories) GetHateSlashThreatening() bool
- func (s *CreateModerationResponseResultsItemCategories) GetSelfMinusHarm() bool
- func (s *CreateModerationResponseResultsItemCategories) GetSexual() bool
- func (s *CreateModerationResponseResultsItemCategories) GetSexualSlashMinors() bool
- func (s *CreateModerationResponseResultsItemCategories) GetViolence() bool
- func (s *CreateModerationResponseResultsItemCategories) GetViolenceSlashGraphic() bool
- func (s *CreateModerationResponseResultsItemCategories) MarshalJSON() ([]byte, error)
- func (s *CreateModerationResponseResultsItemCategories) SetHate(val bool)
- func (s *CreateModerationResponseResultsItemCategories) SetHateSlashThreatening(val bool)
- func (s *CreateModerationResponseResultsItemCategories) SetSelfMinusHarm(val bool)
- func (s *CreateModerationResponseResultsItemCategories) SetSexual(val bool)
- func (s *CreateModerationResponseResultsItemCategories) SetSexualSlashMinors(val bool)
- func (s *CreateModerationResponseResultsItemCategories) SetViolence(val bool)
- func (s *CreateModerationResponseResultsItemCategories) SetViolenceSlashGraphic(val bool)
- func (s *CreateModerationResponseResultsItemCategories) UnmarshalJSON(data []byte) error
- type CreateModerationResponseResultsItemCategoryScores
- func (s *CreateModerationResponseResultsItemCategoryScores) Decode(d *jx.Decoder) error
- func (s *CreateModerationResponseResultsItemCategoryScores) Encode(e *jx.Encoder)
- func (s *CreateModerationResponseResultsItemCategoryScores) GetHate() float64
- func (s *CreateModerationResponseResultsItemCategoryScores) GetHateSlashThreatening() float64
- func (s *CreateModerationResponseResultsItemCategoryScores) GetSelfMinusHarm() float64
- func (s *CreateModerationResponseResultsItemCategoryScores) GetSexual() float64
- func (s *CreateModerationResponseResultsItemCategoryScores) GetSexualSlashMinors() float64
- func (s *CreateModerationResponseResultsItemCategoryScores) GetViolence() float64
- func (s *CreateModerationResponseResultsItemCategoryScores) GetViolenceSlashGraphic() float64
- func (s *CreateModerationResponseResultsItemCategoryScores) MarshalJSON() ([]byte, error)
- func (s *CreateModerationResponseResultsItemCategoryScores) SetHate(val float64)
- func (s *CreateModerationResponseResultsItemCategoryScores) SetHateSlashThreatening(val float64)
- func (s *CreateModerationResponseResultsItemCategoryScores) SetSelfMinusHarm(val float64)
- func (s *CreateModerationResponseResultsItemCategoryScores) SetSexual(val float64)
- func (s *CreateModerationResponseResultsItemCategoryScores) SetSexualSlashMinors(val float64)
- func (s *CreateModerationResponseResultsItemCategoryScores) SetViolence(val float64)
- func (s *CreateModerationResponseResultsItemCategoryScores) SetViolenceSlashGraphic(val float64)
- func (s *CreateModerationResponseResultsItemCategoryScores) UnmarshalJSON(data []byte) error
- func (s *CreateModerationResponseResultsItemCategoryScores) Validate() error
- type DeleteFileParams
- type DeleteFileResponse
- func (s *DeleteFileResponse) Decode(d *jx.Decoder) error
- func (s *DeleteFileResponse) Encode(e *jx.Encoder)
- func (s *DeleteFileResponse) GetDeleted() bool
- func (s *DeleteFileResponse) GetID() string
- func (s *DeleteFileResponse) GetObject() string
- func (s *DeleteFileResponse) MarshalJSON() ([]byte, error)
- func (s *DeleteFileResponse) SetDeleted(val bool)
- func (s *DeleteFileResponse) SetID(val string)
- func (s *DeleteFileResponse) SetObject(val string)
- func (s *DeleteFileResponse) UnmarshalJSON(data []byte) error
- type DeleteModelParams
- type DeleteModelResponse
- func (s *DeleteModelResponse) Decode(d *jx.Decoder) error
- func (s *DeleteModelResponse) Encode(e *jx.Encoder)
- func (s *DeleteModelResponse) GetDeleted() bool
- func (s *DeleteModelResponse) GetID() string
- func (s *DeleteModelResponse) GetObject() string
- func (s *DeleteModelResponse) MarshalJSON() ([]byte, error)
- func (s *DeleteModelResponse) SetDeleted(val bool)
- func (s *DeleteModelResponse) SetID(val string)
- func (s *DeleteModelResponse) SetObject(val string)
- func (s *DeleteModelResponse) UnmarshalJSON(data []byte) error
- type DownloadFileParams
- type ErrorHandler
- type FineTune
- type FineTuneEvent
- type Handler
- type ImagesResponse
- type ListFilesResponse
- func (s *ListFilesResponse) Decode(d *jx.Decoder) error
- func (s *ListFilesResponse) Encode(e *jx.Encoder)
- func (s *ListFilesResponse) GetData() []OpenAIFile
- func (s *ListFilesResponse) GetObject() string
- func (s *ListFilesResponse) MarshalJSON() ([]byte, error)
- func (s *ListFilesResponse) SetData(val []OpenAIFile)
- func (s *ListFilesResponse) SetObject(val string)
- func (s *ListFilesResponse) UnmarshalJSON(data []byte) error
- func (s *ListFilesResponse) Validate() error
- type ListFineTuneEventsParams
- type ListFineTuneEventsResponse
- func (s *ListFineTuneEventsResponse) Decode(d *jx.Decoder) error
- func (s *ListFineTuneEventsResponse) Encode(e *jx.Encoder)
- func (s *ListFineTuneEventsResponse) GetData() []FineTuneEvent
- func (s *ListFineTuneEventsResponse) GetObject() string
- func (s *ListFineTuneEventsResponse) MarshalJSON() ([]byte, error)
- func (s *ListFineTuneEventsResponse) SetData(val []FineTuneEvent)
- func (s *ListFineTuneEventsResponse) SetObject(val string)
- func (s *ListFineTuneEventsResponse) UnmarshalJSON(data []byte) error
- func (s *ListFineTuneEventsResponse) Validate() error
- type ListFineTunesResponse
- func (s *ListFineTunesResponse) Decode(d *jx.Decoder) error
- func (s *ListFineTunesResponse) Encode(e *jx.Encoder)
- func (s *ListFineTunesResponse) GetData() []FineTune
- func (s *ListFineTunesResponse) GetObject() string
- func (s *ListFineTunesResponse) MarshalJSON() ([]byte, error)
- func (s *ListFineTunesResponse) SetData(val []FineTune)
- func (s *ListFineTunesResponse) SetObject(val string)
- func (s *ListFineTunesResponse) UnmarshalJSON(data []byte) error
- func (s *ListFineTunesResponse) Validate() error
- 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() string
- func (s *ListModelsResponse) MarshalJSON() ([]byte, error)
- func (s *ListModelsResponse) SetData(val []Model)
- func (s *ListModelsResponse) SetObject(val string)
- func (s *ListModelsResponse) UnmarshalJSON(data []byte) error
- func (s *ListModelsResponse) Validate() error
- type Middleware
- type Model
- type OpenAIFile
- type OptBool
- type OptChatCompletionResponseMessage
- func (o *OptChatCompletionResponseMessage) Decode(d *jx.Decoder) error
- func (o OptChatCompletionResponseMessage) Encode(e *jx.Encoder)
- func (o OptChatCompletionResponseMessage) Get() (v ChatCompletionResponseMessage, ok bool)
- func (o OptChatCompletionResponseMessage) IsSet() bool
- func (s OptChatCompletionResponseMessage) MarshalJSON() ([]byte, error)
- func (o OptChatCompletionResponseMessage) Or(d ChatCompletionResponseMessage) ChatCompletionResponseMessage
- func (o *OptChatCompletionResponseMessage) Reset()
- func (o *OptChatCompletionResponseMessage) SetTo(v ChatCompletionResponseMessage)
- func (s *OptChatCompletionResponseMessage) UnmarshalJSON(data []byte) error
- type OptCreateChatCompletionRequestLogitBias
- func (o *OptCreateChatCompletionRequestLogitBias) Decode(d *jx.Decoder) error
- func (o OptCreateChatCompletionRequestLogitBias) Encode(e *jx.Encoder)
- func (o OptCreateChatCompletionRequestLogitBias) Get() (v *CreateChatCompletionRequestLogitBias, ok bool)
- func (o OptCreateChatCompletionRequestLogitBias) IsSet() bool
- func (s OptCreateChatCompletionRequestLogitBias) MarshalJSON() ([]byte, error)
- func (o OptCreateChatCompletionRequestLogitBias) Or(d *CreateChatCompletionRequestLogitBias) *CreateChatCompletionRequestLogitBias
- func (o *OptCreateChatCompletionRequestLogitBias) Reset()
- func (o *OptCreateChatCompletionRequestLogitBias) SetTo(v *CreateChatCompletionRequestLogitBias)
- func (s *OptCreateChatCompletionRequestLogitBias) UnmarshalJSON(data []byte) error
- type OptCreateChatCompletionRequestStop
- func (o *OptCreateChatCompletionRequestStop) Decode(d *jx.Decoder) error
- func (o OptCreateChatCompletionRequestStop) Encode(e *jx.Encoder)
- func (o OptCreateChatCompletionRequestStop) Get() (v CreateChatCompletionRequestStop, ok bool)
- func (o OptCreateChatCompletionRequestStop) IsSet() bool
- func (s OptCreateChatCompletionRequestStop) MarshalJSON() ([]byte, error)
- func (o OptCreateChatCompletionRequestStop) Or(d CreateChatCompletionRequestStop) CreateChatCompletionRequestStop
- func (o *OptCreateChatCompletionRequestStop) Reset()
- func (o *OptCreateChatCompletionRequestStop) SetTo(v CreateChatCompletionRequestStop)
- func (s *OptCreateChatCompletionRequestStop) UnmarshalJSON(data []byte) error
- type OptCreateChatCompletionResponseUsage
- func (o *OptCreateChatCompletionResponseUsage) Decode(d *jx.Decoder) error
- func (o OptCreateChatCompletionResponseUsage) Encode(e *jx.Encoder)
- func (o OptCreateChatCompletionResponseUsage) Get() (v CreateChatCompletionResponseUsage, ok bool)
- func (o OptCreateChatCompletionResponseUsage) IsSet() bool
- func (s OptCreateChatCompletionResponseUsage) MarshalJSON() ([]byte, error)
- func (o OptCreateChatCompletionResponseUsage) Or(d CreateChatCompletionResponseUsage) CreateChatCompletionResponseUsage
- func (o *OptCreateChatCompletionResponseUsage) Reset()
- func (o *OptCreateChatCompletionResponseUsage) SetTo(v CreateChatCompletionResponseUsage)
- func (s *OptCreateChatCompletionResponseUsage) 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 OptMultipartFile
- 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) 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 OptNilCreateEditResponseChoicesItemLogprobs
- func (o *OptNilCreateEditResponseChoicesItemLogprobs) Decode(d *jx.Decoder) error
- func (o OptNilCreateEditResponseChoicesItemLogprobs) Encode(e *jx.Encoder)
- func (o OptNilCreateEditResponseChoicesItemLogprobs) Get() (v CreateEditResponseChoicesItemLogprobs, ok bool)
- func (o OptNilCreateEditResponseChoicesItemLogprobs) IsNull() bool
- func (o OptNilCreateEditResponseChoicesItemLogprobs) IsSet() bool
- func (s OptNilCreateEditResponseChoicesItemLogprobs) MarshalJSON() ([]byte, error)
- func (o OptNilCreateEditResponseChoicesItemLogprobs) Or(d CreateEditResponseChoicesItemLogprobs) CreateEditResponseChoicesItemLogprobs
- func (o *OptNilCreateEditResponseChoicesItemLogprobs) Reset()
- func (o *OptNilCreateEditResponseChoicesItemLogprobs) SetTo(v CreateEditResponseChoicesItemLogprobs)
- func (o *OptNilCreateEditResponseChoicesItemLogprobs) SetToNull()
- func (s *OptNilCreateEditResponseChoicesItemLogprobs) UnmarshalJSON(data []byte) error
- type OptNilCreateImageEditRequestResponseFormat
- func (o OptNilCreateImageEditRequestResponseFormat) Get() (v CreateImageEditRequestResponseFormat, ok bool)
- func (o OptNilCreateImageEditRequestResponseFormat) IsNull() bool
- func (o OptNilCreateImageEditRequestResponseFormat) IsSet() bool
- func (o OptNilCreateImageEditRequestResponseFormat) Or(d CreateImageEditRequestResponseFormat) CreateImageEditRequestResponseFormat
- func (o *OptNilCreateImageEditRequestResponseFormat) Reset()
- func (o *OptNilCreateImageEditRequestResponseFormat) SetTo(v CreateImageEditRequestResponseFormat)
- func (o *OptNilCreateImageEditRequestResponseFormat) SetToNull()
- type OptNilCreateImageEditRequestSize
- func (o OptNilCreateImageEditRequestSize) Get() (v CreateImageEditRequestSize, ok bool)
- func (o OptNilCreateImageEditRequestSize) IsNull() bool
- func (o OptNilCreateImageEditRequestSize) IsSet() bool
- func (o OptNilCreateImageEditRequestSize) Or(d CreateImageEditRequestSize) CreateImageEditRequestSize
- func (o *OptNilCreateImageEditRequestSize) Reset()
- func (o *OptNilCreateImageEditRequestSize) SetTo(v CreateImageEditRequestSize)
- func (o *OptNilCreateImageEditRequestSize) SetToNull()
- type OptNilCreateImageRequestResponseFormat
- func (o *OptNilCreateImageRequestResponseFormat) Decode(d *jx.Decoder) error
- func (o OptNilCreateImageRequestResponseFormat) Encode(e *jx.Encoder)
- func (o OptNilCreateImageRequestResponseFormat) Get() (v CreateImageRequestResponseFormat, ok bool)
- func (o OptNilCreateImageRequestResponseFormat) IsNull() bool
- func (o OptNilCreateImageRequestResponseFormat) IsSet() bool
- func (s OptNilCreateImageRequestResponseFormat) MarshalJSON() ([]byte, error)
- func (o OptNilCreateImageRequestResponseFormat) Or(d CreateImageRequestResponseFormat) CreateImageRequestResponseFormat
- func (o *OptNilCreateImageRequestResponseFormat) Reset()
- func (o *OptNilCreateImageRequestResponseFormat) SetTo(v CreateImageRequestResponseFormat)
- func (o *OptNilCreateImageRequestResponseFormat) SetToNull()
- func (s *OptNilCreateImageRequestResponseFormat) UnmarshalJSON(data []byte) error
- type OptNilCreateImageRequestSize
- func (o *OptNilCreateImageRequestSize) Decode(d *jx.Decoder) error
- func (o OptNilCreateImageRequestSize) Encode(e *jx.Encoder)
- func (o OptNilCreateImageRequestSize) Get() (v CreateImageRequestSize, ok bool)
- func (o OptNilCreateImageRequestSize) IsNull() bool
- func (o OptNilCreateImageRequestSize) IsSet() bool
- func (s OptNilCreateImageRequestSize) MarshalJSON() ([]byte, error)
- func (o OptNilCreateImageRequestSize) Or(d CreateImageRequestSize) CreateImageRequestSize
- func (o *OptNilCreateImageRequestSize) Reset()
- func (o *OptNilCreateImageRequestSize) SetTo(v CreateImageRequestSize)
- func (o *OptNilCreateImageRequestSize) SetToNull()
- func (s *OptNilCreateImageRequestSize) UnmarshalJSON(data []byte) error
- type OptNilCreateImageVariationRequestResponseFormat
- func (o OptNilCreateImageVariationRequestResponseFormat) Get() (v CreateImageVariationRequestResponseFormat, ok bool)
- func (o OptNilCreateImageVariationRequestResponseFormat) IsNull() bool
- func (o OptNilCreateImageVariationRequestResponseFormat) IsSet() bool
- func (o OptNilCreateImageVariationRequestResponseFormat) Or(d CreateImageVariationRequestResponseFormat) CreateImageVariationRequestResponseFormat
- func (o *OptNilCreateImageVariationRequestResponseFormat) Reset()
- func (o *OptNilCreateImageVariationRequestResponseFormat) SetTo(v CreateImageVariationRequestResponseFormat)
- func (o *OptNilCreateImageVariationRequestResponseFormat) SetToNull()
- type OptNilCreateImageVariationRequestSize
- func (o OptNilCreateImageVariationRequestSize) Get() (v CreateImageVariationRequestSize, ok bool)
- func (o OptNilCreateImageVariationRequestSize) IsNull() bool
- func (o OptNilCreateImageVariationRequestSize) IsSet() bool
- func (o OptNilCreateImageVariationRequestSize) Or(d CreateImageVariationRequestSize) CreateImageVariationRequestSize
- func (o *OptNilCreateImageVariationRequestSize) Reset()
- func (o *OptNilCreateImageVariationRequestSize) SetTo(v CreateImageVariationRequestSize)
- func (o *OptNilCreateImageVariationRequestSize) SetToNull()
- 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) 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 OptNilFloat64Array
- func (o *OptNilFloat64Array) Decode(d *jx.Decoder) error
- func (o OptNilFloat64Array) Encode(e *jx.Encoder)
- func (o OptNilFloat64Array) Get() (v []float64, ok bool)
- func (o OptNilFloat64Array) IsNull() bool
- func (o OptNilFloat64Array) IsSet() bool
- func (s OptNilFloat64Array) MarshalJSON() ([]byte, error)
- func (o OptNilFloat64Array) Or(d []float64) []float64
- func (o *OptNilFloat64Array) Reset()
- func (o *OptNilFloat64Array) SetTo(v []float64)
- func (o *OptNilFloat64Array) SetToNull()
- func (s *OptNilFloat64Array) 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) 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) 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 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 RetrieveFileParams
- type RetrieveFineTuneParams
- type RetrieveModelParams
- type Route
- 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) CancelFineTune(ctx context.Context, params CancelFineTuneParams) (r FineTune, _ error)
- func (UnimplementedHandler) CreateChatCompletion(ctx context.Context, req *CreateChatCompletionRequest) (r *CreateChatCompletionResponse, _ error)
- func (UnimplementedHandler) CreateEdit(ctx context.Context, req *CreateEditRequest) (r *CreateEditResponse, _ error)
- func (UnimplementedHandler) CreateFineTune(ctx context.Context, req *CreateFineTuneRequest) (r FineTune, _ error)
- func (UnimplementedHandler) CreateImage(ctx context.Context, req *CreateImageRequest) (r ImagesResponse, _ error)
- func (UnimplementedHandler) CreateImageEdit(ctx context.Context, req *CreateImageEditRequestForm) (r ImagesResponse, _ error)
- func (UnimplementedHandler) CreateImageVariation(ctx context.Context, req *CreateImageVariationRequestForm) (r ImagesResponse, _ error)
- func (UnimplementedHandler) CreateModeration(ctx context.Context, req *CreateModerationRequest) (r *CreateModerationResponse, _ error)
- func (UnimplementedHandler) DeleteFile(ctx context.Context, params DeleteFileParams) (r *DeleteFileResponse, _ error)
- func (UnimplementedHandler) DeleteModel(ctx context.Context, params DeleteModelParams) (r *DeleteModelResponse, _ error)
- func (UnimplementedHandler) DownloadFile(ctx context.Context, params DownloadFileParams) (r string, _ error)
- func (UnimplementedHandler) ListFiles(ctx context.Context) (r *ListFilesResponse, _ error)
- func (UnimplementedHandler) ListFineTuneEvents(ctx context.Context, params ListFineTuneEventsParams) (r *ListFineTuneEventsResponse, _ error)
- func (UnimplementedHandler) ListFineTunes(ctx context.Context) (r *ListFineTunesResponse, _ error)
- func (UnimplementedHandler) ListModels(ctx context.Context) (r *ListModelsResponse, _ error)
- func (UnimplementedHandler) RetrieveFile(ctx context.Context, params RetrieveFileParams) (r OpenAIFile, _ error)
- func (UnimplementedHandler) RetrieveFineTune(ctx context.Context, params RetrieveFineTuneParams) (r FineTune, _ error)
- func (UnimplementedHandler) RetrieveModel(ctx context.Context, params RetrieveModelParams) (r Model, _ error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewBearerAuthClient ¶
NewBearerAuthClient creates new client ready for doing requests with bearer token.
Types ¶
type CancelFineTuneParams ¶
type CancelFineTuneParams struct { // The ID of the fine-tune job to cancel. FineTuneID string }
CancelFineTuneParams is parameters of cancelFineTune operation.
type ChatCompletionRequestMessage ¶
type ChatCompletionRequestMessage struct { // The role of the author of this message. Role ChatCompletionRequestMessageRole `json:"role"` // The contents of the message. Content string `json:"content"` // The name of the user in a multi-user chat. Name OptString `json:"name"` }
Ref: #/components/schemas/ChatCompletionRequestMessage
func (*ChatCompletionRequestMessage) Decode ¶
func (s *ChatCompletionRequestMessage) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionRequestMessage from json.
func (*ChatCompletionRequestMessage) Encode ¶
func (s *ChatCompletionRequestMessage) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionRequestMessage) GetContent ¶
func (s *ChatCompletionRequestMessage) GetContent() string
GetContent returns the value of Content.
func (*ChatCompletionRequestMessage) GetName ¶
func (s *ChatCompletionRequestMessage) GetName() OptString
GetName returns the value of Name.
func (*ChatCompletionRequestMessage) GetRole ¶
func (s *ChatCompletionRequestMessage) GetRole() ChatCompletionRequestMessageRole
GetRole returns the value of Role.
func (*ChatCompletionRequestMessage) MarshalJSON ¶
func (s *ChatCompletionRequestMessage) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionRequestMessage) SetContent ¶
func (s *ChatCompletionRequestMessage) SetContent(val string)
SetContent sets the value of Content.
func (*ChatCompletionRequestMessage) SetName ¶
func (s *ChatCompletionRequestMessage) SetName(val OptString)
SetName sets the value of Name.
func (*ChatCompletionRequestMessage) SetRole ¶
func (s *ChatCompletionRequestMessage) SetRole(val ChatCompletionRequestMessageRole)
SetRole sets the value of Role.
func (*ChatCompletionRequestMessage) UnmarshalJSON ¶
func (s *ChatCompletionRequestMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionRequestMessage) Validate ¶
func (s *ChatCompletionRequestMessage) Validate() error
type ChatCompletionRequestMessageRole ¶
type ChatCompletionRequestMessageRole string
The role of the author of this message.
const ( ChatCompletionRequestMessageRoleSystem ChatCompletionRequestMessageRole = "system" ChatCompletionRequestMessageRoleUser ChatCompletionRequestMessageRole = "user" ChatCompletionRequestMessageRoleAssistant ChatCompletionRequestMessageRole = "assistant" )
func (*ChatCompletionRequestMessageRole) Decode ¶
func (s *ChatCompletionRequestMessageRole) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionRequestMessageRole from json.
func (ChatCompletionRequestMessageRole) Encode ¶
func (s ChatCompletionRequestMessageRole) Encode(e *jx.Encoder)
Encode encodes ChatCompletionRequestMessageRole as json.
func (ChatCompletionRequestMessageRole) MarshalJSON ¶
func (s ChatCompletionRequestMessageRole) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ChatCompletionRequestMessageRole) MarshalText ¶
func (s ChatCompletionRequestMessageRole) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ChatCompletionRequestMessageRole) UnmarshalJSON ¶
func (s *ChatCompletionRequestMessageRole) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionRequestMessageRole) UnmarshalText ¶
func (s *ChatCompletionRequestMessageRole) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ChatCompletionRequestMessageRole) Validate ¶
func (s ChatCompletionRequestMessageRole) Validate() error
type ChatCompletionResponseMessage ¶
type ChatCompletionResponseMessage struct { // The role of the author of this message. Role ChatCompletionResponseMessageRole `json:"role"` // The contents of the message. Content string `json:"content"` }
Ref: #/components/schemas/ChatCompletionResponseMessage
func (*ChatCompletionResponseMessage) Decode ¶
func (s *ChatCompletionResponseMessage) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionResponseMessage from json.
func (*ChatCompletionResponseMessage) Encode ¶
func (s *ChatCompletionResponseMessage) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ChatCompletionResponseMessage) GetContent ¶
func (s *ChatCompletionResponseMessage) GetContent() string
GetContent returns the value of Content.
func (*ChatCompletionResponseMessage) GetRole ¶
func (s *ChatCompletionResponseMessage) GetRole() ChatCompletionResponseMessageRole
GetRole returns the value of Role.
func (*ChatCompletionResponseMessage) MarshalJSON ¶
func (s *ChatCompletionResponseMessage) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ChatCompletionResponseMessage) SetContent ¶
func (s *ChatCompletionResponseMessage) SetContent(val string)
SetContent sets the value of Content.
func (*ChatCompletionResponseMessage) SetRole ¶
func (s *ChatCompletionResponseMessage) SetRole(val ChatCompletionResponseMessageRole)
SetRole sets the value of Role.
func (*ChatCompletionResponseMessage) UnmarshalJSON ¶
func (s *ChatCompletionResponseMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionResponseMessage) Validate ¶
func (s *ChatCompletionResponseMessage) Validate() error
type ChatCompletionResponseMessageRole ¶
type ChatCompletionResponseMessageRole string
The role of the author of this message.
const ( ChatCompletionResponseMessageRoleSystem ChatCompletionResponseMessageRole = "system" ChatCompletionResponseMessageRoleUser ChatCompletionResponseMessageRole = "user" ChatCompletionResponseMessageRoleAssistant ChatCompletionResponseMessageRole = "assistant" )
func (*ChatCompletionResponseMessageRole) Decode ¶
func (s *ChatCompletionResponseMessageRole) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionResponseMessageRole from json.
func (ChatCompletionResponseMessageRole) Encode ¶
func (s ChatCompletionResponseMessageRole) Encode(e *jx.Encoder)
Encode encodes ChatCompletionResponseMessageRole as json.
func (ChatCompletionResponseMessageRole) MarshalJSON ¶
func (s ChatCompletionResponseMessageRole) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ChatCompletionResponseMessageRole) MarshalText ¶
func (s ChatCompletionResponseMessageRole) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ChatCompletionResponseMessageRole) UnmarshalJSON ¶
func (s *ChatCompletionResponseMessageRole) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ChatCompletionResponseMessageRole) UnmarshalText ¶
func (s *ChatCompletionResponseMessageRole) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ChatCompletionResponseMessageRole) Validate ¶
func (s ChatCompletionResponseMessageRole) Validate() error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) CancelFineTune ¶
CancelFineTune invokes cancelFineTune operation.
Immediately cancel a fine-tune job.
POST /fine-tunes/{fine_tune_id}/cancel
func (*Client) CreateChatCompletion ¶
func (c *Client) CreateChatCompletion(ctx context.Context, request *CreateChatCompletionRequest) (*CreateChatCompletionResponse, error)
CreateChatCompletion invokes createChatCompletion operation.
Creates a completion for the chat message.
POST /chat/completions
func (*Client) CreateEdit ¶
func (c *Client) CreateEdit(ctx context.Context, request *CreateEditRequest) (*CreateEditResponse, error)
CreateEdit invokes createEdit operation.
Creates a new edit for the provided input, instruction, and parameters.
POST /edits
func (*Client) CreateFineTune ¶
func (c *Client) CreateFineTune(ctx context.Context, request *CreateFineTuneRequest) (FineTune, error)
CreateFineTune invokes createFineTune operation.
Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning).
POST /fine-tunes
func (*Client) CreateImage ¶
func (c *Client) CreateImage(ctx context.Context, request *CreateImageRequest) (ImagesResponse, error)
CreateImage invokes createImage operation.
Creates an image given a prompt.
POST /images/generations
func (*Client) CreateImageEdit ¶
func (c *Client) CreateImageEdit(ctx context.Context, request *CreateImageEditRequestForm) (ImagesResponse, error)
CreateImageEdit invokes createImageEdit operation.
Creates an edited or extended image given an original image and a prompt.
POST /images/edits
func (*Client) CreateImageVariation ¶
func (c *Client) CreateImageVariation(ctx context.Context, request *CreateImageVariationRequestForm) (ImagesResponse, error)
CreateImageVariation invokes createImageVariation operation.
Creates a variation of a given image.
POST /images/variations
func (*Client) CreateModeration ¶
func (c *Client) CreateModeration(ctx context.Context, request *CreateModerationRequest) (*CreateModerationResponse, error)
CreateModeration invokes createModeration operation.
Classifies if text violates OpenAI's Content Policy.
POST /moderations
func (*Client) DeleteFile ¶
func (c *Client) DeleteFile(ctx context.Context, params DeleteFileParams) (*DeleteFileResponse, error)
DeleteFile invokes deleteFile operation.
Delete a file.
DELETE /files/{file_id}
func (*Client) DeleteModel ¶
func (c *Client) DeleteModel(ctx context.Context, params DeleteModelParams) (*DeleteModelResponse, error)
DeleteModel invokes deleteModel operation.
Delete a fine-tuned model. You must have the Owner role in your organization.
DELETE /models/{model}
func (*Client) DownloadFile ¶
DownloadFile invokes downloadFile operation.
Returns the contents of the specified file.
GET /files/{file_id}/content
func (*Client) ListFiles ¶
func (c *Client) ListFiles(ctx context.Context) (*ListFilesResponse, error)
ListFiles invokes listFiles operation.
Returns a list of files that belong to the user's organization.
GET /files
func (*Client) ListFineTuneEvents ¶
func (c *Client) ListFineTuneEvents(ctx context.Context, params ListFineTuneEventsParams) (*ListFineTuneEventsResponse, error)
ListFineTuneEvents invokes listFineTuneEvents operation.
Get fine-grained status updates for a fine-tune job.
GET /fine-tunes/{fine_tune_id}/events
func (*Client) ListFineTunes ¶
func (c *Client) ListFineTunes(ctx context.Context) (*ListFineTunesResponse, error)
ListFineTunes invokes listFineTunes operation.
List your organization's fine-tuning jobs.
GET /fine-tunes
func (*Client) ListModels ¶
func (c *Client) ListModels(ctx context.Context) (*ListModelsResponse, error)
ListModels invokes listModels operation.
Lists the currently available models, and provides basic information about each one such as the owner and availability.
GET /models
func (*Client) RetrieveFile ¶
func (c *Client) RetrieveFile(ctx context.Context, params RetrieveFileParams) (OpenAIFile, error)
RetrieveFile invokes retrieveFile operation.
Returns information about a specific file.
GET /files/{file_id}
func (*Client) RetrieveFineTune ¶
func (c *Client) RetrieveFineTune(ctx context.Context, params RetrieveFineTuneParams) (FineTune, error)
RetrieveFineTune invokes retrieveFineTune operation.
Gets info about the fine-tune job. [Learn more about Fine-tuning](/docs/guides/fine-tuning).
GET /fine-tunes/{fine_tune_id}
func (*Client) RetrieveModel ¶
RetrieveModel invokes retrieveModel operation.
Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
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 CreateChatCompletionRequest ¶
type CreateChatCompletionRequest struct { // ID of the model to use. Currently, only `gpt-3.5-turbo` and `gpt-3.5-turbo-0301` are supported. Model string `json:"model"` // The messages to generate chat completions for, in the [chat // format](/docs/guides/chat/introduction). Messages []ChatCompletionRequestMessage `json:"messages"` // What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output // more random, while lower values like 0.2 will make it more focused and deterministic. // We generally recommend altering this or `top_p` but not both. Temperature OptNilFloat64 `json:"temperature"` // An alternative to sampling with temperature, called nucleus sampling, where the model considers // the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the // top 10% probability mass are considered. // We generally recommend altering this or `temperature` but not both. TopP OptNilFloat64 `json:"top_p"` // How many chat completion choices to generate for each input message. N OptNilInt `json:"n"` // If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only // [server-sent events](https://developer.mozilla. // org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they // become available, with the stream terminated by a `data: [DONE]` message. Stream OptNilBool `json:"stream"` // Up to 4 sequences where the API will stop generating further tokens. Stop OptCreateChatCompletionRequestStop `json:"stop"` // The maximum number of tokens allowed for the generated answer. By default, the number of tokens // the model can return will be (4096 - prompt tokens). MaxTokens OptInt `json:"max_tokens"` // Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in // the text so far, increasing the model's likelihood to talk about new topics. // [See more information about frequency and presence penalties. // ](/docs/api-reference/parameter-details). PresencePenalty OptNilFloat64 `json:"presence_penalty"` // Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency // in the text so far, decreasing the model's likelihood to repeat the same line verbatim. // [See more information about frequency and presence penalties. // ](/docs/api-reference/parameter-details). FrequencyPenalty OptNilFloat64 `json:"frequency_penalty"` // Modify the likelihood of specified tokens appearing in the completion. // Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an // associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated // by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 // should decrease or increase likelihood of selection; values like -100 or 100 should result in a // ban or exclusive selection of the relevant token. LogitBias OptCreateChatCompletionRequestLogitBias `json:"logit_bias"` // A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. // [Learn more](/docs/guides/safety-best-practices/end-user-ids). User OptString `json:"user"` }
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() OptCreateChatCompletionRequestLogitBias
GetLogitBias returns the value of LogitBias.
func (*CreateChatCompletionRequest) GetMaxTokens ¶
func (s *CreateChatCompletionRequest) GetMaxTokens() OptInt
GetMaxTokens returns the value of MaxTokens.
func (*CreateChatCompletionRequest) GetMessages ¶
func (s *CreateChatCompletionRequest) GetMessages() []ChatCompletionRequestMessage
GetMessages returns the value of Messages.
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) GetStop ¶
func (s *CreateChatCompletionRequest) GetStop() OptCreateChatCompletionRequestStop
GetStop returns the value of Stop.
func (*CreateChatCompletionRequest) GetStream ¶
func (s *CreateChatCompletionRequest) GetStream() OptNilBool
GetStream returns the value of Stream.
func (*CreateChatCompletionRequest) GetTemperature ¶
func (s *CreateChatCompletionRequest) GetTemperature() OptNilFloat64
GetTemperature returns the value of Temperature.
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 OptCreateChatCompletionRequestLogitBias)
SetLogitBias sets the value of LogitBias.
func (*CreateChatCompletionRequest) SetMaxTokens ¶
func (s *CreateChatCompletionRequest) SetMaxTokens(val OptInt)
SetMaxTokens sets the value of MaxTokens.
func (*CreateChatCompletionRequest) SetMessages ¶
func (s *CreateChatCompletionRequest) SetMessages(val []ChatCompletionRequestMessage)
SetMessages sets the value of Messages.
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) SetStop ¶
func (s *CreateChatCompletionRequest) SetStop(val OptCreateChatCompletionRequestStop)
SetStop sets the value of Stop.
func (*CreateChatCompletionRequest) SetStream ¶
func (s *CreateChatCompletionRequest) SetStream(val OptNilBool)
SetStream sets the value of Stream.
func (*CreateChatCompletionRequest) SetTemperature ¶
func (s *CreateChatCompletionRequest) SetTemperature(val OptNilFloat64)
SetTemperature sets the value of Temperature.
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 ¶
type CreateChatCompletionRequestLogitBias struct{}
Modify the likelihood of specified tokens appearing in the completion. Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
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 CreateChatCompletionRequestStop ¶
type CreateChatCompletionRequestStop struct { Type CreateChatCompletionRequestStopType // switch on this field Null struct{} String string StringArray []string }
Up to 4 sequences where the API will stop generating further tokens. CreateChatCompletionRequestStop represents sum type.
func NewNullCreateChatCompletionRequestStop ¶
func NewNullCreateChatCompletionRequestStop(v struct{}) CreateChatCompletionRequestStop
NewNullCreateChatCompletionRequestStop returns new CreateChatCompletionRequestStop from struct{}.
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) GetNull ¶
func (s CreateChatCompletionRequestStop) GetNull() (v struct{}, ok bool)
GetNull returns struct{} and true boolean if CreateChatCompletionRequestStop is struct{}.
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) IsNull ¶
func (s CreateChatCompletionRequestStop) IsNull() bool
IsNull reports whether CreateChatCompletionRequestStop is struct{}.
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) SetNull ¶
func (s *CreateChatCompletionRequestStop) SetNull(v struct{})
SetNull sets CreateChatCompletionRequestStop to struct{}.
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 ( NullCreateChatCompletionRequestStop CreateChatCompletionRequestStopType = "struct{}" StringCreateChatCompletionRequestStop CreateChatCompletionRequestStopType = "string" StringArrayCreateChatCompletionRequestStop CreateChatCompletionRequestStopType = "[]string" )
Possible values for CreateChatCompletionRequestStopType.
type CreateChatCompletionResponse ¶
type CreateChatCompletionResponse struct { ID string `json:"id"` Object string `json:"object"` Created int `json:"created"` Model string `json:"model"` Choices []CreateChatCompletionResponseChoicesItem `json:"choices"` Usage OptCreateChatCompletionResponseUsage `json:"usage"` }
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() []CreateChatCompletionResponseChoicesItem
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() string
GetObject returns the value of Object.
func (*CreateChatCompletionResponse) GetUsage ¶
func (s *CreateChatCompletionResponse) GetUsage() OptCreateChatCompletionResponseUsage
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 []CreateChatCompletionResponseChoicesItem)
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 string)
SetObject sets the value of Object.
func (*CreateChatCompletionResponse) SetUsage ¶
func (s *CreateChatCompletionResponse) SetUsage(val OptCreateChatCompletionResponseUsage)
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 CreateChatCompletionResponseChoicesItem ¶
type CreateChatCompletionResponseChoicesItem struct { Index OptInt `json:"index"` Message OptChatCompletionResponseMessage `json:"message"` FinishReason OptString `json:"finish_reason"` }
func (*CreateChatCompletionResponseChoicesItem) Decode ¶
func (s *CreateChatCompletionResponseChoicesItem) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionResponseChoicesItem from json.
func (*CreateChatCompletionResponseChoicesItem) Encode ¶
func (s *CreateChatCompletionResponseChoicesItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateChatCompletionResponseChoicesItem) GetFinishReason ¶
func (s *CreateChatCompletionResponseChoicesItem) GetFinishReason() OptString
GetFinishReason returns the value of FinishReason.
func (*CreateChatCompletionResponseChoicesItem) GetIndex ¶
func (s *CreateChatCompletionResponseChoicesItem) GetIndex() OptInt
GetIndex returns the value of Index.
func (*CreateChatCompletionResponseChoicesItem) GetMessage ¶
func (s *CreateChatCompletionResponseChoicesItem) GetMessage() OptChatCompletionResponseMessage
GetMessage returns the value of Message.
func (*CreateChatCompletionResponseChoicesItem) MarshalJSON ¶
func (s *CreateChatCompletionResponseChoicesItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateChatCompletionResponseChoicesItem) SetFinishReason ¶
func (s *CreateChatCompletionResponseChoicesItem) SetFinishReason(val OptString)
SetFinishReason sets the value of FinishReason.
func (*CreateChatCompletionResponseChoicesItem) SetIndex ¶
func (s *CreateChatCompletionResponseChoicesItem) SetIndex(val OptInt)
SetIndex sets the value of Index.
func (*CreateChatCompletionResponseChoicesItem) SetMessage ¶
func (s *CreateChatCompletionResponseChoicesItem) SetMessage(val OptChatCompletionResponseMessage)
SetMessage sets the value of Message.
func (*CreateChatCompletionResponseChoicesItem) UnmarshalJSON ¶
func (s *CreateChatCompletionResponseChoicesItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateChatCompletionResponseChoicesItem) Validate ¶
func (s *CreateChatCompletionResponseChoicesItem) Validate() error
type CreateChatCompletionResponseUsage ¶
type CreateChatCompletionResponseUsage struct { PromptTokens int `json:"prompt_tokens"` CompletionTokens int `json:"completion_tokens"` TotalTokens int `json:"total_tokens"` }
func (*CreateChatCompletionResponseUsage) Decode ¶
func (s *CreateChatCompletionResponseUsage) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionResponseUsage from json.
func (*CreateChatCompletionResponseUsage) Encode ¶
func (s *CreateChatCompletionResponseUsage) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateChatCompletionResponseUsage) GetCompletionTokens ¶
func (s *CreateChatCompletionResponseUsage) GetCompletionTokens() int
GetCompletionTokens returns the value of CompletionTokens.
func (*CreateChatCompletionResponseUsage) GetPromptTokens ¶
func (s *CreateChatCompletionResponseUsage) GetPromptTokens() int
GetPromptTokens returns the value of PromptTokens.
func (*CreateChatCompletionResponseUsage) GetTotalTokens ¶
func (s *CreateChatCompletionResponseUsage) GetTotalTokens() int
GetTotalTokens returns the value of TotalTokens.
func (*CreateChatCompletionResponseUsage) MarshalJSON ¶
func (s *CreateChatCompletionResponseUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateChatCompletionResponseUsage) SetCompletionTokens ¶
func (s *CreateChatCompletionResponseUsage) SetCompletionTokens(val int)
SetCompletionTokens sets the value of CompletionTokens.
func (*CreateChatCompletionResponseUsage) SetPromptTokens ¶
func (s *CreateChatCompletionResponseUsage) SetPromptTokens(val int)
SetPromptTokens sets the value of PromptTokens.
func (*CreateChatCompletionResponseUsage) SetTotalTokens ¶
func (s *CreateChatCompletionResponseUsage) SetTotalTokens(val int)
SetTotalTokens sets the value of TotalTokens.
func (*CreateChatCompletionResponseUsage) UnmarshalJSON ¶
func (s *CreateChatCompletionResponseUsage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateEditRequest ¶
type CreateEditRequest struct { // ID of the model to use. You can use the `text-davinci-edit-001` or `code-davinci-edit-001` model // with this endpoint. Model string `json:"model"` // The input text to use as a starting point for the edit. Input OptNilString `json:"input"` // The instruction that tells the model how to edit the prompt. Instruction string `json:"instruction"` // How many edits to generate for the input and instruction. N OptNilInt `json:"n"` // What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output // more random, while lower values like 0.2 will make it more focused and deterministic. // We generally recommend altering this or `top_p` but not both. Temperature OptNilFloat64 `json:"temperature"` // An alternative to sampling with temperature, called nucleus sampling, where the model considers // the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the // top 10% probability mass are considered. // We generally recommend altering this or `temperature` but not both. TopP OptNilFloat64 `json:"top_p"` }
Ref: #/components/schemas/CreateEditRequest
func (*CreateEditRequest) Decode ¶
func (s *CreateEditRequest) Decode(d *jx.Decoder) error
Decode decodes CreateEditRequest from json.
func (*CreateEditRequest) Encode ¶
func (s *CreateEditRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateEditRequest) GetInput ¶
func (s *CreateEditRequest) GetInput() OptNilString
GetInput returns the value of Input.
func (*CreateEditRequest) GetInstruction ¶
func (s *CreateEditRequest) GetInstruction() string
GetInstruction returns the value of Instruction.
func (*CreateEditRequest) GetModel ¶
func (s *CreateEditRequest) GetModel() string
GetModel returns the value of Model.
func (*CreateEditRequest) GetN ¶
func (s *CreateEditRequest) GetN() OptNilInt
GetN returns the value of N.
func (*CreateEditRequest) GetTemperature ¶
func (s *CreateEditRequest) GetTemperature() OptNilFloat64
GetTemperature returns the value of Temperature.
func (*CreateEditRequest) GetTopP ¶
func (s *CreateEditRequest) GetTopP() OptNilFloat64
GetTopP returns the value of TopP.
func (*CreateEditRequest) MarshalJSON ¶
func (s *CreateEditRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateEditRequest) SetInput ¶
func (s *CreateEditRequest) SetInput(val OptNilString)
SetInput sets the value of Input.
func (*CreateEditRequest) SetInstruction ¶
func (s *CreateEditRequest) SetInstruction(val string)
SetInstruction sets the value of Instruction.
func (*CreateEditRequest) SetModel ¶
func (s *CreateEditRequest) SetModel(val string)
SetModel sets the value of Model.
func (*CreateEditRequest) SetN ¶
func (s *CreateEditRequest) SetN(val OptNilInt)
SetN sets the value of N.
func (*CreateEditRequest) SetTemperature ¶
func (s *CreateEditRequest) SetTemperature(val OptNilFloat64)
SetTemperature sets the value of Temperature.
func (*CreateEditRequest) SetTopP ¶
func (s *CreateEditRequest) SetTopP(val OptNilFloat64)
SetTopP sets the value of TopP.
func (*CreateEditRequest) UnmarshalJSON ¶
func (s *CreateEditRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateEditRequest) Validate ¶
func (s *CreateEditRequest) Validate() error
type CreateEditResponse ¶
type CreateEditResponse struct { Object string `json:"object"` Created int `json:"created"` Choices []CreateEditResponseChoicesItem `json:"choices"` Usage CreateEditResponseUsage `json:"usage"` }
Ref: #/components/schemas/CreateEditResponse
func (*CreateEditResponse) Decode ¶
func (s *CreateEditResponse) Decode(d *jx.Decoder) error
Decode decodes CreateEditResponse from json.
func (*CreateEditResponse) Encode ¶
func (s *CreateEditResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateEditResponse) GetChoices ¶
func (s *CreateEditResponse) GetChoices() []CreateEditResponseChoicesItem
GetChoices returns the value of Choices.
func (*CreateEditResponse) GetCreated ¶
func (s *CreateEditResponse) GetCreated() int
GetCreated returns the value of Created.
func (*CreateEditResponse) GetObject ¶
func (s *CreateEditResponse) GetObject() string
GetObject returns the value of Object.
func (*CreateEditResponse) GetUsage ¶
func (s *CreateEditResponse) GetUsage() CreateEditResponseUsage
GetUsage returns the value of Usage.
func (*CreateEditResponse) MarshalJSON ¶
func (s *CreateEditResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateEditResponse) SetChoices ¶
func (s *CreateEditResponse) SetChoices(val []CreateEditResponseChoicesItem)
SetChoices sets the value of Choices.
func (*CreateEditResponse) SetCreated ¶
func (s *CreateEditResponse) SetCreated(val int)
SetCreated sets the value of Created.
func (*CreateEditResponse) SetObject ¶
func (s *CreateEditResponse) SetObject(val string)
SetObject sets the value of Object.
func (*CreateEditResponse) SetUsage ¶
func (s *CreateEditResponse) SetUsage(val CreateEditResponseUsage)
SetUsage sets the value of Usage.
func (*CreateEditResponse) UnmarshalJSON ¶
func (s *CreateEditResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateEditResponse) Validate ¶
func (s *CreateEditResponse) Validate() error
type CreateEditResponseChoicesItem ¶
type CreateEditResponseChoicesItem struct { Text OptString `json:"text"` Index OptInt `json:"index"` Logprobs OptNilCreateEditResponseChoicesItemLogprobs `json:"logprobs"` FinishReason OptString `json:"finish_reason"` }
func (*CreateEditResponseChoicesItem) Decode ¶
func (s *CreateEditResponseChoicesItem) Decode(d *jx.Decoder) error
Decode decodes CreateEditResponseChoicesItem from json.
func (*CreateEditResponseChoicesItem) Encode ¶
func (s *CreateEditResponseChoicesItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateEditResponseChoicesItem) GetFinishReason ¶
func (s *CreateEditResponseChoicesItem) GetFinishReason() OptString
GetFinishReason returns the value of FinishReason.
func (*CreateEditResponseChoicesItem) GetIndex ¶
func (s *CreateEditResponseChoicesItem) GetIndex() OptInt
GetIndex returns the value of Index.
func (*CreateEditResponseChoicesItem) GetLogprobs ¶
func (s *CreateEditResponseChoicesItem) GetLogprobs() OptNilCreateEditResponseChoicesItemLogprobs
GetLogprobs returns the value of Logprobs.
func (*CreateEditResponseChoicesItem) GetText ¶
func (s *CreateEditResponseChoicesItem) GetText() OptString
GetText returns the value of Text.
func (*CreateEditResponseChoicesItem) MarshalJSON ¶
func (s *CreateEditResponseChoicesItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateEditResponseChoicesItem) SetFinishReason ¶
func (s *CreateEditResponseChoicesItem) SetFinishReason(val OptString)
SetFinishReason sets the value of FinishReason.
func (*CreateEditResponseChoicesItem) SetIndex ¶
func (s *CreateEditResponseChoicesItem) SetIndex(val OptInt)
SetIndex sets the value of Index.
func (*CreateEditResponseChoicesItem) SetLogprobs ¶
func (s *CreateEditResponseChoicesItem) SetLogprobs(val OptNilCreateEditResponseChoicesItemLogprobs)
SetLogprobs sets the value of Logprobs.
func (*CreateEditResponseChoicesItem) SetText ¶
func (s *CreateEditResponseChoicesItem) SetText(val OptString)
SetText sets the value of Text.
func (*CreateEditResponseChoicesItem) UnmarshalJSON ¶
func (s *CreateEditResponseChoicesItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateEditResponseChoicesItem) Validate ¶
func (s *CreateEditResponseChoicesItem) Validate() error
type CreateEditResponseChoicesItemLogprobs ¶
type CreateEditResponseChoicesItemLogprobs struct { Tokens []string `json:"tokens"` TokenLogprobs []float64 `json:"token_logprobs"` TopLogprobs []CreateEditResponseChoicesItemLogprobsTopLogprobsItem `json:"top_logprobs"` TextOffset []int `json:"text_offset"` }
func (*CreateEditResponseChoicesItemLogprobs) Decode ¶
func (s *CreateEditResponseChoicesItemLogprobs) Decode(d *jx.Decoder) error
Decode decodes CreateEditResponseChoicesItemLogprobs from json.
func (*CreateEditResponseChoicesItemLogprobs) Encode ¶
func (s *CreateEditResponseChoicesItemLogprobs) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateEditResponseChoicesItemLogprobs) GetTextOffset ¶
func (s *CreateEditResponseChoicesItemLogprobs) GetTextOffset() []int
GetTextOffset returns the value of TextOffset.
func (*CreateEditResponseChoicesItemLogprobs) GetTokenLogprobs ¶
func (s *CreateEditResponseChoicesItemLogprobs) GetTokenLogprobs() []float64
GetTokenLogprobs returns the value of TokenLogprobs.
func (*CreateEditResponseChoicesItemLogprobs) GetTokens ¶
func (s *CreateEditResponseChoicesItemLogprobs) GetTokens() []string
GetTokens returns the value of Tokens.
func (*CreateEditResponseChoicesItemLogprobs) GetTopLogprobs ¶
func (s *CreateEditResponseChoicesItemLogprobs) GetTopLogprobs() []CreateEditResponseChoicesItemLogprobsTopLogprobsItem
GetTopLogprobs returns the value of TopLogprobs.
func (*CreateEditResponseChoicesItemLogprobs) MarshalJSON ¶
func (s *CreateEditResponseChoicesItemLogprobs) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateEditResponseChoicesItemLogprobs) SetTextOffset ¶
func (s *CreateEditResponseChoicesItemLogprobs) SetTextOffset(val []int)
SetTextOffset sets the value of TextOffset.
func (*CreateEditResponseChoicesItemLogprobs) SetTokenLogprobs ¶
func (s *CreateEditResponseChoicesItemLogprobs) SetTokenLogprobs(val []float64)
SetTokenLogprobs sets the value of TokenLogprobs.
func (*CreateEditResponseChoicesItemLogprobs) SetTokens ¶
func (s *CreateEditResponseChoicesItemLogprobs) SetTokens(val []string)
SetTokens sets the value of Tokens.
func (*CreateEditResponseChoicesItemLogprobs) SetTopLogprobs ¶
func (s *CreateEditResponseChoicesItemLogprobs) SetTopLogprobs(val []CreateEditResponseChoicesItemLogprobsTopLogprobsItem)
SetTopLogprobs sets the value of TopLogprobs.
func (*CreateEditResponseChoicesItemLogprobs) UnmarshalJSON ¶
func (s *CreateEditResponseChoicesItemLogprobs) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateEditResponseChoicesItemLogprobs) Validate ¶
func (s *CreateEditResponseChoicesItemLogprobs) Validate() error
type CreateEditResponseChoicesItemLogprobsTopLogprobsItem ¶
type CreateEditResponseChoicesItemLogprobsTopLogprobsItem struct{}
func (*CreateEditResponseChoicesItemLogprobsTopLogprobsItem) Decode ¶
func (s *CreateEditResponseChoicesItemLogprobsTopLogprobsItem) Decode(d *jx.Decoder) error
Decode decodes CreateEditResponseChoicesItemLogprobsTopLogprobsItem from json.
func (*CreateEditResponseChoicesItemLogprobsTopLogprobsItem) Encode ¶
func (s *CreateEditResponseChoicesItemLogprobsTopLogprobsItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateEditResponseChoicesItemLogprobsTopLogprobsItem) MarshalJSON ¶
func (s *CreateEditResponseChoicesItemLogprobsTopLogprobsItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateEditResponseChoicesItemLogprobsTopLogprobsItem) UnmarshalJSON ¶
func (s *CreateEditResponseChoicesItemLogprobsTopLogprobsItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateEditResponseUsage ¶
type CreateEditResponseUsage struct { PromptTokens int `json:"prompt_tokens"` CompletionTokens int `json:"completion_tokens"` TotalTokens int `json:"total_tokens"` }
func (*CreateEditResponseUsage) Decode ¶
func (s *CreateEditResponseUsage) Decode(d *jx.Decoder) error
Decode decodes CreateEditResponseUsage from json.
func (*CreateEditResponseUsage) Encode ¶
func (s *CreateEditResponseUsage) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateEditResponseUsage) GetCompletionTokens ¶
func (s *CreateEditResponseUsage) GetCompletionTokens() int
GetCompletionTokens returns the value of CompletionTokens.
func (*CreateEditResponseUsage) GetPromptTokens ¶
func (s *CreateEditResponseUsage) GetPromptTokens() int
GetPromptTokens returns the value of PromptTokens.
func (*CreateEditResponseUsage) GetTotalTokens ¶
func (s *CreateEditResponseUsage) GetTotalTokens() int
GetTotalTokens returns the value of TotalTokens.
func (*CreateEditResponseUsage) MarshalJSON ¶
func (s *CreateEditResponseUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateEditResponseUsage) SetCompletionTokens ¶
func (s *CreateEditResponseUsage) SetCompletionTokens(val int)
SetCompletionTokens sets the value of CompletionTokens.
func (*CreateEditResponseUsage) SetPromptTokens ¶
func (s *CreateEditResponseUsage) SetPromptTokens(val int)
SetPromptTokens sets the value of PromptTokens.
func (*CreateEditResponseUsage) SetTotalTokens ¶
func (s *CreateEditResponseUsage) SetTotalTokens(val int)
SetTotalTokens sets the value of TotalTokens.
func (*CreateEditResponseUsage) UnmarshalJSON ¶
func (s *CreateEditResponseUsage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateFineTuneRequest ¶
type CreateFineTuneRequest struct { // The ID of an uploaded file that contains training data. // See [upload file](/docs/api-reference/files/upload) for how to upload a file. // Your dataset must be formatted as a JSONL file, where each training // example is a JSON object with the keys "prompt" and "completion". // Additionally, you must upload your file with the purpose `fine-tune`. // See the [fine-tuning guide](/docs/guides/fine-tuning/creating-training-data) for more details. TrainingFile string `json:"training_file"` // The ID of an uploaded file that contains validation data. // If you provide this file, the data is used to generate validation // metrics periodically during fine-tuning. These metrics can be viewed in // the [fine-tuning results file](/docs/guides/fine-tuning/analyzing-your-fine-tuned-model). // Your train and validation data should be mutually exclusive. // Your dataset must be formatted as a JSONL file, where each validation // example is a JSON object with the keys "prompt" and "completion". // Additionally, you must upload your file with the purpose `fine-tune`. // See the [fine-tuning guide](/docs/guides/fine-tuning/creating-training-data) for more details. ValidationFile OptNilString `json:"validation_file"` // The name of the base model to fine-tune. You can select one of "ada", // "babbage", "curie", "davinci", or a fine-tuned model created after 2022-04-21. // To learn more about these models, see the // [Models](https://platform.openai.com/docs/models) documentation. Model OptNilString `json:"model"` // The number of epochs to train the model for. An epoch refers to one // full cycle through the training dataset. NEpochs OptNilInt `json:"n_epochs"` // The batch size to use for training. The batch size is the number of // training examples used to train a single forward and backward pass. // By default, the batch size will be dynamically configured to be // ~0.2% of the number of examples in the training set, capped at 256 - // in general, we've found that larger batch sizes tend to work better // for larger datasets. BatchSize OptNilInt `json:"batch_size"` // The learning rate multiplier to use for training. // The fine-tuning learning rate is the original learning rate used for // pretraining multiplied by this value. // By default, the learning rate multiplier is the 0.05, 0.1, or 0.2 // depending on final `batch_size` (larger learning rates tend to // perform better with larger batch sizes). We recommend experimenting // with values in the range 0.02 to 0.2 to see what produces the best // results. LearningRateMultiplier OptNilFloat64 `json:"learning_rate_multiplier"` // The weight to use for loss on the prompt tokens. This controls how // much the model tries to learn to generate the prompt (as compared // to the completion which always has a weight of 1.0), and can add // a stabilizing effect to training when completions are short. // If prompts are extremely long (relative to completions), it may make // sense to reduce this weight so as to avoid over-prioritizing // learning the prompt. PromptLossWeight OptNilFloat64 `json:"prompt_loss_weight"` // If set, we calculate classification-specific metrics such as accuracy // and F-1 score using the validation set at the end of every epoch. // These metrics can be viewed in the [results // file](/docs/guides/fine-tuning/analyzing-your-fine-tuned-model). // In order to compute classification metrics, you must provide a // `validation_file`. Additionally, you must // specify `classification_n_classes` for multiclass classification or // `classification_positive_class` for binary classification. ComputeClassificationMetrics OptNilBool `json:"compute_classification_metrics"` // The number of classes in a classification task. // This parameter is required for multiclass classification. ClassificationNClasses OptNilInt `json:"classification_n_classes"` // The positive class in binary classification. // This parameter is needed to generate precision, recall, and F1 // metrics when doing binary classification. ClassificationPositiveClass OptNilString `json:"classification_positive_class"` // If this is provided, we calculate F-beta scores at the specified // beta values. The F-beta score is a generalization of F-1 score. // This is only used for binary classification. // With a beta of 1 (i.e. the F-1 score), precision and recall are // given the same weight. A larger beta score puts more weight on // recall and less on precision. A smaller beta score puts more weight // on precision and less on recall. ClassificationBetas OptNilFloat64Array `json:"classification_betas"` // A string of up to 40 characters that will be added to your fine-tuned model name. // For example, a `suffix` of "custom-model-name" would produce a model name like // `ada:ft-your-org:custom-model-name-2022-02-15-04-21-04`. Suffix OptNilString `json:"suffix"` }
Ref: #/components/schemas/CreateFineTuneRequest
func (*CreateFineTuneRequest) Decode ¶
func (s *CreateFineTuneRequest) Decode(d *jx.Decoder) error
Decode decodes CreateFineTuneRequest from json.
func (*CreateFineTuneRequest) Encode ¶
func (s *CreateFineTuneRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateFineTuneRequest) GetBatchSize ¶
func (s *CreateFineTuneRequest) GetBatchSize() OptNilInt
GetBatchSize returns the value of BatchSize.
func (*CreateFineTuneRequest) GetClassificationBetas ¶
func (s *CreateFineTuneRequest) GetClassificationBetas() OptNilFloat64Array
GetClassificationBetas returns the value of ClassificationBetas.
func (*CreateFineTuneRequest) GetClassificationNClasses ¶
func (s *CreateFineTuneRequest) GetClassificationNClasses() OptNilInt
GetClassificationNClasses returns the value of ClassificationNClasses.
func (*CreateFineTuneRequest) GetClassificationPositiveClass ¶
func (s *CreateFineTuneRequest) GetClassificationPositiveClass() OptNilString
GetClassificationPositiveClass returns the value of ClassificationPositiveClass.
func (*CreateFineTuneRequest) GetComputeClassificationMetrics ¶
func (s *CreateFineTuneRequest) GetComputeClassificationMetrics() OptNilBool
GetComputeClassificationMetrics returns the value of ComputeClassificationMetrics.
func (*CreateFineTuneRequest) GetLearningRateMultiplier ¶
func (s *CreateFineTuneRequest) GetLearningRateMultiplier() OptNilFloat64
GetLearningRateMultiplier returns the value of LearningRateMultiplier.
func (*CreateFineTuneRequest) GetModel ¶
func (s *CreateFineTuneRequest) GetModel() OptNilString
GetModel returns the value of Model.
func (*CreateFineTuneRequest) GetNEpochs ¶
func (s *CreateFineTuneRequest) GetNEpochs() OptNilInt
GetNEpochs returns the value of NEpochs.
func (*CreateFineTuneRequest) GetPromptLossWeight ¶
func (s *CreateFineTuneRequest) GetPromptLossWeight() OptNilFloat64
GetPromptLossWeight returns the value of PromptLossWeight.
func (*CreateFineTuneRequest) GetSuffix ¶
func (s *CreateFineTuneRequest) GetSuffix() OptNilString
GetSuffix returns the value of Suffix.
func (*CreateFineTuneRequest) GetTrainingFile ¶
func (s *CreateFineTuneRequest) GetTrainingFile() string
GetTrainingFile returns the value of TrainingFile.
func (*CreateFineTuneRequest) GetValidationFile ¶
func (s *CreateFineTuneRequest) GetValidationFile() OptNilString
GetValidationFile returns the value of ValidationFile.
func (*CreateFineTuneRequest) MarshalJSON ¶
func (s *CreateFineTuneRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateFineTuneRequest) SetBatchSize ¶
func (s *CreateFineTuneRequest) SetBatchSize(val OptNilInt)
SetBatchSize sets the value of BatchSize.
func (*CreateFineTuneRequest) SetClassificationBetas ¶
func (s *CreateFineTuneRequest) SetClassificationBetas(val OptNilFloat64Array)
SetClassificationBetas sets the value of ClassificationBetas.
func (*CreateFineTuneRequest) SetClassificationNClasses ¶
func (s *CreateFineTuneRequest) SetClassificationNClasses(val OptNilInt)
SetClassificationNClasses sets the value of ClassificationNClasses.
func (*CreateFineTuneRequest) SetClassificationPositiveClass ¶
func (s *CreateFineTuneRequest) SetClassificationPositiveClass(val OptNilString)
SetClassificationPositiveClass sets the value of ClassificationPositiveClass.
func (*CreateFineTuneRequest) SetComputeClassificationMetrics ¶
func (s *CreateFineTuneRequest) SetComputeClassificationMetrics(val OptNilBool)
SetComputeClassificationMetrics sets the value of ComputeClassificationMetrics.
func (*CreateFineTuneRequest) SetLearningRateMultiplier ¶
func (s *CreateFineTuneRequest) SetLearningRateMultiplier(val OptNilFloat64)
SetLearningRateMultiplier sets the value of LearningRateMultiplier.
func (*CreateFineTuneRequest) SetModel ¶
func (s *CreateFineTuneRequest) SetModel(val OptNilString)
SetModel sets the value of Model.
func (*CreateFineTuneRequest) SetNEpochs ¶
func (s *CreateFineTuneRequest) SetNEpochs(val OptNilInt)
SetNEpochs sets the value of NEpochs.
func (*CreateFineTuneRequest) SetPromptLossWeight ¶
func (s *CreateFineTuneRequest) SetPromptLossWeight(val OptNilFloat64)
SetPromptLossWeight sets the value of PromptLossWeight.
func (*CreateFineTuneRequest) SetSuffix ¶
func (s *CreateFineTuneRequest) SetSuffix(val OptNilString)
SetSuffix sets the value of Suffix.
func (*CreateFineTuneRequest) SetTrainingFile ¶
func (s *CreateFineTuneRequest) SetTrainingFile(val string)
SetTrainingFile sets the value of TrainingFile.
func (*CreateFineTuneRequest) SetValidationFile ¶
func (s *CreateFineTuneRequest) SetValidationFile(val OptNilString)
SetValidationFile sets the value of ValidationFile.
func (*CreateFineTuneRequest) UnmarshalJSON ¶
func (s *CreateFineTuneRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateFineTuneRequest) Validate ¶
func (s *CreateFineTuneRequest) Validate() error
type CreateImageEditRequest ¶
type CreateImageEditRequest struct { // The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, // image must have transparency, which will be used as the mask. Image string `json:"image"` // An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where // `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as // `image`. Mask OptString `json:"mask"` // A text description of the desired image(s). The maximum length is 1000 characters. Prompt string `json:"prompt"` // The number of images to generate. Must be between 1 and 10. N OptNilInt `json:"n"` // The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. Size OptNilCreateImageEditRequestSize `json:"size"` // The format in which the generated images are returned. Must be one of `url` or `b64_json`. ResponseFormat OptNilCreateImageEditRequestResponseFormat `json:"response_format"` // A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. // [Learn more](/docs/guides/safety-best-practices/end-user-ids). User OptString `json:"user"` }
Ref: #/components/schemas/CreateImageEditRequest
func (*CreateImageEditRequest) GetImage ¶
func (s *CreateImageEditRequest) GetImage() string
GetImage returns the value of Image.
func (*CreateImageEditRequest) GetMask ¶
func (s *CreateImageEditRequest) GetMask() OptString
GetMask returns the value of Mask.
func (*CreateImageEditRequest) GetN ¶
func (s *CreateImageEditRequest) GetN() OptNilInt
GetN returns the value of N.
func (*CreateImageEditRequest) GetPrompt ¶
func (s *CreateImageEditRequest) GetPrompt() string
GetPrompt returns the value of Prompt.
func (*CreateImageEditRequest) GetResponseFormat ¶
func (s *CreateImageEditRequest) GetResponseFormat() OptNilCreateImageEditRequestResponseFormat
GetResponseFormat returns the value of ResponseFormat.
func (*CreateImageEditRequest) GetSize ¶
func (s *CreateImageEditRequest) GetSize() OptNilCreateImageEditRequestSize
GetSize returns the value of Size.
func (*CreateImageEditRequest) GetUser ¶
func (s *CreateImageEditRequest) GetUser() OptString
GetUser returns the value of User.
func (*CreateImageEditRequest) SetImage ¶
func (s *CreateImageEditRequest) SetImage(val string)
SetImage sets the value of Image.
func (*CreateImageEditRequest) SetMask ¶
func (s *CreateImageEditRequest) SetMask(val OptString)
SetMask sets the value of Mask.
func (*CreateImageEditRequest) SetN ¶
func (s *CreateImageEditRequest) SetN(val OptNilInt)
SetN sets the value of N.
func (*CreateImageEditRequest) SetPrompt ¶
func (s *CreateImageEditRequest) SetPrompt(val string)
SetPrompt sets the value of Prompt.
func (*CreateImageEditRequest) SetResponseFormat ¶
func (s *CreateImageEditRequest) SetResponseFormat(val OptNilCreateImageEditRequestResponseFormat)
SetResponseFormat sets the value of ResponseFormat.
func (*CreateImageEditRequest) SetSize ¶
func (s *CreateImageEditRequest) SetSize(val OptNilCreateImageEditRequestSize)
SetSize sets the value of Size.
func (*CreateImageEditRequest) SetUser ¶
func (s *CreateImageEditRequest) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateImageEditRequest) Validate ¶
func (s *CreateImageEditRequest) Validate() error
type CreateImageEditRequestForm ¶
type CreateImageEditRequestForm struct { // The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, // image must have transparency, which will be used as the mask. Image ht.MultipartFile `json:"image"` // An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where // `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as // `image`. Mask OptMultipartFile `json:"mask"` // A text description of the desired image(s). The maximum length is 1000 characters. Prompt string `json:"prompt"` // The number of images to generate. Must be between 1 and 10. N OptNilInt `json:"n"` // The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. Size OptNilCreateImageEditRequestSize `json:"size"` // The format in which the generated images are returned. Must be one of `url` or `b64_json`. ResponseFormat OptNilCreateImageEditRequestResponseFormat `json:"response_format"` // A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. // [Learn more](/docs/guides/safety-best-practices/end-user-ids). User OptString `json:"user"` }
Ref: #/components/schemas/CreateImageEditRequest
func (*CreateImageEditRequestForm) GetImage ¶
func (s *CreateImageEditRequestForm) GetImage() ht.MultipartFile
GetImage returns the value of Image.
func (*CreateImageEditRequestForm) GetMask ¶
func (s *CreateImageEditRequestForm) GetMask() OptMultipartFile
GetMask returns the value of Mask.
func (*CreateImageEditRequestForm) GetN ¶
func (s *CreateImageEditRequestForm) GetN() OptNilInt
GetN returns the value of N.
func (*CreateImageEditRequestForm) GetPrompt ¶
func (s *CreateImageEditRequestForm) GetPrompt() string
GetPrompt returns the value of Prompt.
func (*CreateImageEditRequestForm) GetResponseFormat ¶
func (s *CreateImageEditRequestForm) GetResponseFormat() OptNilCreateImageEditRequestResponseFormat
GetResponseFormat returns the value of ResponseFormat.
func (*CreateImageEditRequestForm) GetSize ¶
func (s *CreateImageEditRequestForm) GetSize() OptNilCreateImageEditRequestSize
GetSize returns the value of Size.
func (*CreateImageEditRequestForm) GetUser ¶
func (s *CreateImageEditRequestForm) GetUser() OptString
GetUser returns the value of User.
func (*CreateImageEditRequestForm) SetImage ¶
func (s *CreateImageEditRequestForm) SetImage(val ht.MultipartFile)
SetImage sets the value of Image.
func (*CreateImageEditRequestForm) SetMask ¶
func (s *CreateImageEditRequestForm) SetMask(val OptMultipartFile)
SetMask sets the value of Mask.
func (*CreateImageEditRequestForm) SetN ¶
func (s *CreateImageEditRequestForm) SetN(val OptNilInt)
SetN sets the value of N.
func (*CreateImageEditRequestForm) SetPrompt ¶
func (s *CreateImageEditRequestForm) SetPrompt(val string)
SetPrompt sets the value of Prompt.
func (*CreateImageEditRequestForm) SetResponseFormat ¶
func (s *CreateImageEditRequestForm) SetResponseFormat(val OptNilCreateImageEditRequestResponseFormat)
SetResponseFormat sets the value of ResponseFormat.
func (*CreateImageEditRequestForm) SetSize ¶
func (s *CreateImageEditRequestForm) SetSize(val OptNilCreateImageEditRequestSize)
SetSize sets the value of Size.
func (*CreateImageEditRequestForm) SetUser ¶
func (s *CreateImageEditRequestForm) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateImageEditRequestForm) Validate ¶
func (s *CreateImageEditRequestForm) Validate() error
type CreateImageEditRequestResponseFormat ¶
type CreateImageEditRequestResponseFormat string
The format in which the generated images are returned. Must be one of `url` or `b64_json`.
const ( CreateImageEditRequestResponseFormatURL CreateImageEditRequestResponseFormat = "url" CreateImageEditRequestResponseFormatB64JSON CreateImageEditRequestResponseFormat = "b64_json" )
func (CreateImageEditRequestResponseFormat) MarshalText ¶
func (s CreateImageEditRequestResponseFormat) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateImageEditRequestResponseFormat) UnmarshalText ¶
func (s *CreateImageEditRequestResponseFormat) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateImageEditRequestResponseFormat) Validate ¶
func (s CreateImageEditRequestResponseFormat) Validate() error
type CreateImageEditRequestSize ¶
type CreateImageEditRequestSize string
The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
const ( CreateImageEditRequestSize256x256 CreateImageEditRequestSize = "256x256" CreateImageEditRequestSize512x512 CreateImageEditRequestSize = "512x512" CreateImageEditRequestSize1024x1024 CreateImageEditRequestSize = "1024x1024" )
func (CreateImageEditRequestSize) MarshalText ¶
func (s CreateImageEditRequestSize) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateImageEditRequestSize) UnmarshalText ¶
func (s *CreateImageEditRequestSize) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateImageEditRequestSize) Validate ¶
func (s CreateImageEditRequestSize) Validate() error
type CreateImageRequest ¶
type CreateImageRequest struct { // A text description of the desired image(s). The maximum length is 1000 characters. Prompt string `json:"prompt"` // The number of images to generate. Must be between 1 and 10. N OptNilInt `json:"n"` // The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. Size OptNilCreateImageRequestSize `json:"size"` // The format in which the generated images are returned. Must be one of `url` or `b64_json`. ResponseFormat OptNilCreateImageRequestResponseFormat `json:"response_format"` // A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. // [Learn more](/docs/guides/safety-best-practices/end-user-ids). User OptString `json:"user"` }
Ref: #/components/schemas/CreateImageRequest
func (*CreateImageRequest) Decode ¶
func (s *CreateImageRequest) Decode(d *jx.Decoder) error
Decode decodes CreateImageRequest from json.
func (*CreateImageRequest) Encode ¶
func (s *CreateImageRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateImageRequest) GetN ¶
func (s *CreateImageRequest) GetN() OptNilInt
GetN returns the value of N.
func (*CreateImageRequest) GetPrompt ¶
func (s *CreateImageRequest) GetPrompt() string
GetPrompt returns the value of Prompt.
func (*CreateImageRequest) GetResponseFormat ¶
func (s *CreateImageRequest) GetResponseFormat() OptNilCreateImageRequestResponseFormat
GetResponseFormat returns the value of ResponseFormat.
func (*CreateImageRequest) GetSize ¶
func (s *CreateImageRequest) GetSize() OptNilCreateImageRequestSize
GetSize returns the value of Size.
func (*CreateImageRequest) GetUser ¶
func (s *CreateImageRequest) GetUser() OptString
GetUser returns the value of User.
func (*CreateImageRequest) MarshalJSON ¶
func (s *CreateImageRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateImageRequest) SetN ¶
func (s *CreateImageRequest) SetN(val OptNilInt)
SetN sets the value of N.
func (*CreateImageRequest) SetPrompt ¶
func (s *CreateImageRequest) SetPrompt(val string)
SetPrompt sets the value of Prompt.
func (*CreateImageRequest) SetResponseFormat ¶
func (s *CreateImageRequest) SetResponseFormat(val OptNilCreateImageRequestResponseFormat)
SetResponseFormat sets the value of ResponseFormat.
func (*CreateImageRequest) SetSize ¶
func (s *CreateImageRequest) SetSize(val OptNilCreateImageRequestSize)
SetSize sets the value of Size.
func (*CreateImageRequest) SetUser ¶
func (s *CreateImageRequest) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateImageRequest) UnmarshalJSON ¶
func (s *CreateImageRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateImageRequest) Validate ¶
func (s *CreateImageRequest) Validate() error
type CreateImageRequestResponseFormat ¶
type CreateImageRequestResponseFormat string
The format in which the generated images are returned. Must be one of `url` or `b64_json`.
const ( CreateImageRequestResponseFormatURL CreateImageRequestResponseFormat = "url" CreateImageRequestResponseFormatB64JSON CreateImageRequestResponseFormat = "b64_json" )
func (*CreateImageRequestResponseFormat) Decode ¶
func (s *CreateImageRequestResponseFormat) Decode(d *jx.Decoder) error
Decode decodes CreateImageRequestResponseFormat from json.
func (CreateImageRequestResponseFormat) Encode ¶
func (s CreateImageRequestResponseFormat) Encode(e *jx.Encoder)
Encode encodes CreateImageRequestResponseFormat as json.
func (CreateImageRequestResponseFormat) MarshalJSON ¶
func (s CreateImageRequestResponseFormat) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (CreateImageRequestResponseFormat) MarshalText ¶
func (s CreateImageRequestResponseFormat) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateImageRequestResponseFormat) UnmarshalJSON ¶
func (s *CreateImageRequestResponseFormat) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateImageRequestResponseFormat) UnmarshalText ¶
func (s *CreateImageRequestResponseFormat) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateImageRequestResponseFormat) Validate ¶
func (s CreateImageRequestResponseFormat) Validate() error
type CreateImageRequestSize ¶
type CreateImageRequestSize string
The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
const ( CreateImageRequestSize256x256 CreateImageRequestSize = "256x256" CreateImageRequestSize512x512 CreateImageRequestSize = "512x512" CreateImageRequestSize1024x1024 CreateImageRequestSize = "1024x1024" )
func (*CreateImageRequestSize) Decode ¶
func (s *CreateImageRequestSize) Decode(d *jx.Decoder) error
Decode decodes CreateImageRequestSize from json.
func (CreateImageRequestSize) Encode ¶
func (s CreateImageRequestSize) Encode(e *jx.Encoder)
Encode encodes CreateImageRequestSize as json.
func (CreateImageRequestSize) MarshalJSON ¶
func (s CreateImageRequestSize) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (CreateImageRequestSize) MarshalText ¶
func (s CreateImageRequestSize) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateImageRequestSize) UnmarshalJSON ¶
func (s *CreateImageRequestSize) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateImageRequestSize) UnmarshalText ¶
func (s *CreateImageRequestSize) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateImageRequestSize) Validate ¶
func (s CreateImageRequestSize) Validate() error
type CreateImageVariationRequest ¶
type CreateImageVariationRequest struct { // The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and // square. Image string `json:"image"` // The number of images to generate. Must be between 1 and 10. N OptNilInt `json:"n"` // The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. Size OptNilCreateImageVariationRequestSize `json:"size"` // The format in which the generated images are returned. Must be one of `url` or `b64_json`. ResponseFormat OptNilCreateImageVariationRequestResponseFormat `json:"response_format"` // A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. // [Learn more](/docs/guides/safety-best-practices/end-user-ids). User OptString `json:"user"` }
Ref: #/components/schemas/CreateImageVariationRequest
func (*CreateImageVariationRequest) GetImage ¶
func (s *CreateImageVariationRequest) GetImage() string
GetImage returns the value of Image.
func (*CreateImageVariationRequest) GetN ¶
func (s *CreateImageVariationRequest) GetN() OptNilInt
GetN returns the value of N.
func (*CreateImageVariationRequest) GetResponseFormat ¶
func (s *CreateImageVariationRequest) GetResponseFormat() OptNilCreateImageVariationRequestResponseFormat
GetResponseFormat returns the value of ResponseFormat.
func (*CreateImageVariationRequest) GetSize ¶
func (s *CreateImageVariationRequest) GetSize() OptNilCreateImageVariationRequestSize
GetSize returns the value of Size.
func (*CreateImageVariationRequest) GetUser ¶
func (s *CreateImageVariationRequest) GetUser() OptString
GetUser returns the value of User.
func (*CreateImageVariationRequest) SetImage ¶
func (s *CreateImageVariationRequest) SetImage(val string)
SetImage sets the value of Image.
func (*CreateImageVariationRequest) SetN ¶
func (s *CreateImageVariationRequest) SetN(val OptNilInt)
SetN sets the value of N.
func (*CreateImageVariationRequest) SetResponseFormat ¶
func (s *CreateImageVariationRequest) SetResponseFormat(val OptNilCreateImageVariationRequestResponseFormat)
SetResponseFormat sets the value of ResponseFormat.
func (*CreateImageVariationRequest) SetSize ¶
func (s *CreateImageVariationRequest) SetSize(val OptNilCreateImageVariationRequestSize)
SetSize sets the value of Size.
func (*CreateImageVariationRequest) SetUser ¶
func (s *CreateImageVariationRequest) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateImageVariationRequest) Validate ¶
func (s *CreateImageVariationRequest) Validate() error
type CreateImageVariationRequestForm ¶
type CreateImageVariationRequestForm struct { // The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and // square. Image ht.MultipartFile `json:"image"` // The number of images to generate. Must be between 1 and 10. N OptNilInt `json:"n"` // The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. Size OptNilCreateImageVariationRequestSize `json:"size"` // The format in which the generated images are returned. Must be one of `url` or `b64_json`. ResponseFormat OptNilCreateImageVariationRequestResponseFormat `json:"response_format"` // A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. // [Learn more](/docs/guides/safety-best-practices/end-user-ids). User OptString `json:"user"` }
Ref: #/components/schemas/CreateImageVariationRequest
func (*CreateImageVariationRequestForm) GetImage ¶
func (s *CreateImageVariationRequestForm) GetImage() ht.MultipartFile
GetImage returns the value of Image.
func (*CreateImageVariationRequestForm) GetN ¶
func (s *CreateImageVariationRequestForm) GetN() OptNilInt
GetN returns the value of N.
func (*CreateImageVariationRequestForm) GetResponseFormat ¶
func (s *CreateImageVariationRequestForm) GetResponseFormat() OptNilCreateImageVariationRequestResponseFormat
GetResponseFormat returns the value of ResponseFormat.
func (*CreateImageVariationRequestForm) GetSize ¶
func (s *CreateImageVariationRequestForm) GetSize() OptNilCreateImageVariationRequestSize
GetSize returns the value of Size.
func (*CreateImageVariationRequestForm) GetUser ¶
func (s *CreateImageVariationRequestForm) GetUser() OptString
GetUser returns the value of User.
func (*CreateImageVariationRequestForm) SetImage ¶
func (s *CreateImageVariationRequestForm) SetImage(val ht.MultipartFile)
SetImage sets the value of Image.
func (*CreateImageVariationRequestForm) SetN ¶
func (s *CreateImageVariationRequestForm) SetN(val OptNilInt)
SetN sets the value of N.
func (*CreateImageVariationRequestForm) SetResponseFormat ¶
func (s *CreateImageVariationRequestForm) SetResponseFormat(val OptNilCreateImageVariationRequestResponseFormat)
SetResponseFormat sets the value of ResponseFormat.
func (*CreateImageVariationRequestForm) SetSize ¶
func (s *CreateImageVariationRequestForm) SetSize(val OptNilCreateImageVariationRequestSize)
SetSize sets the value of Size.
func (*CreateImageVariationRequestForm) SetUser ¶
func (s *CreateImageVariationRequestForm) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateImageVariationRequestForm) Validate ¶
func (s *CreateImageVariationRequestForm) Validate() error
type CreateImageVariationRequestResponseFormat ¶
type CreateImageVariationRequestResponseFormat string
The format in which the generated images are returned. Must be one of `url` or `b64_json`.
const ( CreateImageVariationRequestResponseFormatURL CreateImageVariationRequestResponseFormat = "url" CreateImageVariationRequestResponseFormatB64JSON CreateImageVariationRequestResponseFormat = "b64_json" )
func (CreateImageVariationRequestResponseFormat) MarshalText ¶
func (s CreateImageVariationRequestResponseFormat) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateImageVariationRequestResponseFormat) UnmarshalText ¶
func (s *CreateImageVariationRequestResponseFormat) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateImageVariationRequestResponseFormat) Validate ¶
func (s CreateImageVariationRequestResponseFormat) Validate() error
type CreateImageVariationRequestSize ¶
type CreateImageVariationRequestSize string
The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
const ( CreateImageVariationRequestSize256x256 CreateImageVariationRequestSize = "256x256" CreateImageVariationRequestSize512x512 CreateImageVariationRequestSize = "512x512" CreateImageVariationRequestSize1024x1024 CreateImageVariationRequestSize = "1024x1024" )
func (CreateImageVariationRequestSize) MarshalText ¶
func (s CreateImageVariationRequestSize) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateImageVariationRequestSize) UnmarshalText ¶
func (s *CreateImageVariationRequestSize) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateImageVariationRequestSize) Validate ¶
func (s CreateImageVariationRequestSize) Validate() error
type CreateModerationRequest ¶
type CreateModerationRequest struct { // The input text to classify. Input CreateModerationRequestInput `json:"input"` // Two content moderations models are available: `text-moderation-stable` and // `text-moderation-latest`. // The default is `text-moderation-latest` which will be automatically upgraded over time. This // ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will // provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be // slightly lower than for `text-moderation-latest`. Model OptString `json:"model"` }
Ref: #/components/schemas/CreateModerationRequest
func (*CreateModerationRequest) Decode ¶
func (s *CreateModerationRequest) Decode(d *jx.Decoder) error
Decode decodes CreateModerationRequest from json.
func (*CreateModerationRequest) Encode ¶
func (s *CreateModerationRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateModerationRequest) GetInput ¶
func (s *CreateModerationRequest) GetInput() CreateModerationRequestInput
GetInput returns the value of Input.
func (*CreateModerationRequest) GetModel ¶
func (s *CreateModerationRequest) GetModel() OptString
GetModel returns the value of Model.
func (*CreateModerationRequest) MarshalJSON ¶
func (s *CreateModerationRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateModerationRequest) SetInput ¶
func (s *CreateModerationRequest) SetInput(val CreateModerationRequestInput)
SetInput sets the value of Input.
func (*CreateModerationRequest) SetModel ¶
func (s *CreateModerationRequest) SetModel(val OptString)
SetModel sets the value of Model.
func (*CreateModerationRequest) UnmarshalJSON ¶
func (s *CreateModerationRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateModerationRequest) Validate ¶
func (s *CreateModerationRequest) Validate() error
type CreateModerationRequestInput ¶
type CreateModerationRequestInput struct { Type CreateModerationRequestInputType // switch on this field String string StringArray []string }
The input text to classify. CreateModerationRequestInput represents sum type.
func NewStringArrayCreateModerationRequestInput ¶
func NewStringArrayCreateModerationRequestInput(v []string) CreateModerationRequestInput
NewStringArrayCreateModerationRequestInput returns new CreateModerationRequestInput from []string.
func NewStringCreateModerationRequestInput ¶
func NewStringCreateModerationRequestInput(v string) CreateModerationRequestInput
NewStringCreateModerationRequestInput returns new CreateModerationRequestInput from string.
func (*CreateModerationRequestInput) Decode ¶
func (s *CreateModerationRequestInput) Decode(d *jx.Decoder) error
Decode decodes CreateModerationRequestInput from json.
func (CreateModerationRequestInput) Encode ¶
func (s CreateModerationRequestInput) Encode(e *jx.Encoder)
Encode encodes CreateModerationRequestInput as json.
func (CreateModerationRequestInput) GetString ¶
func (s CreateModerationRequestInput) GetString() (v string, ok bool)
GetString returns string and true boolean if CreateModerationRequestInput is string.
func (CreateModerationRequestInput) GetStringArray ¶
func (s CreateModerationRequestInput) GetStringArray() (v []string, ok bool)
GetStringArray returns []string and true boolean if CreateModerationRequestInput is []string.
func (CreateModerationRequestInput) IsString ¶
func (s CreateModerationRequestInput) IsString() bool
IsString reports whether CreateModerationRequestInput is string.
func (CreateModerationRequestInput) IsStringArray ¶
func (s CreateModerationRequestInput) IsStringArray() bool
IsStringArray reports whether CreateModerationRequestInput is []string.
func (CreateModerationRequestInput) MarshalJSON ¶
func (s CreateModerationRequestInput) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateModerationRequestInput) SetString ¶
func (s *CreateModerationRequestInput) SetString(v string)
SetString sets CreateModerationRequestInput to string.
func (*CreateModerationRequestInput) SetStringArray ¶
func (s *CreateModerationRequestInput) SetStringArray(v []string)
SetStringArray sets CreateModerationRequestInput to []string.
func (*CreateModerationRequestInput) UnmarshalJSON ¶
func (s *CreateModerationRequestInput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (CreateModerationRequestInput) Validate ¶
func (s CreateModerationRequestInput) Validate() error
type CreateModerationRequestInputType ¶
type CreateModerationRequestInputType string
CreateModerationRequestInputType is oneOf type of CreateModerationRequestInput.
const ( StringCreateModerationRequestInput CreateModerationRequestInputType = "string" StringArrayCreateModerationRequestInput CreateModerationRequestInputType = "[]string" )
Possible values for CreateModerationRequestInputType.
type CreateModerationResponse ¶
type CreateModerationResponse struct { ID string `json:"id"` Model string `json:"model"` Results []CreateModerationResponseResultsItem `json:"results"` }
Ref: #/components/schemas/CreateModerationResponse
func (*CreateModerationResponse) Decode ¶
func (s *CreateModerationResponse) Decode(d *jx.Decoder) error
Decode decodes CreateModerationResponse from json.
func (*CreateModerationResponse) Encode ¶
func (s *CreateModerationResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateModerationResponse) GetID ¶
func (s *CreateModerationResponse) GetID() string
GetID returns the value of ID.
func (*CreateModerationResponse) GetModel ¶
func (s *CreateModerationResponse) GetModel() string
GetModel returns the value of Model.
func (*CreateModerationResponse) GetResults ¶
func (s *CreateModerationResponse) GetResults() []CreateModerationResponseResultsItem
GetResults returns the value of Results.
func (*CreateModerationResponse) MarshalJSON ¶
func (s *CreateModerationResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateModerationResponse) SetID ¶
func (s *CreateModerationResponse) SetID(val string)
SetID sets the value of ID.
func (*CreateModerationResponse) SetModel ¶
func (s *CreateModerationResponse) SetModel(val string)
SetModel sets the value of Model.
func (*CreateModerationResponse) SetResults ¶
func (s *CreateModerationResponse) SetResults(val []CreateModerationResponseResultsItem)
SetResults sets the value of Results.
func (*CreateModerationResponse) UnmarshalJSON ¶
func (s *CreateModerationResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateModerationResponse) Validate ¶
func (s *CreateModerationResponse) Validate() error
type CreateModerationResponseResultsItem ¶
type CreateModerationResponseResultsItem struct { Flagged bool `json:"flagged"` Categories CreateModerationResponseResultsItemCategories `json:"categories"` CategoryScores CreateModerationResponseResultsItemCategoryScores `json:"category_scores"` }
func (*CreateModerationResponseResultsItem) Decode ¶
func (s *CreateModerationResponseResultsItem) Decode(d *jx.Decoder) error
Decode decodes CreateModerationResponseResultsItem from json.
func (*CreateModerationResponseResultsItem) Encode ¶
func (s *CreateModerationResponseResultsItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateModerationResponseResultsItem) GetCategories ¶
func (s *CreateModerationResponseResultsItem) GetCategories() CreateModerationResponseResultsItemCategories
GetCategories returns the value of Categories.
func (*CreateModerationResponseResultsItem) GetCategoryScores ¶
func (s *CreateModerationResponseResultsItem) GetCategoryScores() CreateModerationResponseResultsItemCategoryScores
GetCategoryScores returns the value of CategoryScores.
func (*CreateModerationResponseResultsItem) GetFlagged ¶
func (s *CreateModerationResponseResultsItem) GetFlagged() bool
GetFlagged returns the value of Flagged.
func (*CreateModerationResponseResultsItem) MarshalJSON ¶
func (s *CreateModerationResponseResultsItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateModerationResponseResultsItem) SetCategories ¶
func (s *CreateModerationResponseResultsItem) SetCategories(val CreateModerationResponseResultsItemCategories)
SetCategories sets the value of Categories.
func (*CreateModerationResponseResultsItem) SetCategoryScores ¶
func (s *CreateModerationResponseResultsItem) SetCategoryScores(val CreateModerationResponseResultsItemCategoryScores)
SetCategoryScores sets the value of CategoryScores.
func (*CreateModerationResponseResultsItem) SetFlagged ¶
func (s *CreateModerationResponseResultsItem) SetFlagged(val bool)
SetFlagged sets the value of Flagged.
func (*CreateModerationResponseResultsItem) UnmarshalJSON ¶
func (s *CreateModerationResponseResultsItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateModerationResponseResultsItem) Validate ¶
func (s *CreateModerationResponseResultsItem) Validate() error
type CreateModerationResponseResultsItemCategories ¶
type CreateModerationResponseResultsItemCategories struct { Hate bool `json:"hate"` HateSlashThreatening bool `json:"hate/threatening"` SelfMinusHarm bool `json:"self-harm"` Sexual bool `json:"sexual"` SexualSlashMinors bool `json:"sexual/minors"` Violence bool `json:"violence"` ViolenceSlashGraphic bool `json:"violence/graphic"` }
func (*CreateModerationResponseResultsItemCategories) Decode ¶
func (s *CreateModerationResponseResultsItemCategories) Decode(d *jx.Decoder) error
Decode decodes CreateModerationResponseResultsItemCategories from json.
func (*CreateModerationResponseResultsItemCategories) Encode ¶
func (s *CreateModerationResponseResultsItemCategories) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateModerationResponseResultsItemCategories) GetHate ¶
func (s *CreateModerationResponseResultsItemCategories) GetHate() bool
GetHate returns the value of Hate.
func (*CreateModerationResponseResultsItemCategories) GetHateSlashThreatening ¶
func (s *CreateModerationResponseResultsItemCategories) GetHateSlashThreatening() bool
GetHateSlashThreatening returns the value of HateSlashThreatening.
func (*CreateModerationResponseResultsItemCategories) GetSelfMinusHarm ¶
func (s *CreateModerationResponseResultsItemCategories) GetSelfMinusHarm() bool
GetSelfMinusHarm returns the value of SelfMinusHarm.
func (*CreateModerationResponseResultsItemCategories) GetSexual ¶
func (s *CreateModerationResponseResultsItemCategories) GetSexual() bool
GetSexual returns the value of Sexual.
func (*CreateModerationResponseResultsItemCategories) GetSexualSlashMinors ¶
func (s *CreateModerationResponseResultsItemCategories) GetSexualSlashMinors() bool
GetSexualSlashMinors returns the value of SexualSlashMinors.
func (*CreateModerationResponseResultsItemCategories) GetViolence ¶
func (s *CreateModerationResponseResultsItemCategories) GetViolence() bool
GetViolence returns the value of Violence.
func (*CreateModerationResponseResultsItemCategories) GetViolenceSlashGraphic ¶
func (s *CreateModerationResponseResultsItemCategories) GetViolenceSlashGraphic() bool
GetViolenceSlashGraphic returns the value of ViolenceSlashGraphic.
func (*CreateModerationResponseResultsItemCategories) MarshalJSON ¶
func (s *CreateModerationResponseResultsItemCategories) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateModerationResponseResultsItemCategories) SetHate ¶
func (s *CreateModerationResponseResultsItemCategories) SetHate(val bool)
SetHate sets the value of Hate.
func (*CreateModerationResponseResultsItemCategories) SetHateSlashThreatening ¶
func (s *CreateModerationResponseResultsItemCategories) SetHateSlashThreatening(val bool)
SetHateSlashThreatening sets the value of HateSlashThreatening.
func (*CreateModerationResponseResultsItemCategories) SetSelfMinusHarm ¶
func (s *CreateModerationResponseResultsItemCategories) SetSelfMinusHarm(val bool)
SetSelfMinusHarm sets the value of SelfMinusHarm.
func (*CreateModerationResponseResultsItemCategories) SetSexual ¶
func (s *CreateModerationResponseResultsItemCategories) SetSexual(val bool)
SetSexual sets the value of Sexual.
func (*CreateModerationResponseResultsItemCategories) SetSexualSlashMinors ¶
func (s *CreateModerationResponseResultsItemCategories) SetSexualSlashMinors(val bool)
SetSexualSlashMinors sets the value of SexualSlashMinors.
func (*CreateModerationResponseResultsItemCategories) SetViolence ¶
func (s *CreateModerationResponseResultsItemCategories) SetViolence(val bool)
SetViolence sets the value of Violence.
func (*CreateModerationResponseResultsItemCategories) SetViolenceSlashGraphic ¶
func (s *CreateModerationResponseResultsItemCategories) SetViolenceSlashGraphic(val bool)
SetViolenceSlashGraphic sets the value of ViolenceSlashGraphic.
func (*CreateModerationResponseResultsItemCategories) UnmarshalJSON ¶
func (s *CreateModerationResponseResultsItemCategories) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateModerationResponseResultsItemCategoryScores ¶
type CreateModerationResponseResultsItemCategoryScores struct { Hate float64 `json:"hate"` HateSlashThreatening float64 `json:"hate/threatening"` SelfMinusHarm float64 `json:"self-harm"` Sexual float64 `json:"sexual"` SexualSlashMinors float64 `json:"sexual/minors"` Violence float64 `json:"violence"` ViolenceSlashGraphic float64 `json:"violence/graphic"` }
func (*CreateModerationResponseResultsItemCategoryScores) Decode ¶
func (s *CreateModerationResponseResultsItemCategoryScores) Decode(d *jx.Decoder) error
Decode decodes CreateModerationResponseResultsItemCategoryScores from json.
func (*CreateModerationResponseResultsItemCategoryScores) Encode ¶
func (s *CreateModerationResponseResultsItemCategoryScores) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateModerationResponseResultsItemCategoryScores) GetHate ¶
func (s *CreateModerationResponseResultsItemCategoryScores) GetHate() float64
GetHate returns the value of Hate.
func (*CreateModerationResponseResultsItemCategoryScores) GetHateSlashThreatening ¶
func (s *CreateModerationResponseResultsItemCategoryScores) GetHateSlashThreatening() float64
GetHateSlashThreatening returns the value of HateSlashThreatening.
func (*CreateModerationResponseResultsItemCategoryScores) GetSelfMinusHarm ¶
func (s *CreateModerationResponseResultsItemCategoryScores) GetSelfMinusHarm() float64
GetSelfMinusHarm returns the value of SelfMinusHarm.
func (*CreateModerationResponseResultsItemCategoryScores) GetSexual ¶
func (s *CreateModerationResponseResultsItemCategoryScores) GetSexual() float64
GetSexual returns the value of Sexual.
func (*CreateModerationResponseResultsItemCategoryScores) GetSexualSlashMinors ¶
func (s *CreateModerationResponseResultsItemCategoryScores) GetSexualSlashMinors() float64
GetSexualSlashMinors returns the value of SexualSlashMinors.
func (*CreateModerationResponseResultsItemCategoryScores) GetViolence ¶
func (s *CreateModerationResponseResultsItemCategoryScores) GetViolence() float64
GetViolence returns the value of Violence.
func (*CreateModerationResponseResultsItemCategoryScores) GetViolenceSlashGraphic ¶
func (s *CreateModerationResponseResultsItemCategoryScores) GetViolenceSlashGraphic() float64
GetViolenceSlashGraphic returns the value of ViolenceSlashGraphic.
func (*CreateModerationResponseResultsItemCategoryScores) MarshalJSON ¶
func (s *CreateModerationResponseResultsItemCategoryScores) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateModerationResponseResultsItemCategoryScores) SetHate ¶
func (s *CreateModerationResponseResultsItemCategoryScores) SetHate(val float64)
SetHate sets the value of Hate.
func (*CreateModerationResponseResultsItemCategoryScores) SetHateSlashThreatening ¶
func (s *CreateModerationResponseResultsItemCategoryScores) SetHateSlashThreatening(val float64)
SetHateSlashThreatening sets the value of HateSlashThreatening.
func (*CreateModerationResponseResultsItemCategoryScores) SetSelfMinusHarm ¶
func (s *CreateModerationResponseResultsItemCategoryScores) SetSelfMinusHarm(val float64)
SetSelfMinusHarm sets the value of SelfMinusHarm.
func (*CreateModerationResponseResultsItemCategoryScores) SetSexual ¶
func (s *CreateModerationResponseResultsItemCategoryScores) SetSexual(val float64)
SetSexual sets the value of Sexual.
func (*CreateModerationResponseResultsItemCategoryScores) SetSexualSlashMinors ¶
func (s *CreateModerationResponseResultsItemCategoryScores) SetSexualSlashMinors(val float64)
SetSexualSlashMinors sets the value of SexualSlashMinors.
func (*CreateModerationResponseResultsItemCategoryScores) SetViolence ¶
func (s *CreateModerationResponseResultsItemCategoryScores) SetViolence(val float64)
SetViolence sets the value of Violence.
func (*CreateModerationResponseResultsItemCategoryScores) SetViolenceSlashGraphic ¶
func (s *CreateModerationResponseResultsItemCategoryScores) SetViolenceSlashGraphic(val float64)
SetViolenceSlashGraphic sets the value of ViolenceSlashGraphic.
func (*CreateModerationResponseResultsItemCategoryScores) UnmarshalJSON ¶
func (s *CreateModerationResponseResultsItemCategoryScores) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateModerationResponseResultsItemCategoryScores) Validate ¶
func (s *CreateModerationResponseResultsItemCategoryScores) Validate() error
type DeleteFileParams ¶
type DeleteFileParams struct { // The ID of the file to use for this request. FileID string }
DeleteFileParams is parameters of deleteFile operation.
type DeleteFileResponse ¶
type DeleteFileResponse struct { ID string `json:"id"` Object string `json:"object"` Deleted bool `json:"deleted"` }
Ref: #/components/schemas/DeleteFileResponse
func (*DeleteFileResponse) Decode ¶
func (s *DeleteFileResponse) Decode(d *jx.Decoder) error
Decode decodes DeleteFileResponse from json.
func (*DeleteFileResponse) Encode ¶
func (s *DeleteFileResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*DeleteFileResponse) GetDeleted ¶
func (s *DeleteFileResponse) GetDeleted() bool
GetDeleted returns the value of Deleted.
func (*DeleteFileResponse) GetID ¶
func (s *DeleteFileResponse) GetID() string
GetID returns the value of ID.
func (*DeleteFileResponse) GetObject ¶
func (s *DeleteFileResponse) GetObject() string
GetObject returns the value of Object.
func (*DeleteFileResponse) MarshalJSON ¶
func (s *DeleteFileResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DeleteFileResponse) SetDeleted ¶
func (s *DeleteFileResponse) SetDeleted(val bool)
SetDeleted sets the value of Deleted.
func (*DeleteFileResponse) SetID ¶
func (s *DeleteFileResponse) SetID(val string)
SetID sets the value of ID.
func (*DeleteFileResponse) SetObject ¶
func (s *DeleteFileResponse) SetObject(val string)
SetObject sets the value of Object.
func (*DeleteFileResponse) UnmarshalJSON ¶
func (s *DeleteFileResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type DeleteModelParams ¶
type DeleteModelParams struct { // The model to delete. Model string }
DeleteModelParams is parameters of deleteModel operation.
type DeleteModelResponse ¶
type DeleteModelResponse struct { ID string `json:"id"` Object string `json:"object"` Deleted bool `json:"deleted"` }
Ref: #/components/schemas/DeleteModelResponse
func (*DeleteModelResponse) Decode ¶
func (s *DeleteModelResponse) Decode(d *jx.Decoder) error
Decode decodes DeleteModelResponse from json.
func (*DeleteModelResponse) Encode ¶
func (s *DeleteModelResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*DeleteModelResponse) GetDeleted ¶
func (s *DeleteModelResponse) GetDeleted() bool
GetDeleted returns the value of Deleted.
func (*DeleteModelResponse) GetID ¶
func (s *DeleteModelResponse) GetID() string
GetID returns the value of ID.
func (*DeleteModelResponse) GetObject ¶
func (s *DeleteModelResponse) GetObject() string
GetObject returns the value of Object.
func (*DeleteModelResponse) MarshalJSON ¶
func (s *DeleteModelResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DeleteModelResponse) SetDeleted ¶
func (s *DeleteModelResponse) SetDeleted(val bool)
SetDeleted sets the value of Deleted.
func (*DeleteModelResponse) SetID ¶
func (s *DeleteModelResponse) SetID(val string)
SetID sets the value of ID.
func (*DeleteModelResponse) SetObject ¶
func (s *DeleteModelResponse) SetObject(val string)
SetObject sets the value of Object.
func (*DeleteModelResponse) UnmarshalJSON ¶
func (s *DeleteModelResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type DownloadFileParams ¶
type DownloadFileParams struct { // The ID of the file to use for this request. FileID string }
DownloadFileParams is parameters of downloadFile operation.
type FineTune ¶
func (FineTune) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*FineTune) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type FineTuneEvent ¶
func (*FineTuneEvent) Decode ¶
func (s *FineTuneEvent) Decode(d *jx.Decoder) error
Decode decodes FineTuneEvent from json.
func (FineTuneEvent) Encode ¶
func (s FineTuneEvent) Encode(e *jx.Encoder)
Encode encodes FineTuneEvent as json.
func (FineTuneEvent) MarshalJSON ¶
func (s FineTuneEvent) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*FineTuneEvent) UnmarshalJSON ¶
func (s *FineTuneEvent) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type Handler ¶
type Handler interface { // CancelFineTune implements cancelFineTune operation. // // Immediately cancel a fine-tune job. // // POST /fine-tunes/{fine_tune_id}/cancel CancelFineTune(ctx context.Context, params CancelFineTuneParams) (FineTune, error) // CreateChatCompletion implements createChatCompletion operation. // // Creates a completion for the chat message. // // POST /chat/completions CreateChatCompletion(ctx context.Context, req *CreateChatCompletionRequest) (*CreateChatCompletionResponse, error) // CreateEdit implements createEdit operation. // // Creates a new edit for the provided input, instruction, and parameters. // // POST /edits CreateEdit(ctx context.Context, req *CreateEditRequest) (*CreateEditResponse, error) // CreateFineTune implements createFineTune operation. // // Creates a job that fine-tunes a specified model from a given dataset. // Response includes details of the enqueued job including job status and the name of the fine-tuned // models once complete. // [Learn more about Fine-tuning](/docs/guides/fine-tuning). // // POST /fine-tunes CreateFineTune(ctx context.Context, req *CreateFineTuneRequest) (FineTune, error) // CreateImage implements createImage operation. // // Creates an image given a prompt. // // POST /images/generations CreateImage(ctx context.Context, req *CreateImageRequest) (ImagesResponse, error) // CreateImageEdit implements createImageEdit operation. // // Creates an edited or extended image given an original image and a prompt. // // POST /images/edits CreateImageEdit(ctx context.Context, req *CreateImageEditRequestForm) (ImagesResponse, error) // CreateImageVariation implements createImageVariation operation. // // Creates a variation of a given image. // // POST /images/variations CreateImageVariation(ctx context.Context, req *CreateImageVariationRequestForm) (ImagesResponse, error) // CreateModeration implements createModeration operation. // // Classifies if text violates OpenAI's Content Policy. // // POST /moderations CreateModeration(ctx context.Context, req *CreateModerationRequest) (*CreateModerationResponse, error) // DeleteFile implements deleteFile operation. // // Delete a file. // // DELETE /files/{file_id} DeleteFile(ctx context.Context, params DeleteFileParams) (*DeleteFileResponse, error) // DeleteModel implements deleteModel operation. // // Delete a fine-tuned model. You must have the Owner role in your organization. // // DELETE /models/{model} DeleteModel(ctx context.Context, params DeleteModelParams) (*DeleteModelResponse, error) // DownloadFile implements downloadFile operation. // // Returns the contents of the specified file. // // GET /files/{file_id}/content DownloadFile(ctx context.Context, params DownloadFileParams) (string, error) // ListFiles implements listFiles operation. // // Returns a list of files that belong to the user's organization. // // GET /files ListFiles(ctx context.Context) (*ListFilesResponse, error) // ListFineTuneEvents implements listFineTuneEvents operation. // // Get fine-grained status updates for a fine-tune job. // // GET /fine-tunes/{fine_tune_id}/events ListFineTuneEvents(ctx context.Context, params ListFineTuneEventsParams) (*ListFineTuneEventsResponse, error) // ListFineTunes implements listFineTunes operation. // // List your organization's fine-tuning jobs. // // GET /fine-tunes ListFineTunes(ctx context.Context) (*ListFineTunesResponse, error) // ListModels implements listModels operation. // // Lists the currently available models, and provides basic information about each one such as the // owner and availability. // // GET /models ListModels(ctx context.Context) (*ListModelsResponse, error) // RetrieveFile implements retrieveFile operation. // // Returns information about a specific file. // // GET /files/{file_id} RetrieveFile(ctx context.Context, params RetrieveFileParams) (OpenAIFile, error) // RetrieveFineTune implements retrieveFineTune operation. // // Gets info about the fine-tune job. // [Learn more about Fine-tuning](/docs/guides/fine-tuning). // // GET /fine-tunes/{fine_tune_id} RetrieveFineTune(ctx context.Context, params RetrieveFineTuneParams) (FineTune, error) // RetrieveModel implements retrieveModel operation. // // Retrieves a model instance, providing basic information about the model such as the owner and // permissioning. // // GET /models/{model} RetrieveModel(ctx context.Context, params RetrieveModelParams) (Model, error) }
Handler handles operations described by OpenAPI v3 specification.
type ImagesResponse ¶
func (*ImagesResponse) Decode ¶
func (s *ImagesResponse) Decode(d *jx.Decoder) error
Decode decodes ImagesResponse from json.
func (ImagesResponse) Encode ¶
func (s ImagesResponse) Encode(e *jx.Encoder)
Encode encodes ImagesResponse as json.
func (ImagesResponse) MarshalJSON ¶
func (s ImagesResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ImagesResponse) UnmarshalJSON ¶
func (s *ImagesResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ListFilesResponse ¶
type ListFilesResponse struct { Object string `json:"object"` Data []OpenAIFile `json:"data"` }
Ref: #/components/schemas/ListFilesResponse
func (*ListFilesResponse) Decode ¶
func (s *ListFilesResponse) Decode(d *jx.Decoder) error
Decode decodes ListFilesResponse from json.
func (*ListFilesResponse) Encode ¶
func (s *ListFilesResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ListFilesResponse) GetData ¶
func (s *ListFilesResponse) GetData() []OpenAIFile
GetData returns the value of Data.
func (*ListFilesResponse) GetObject ¶
func (s *ListFilesResponse) GetObject() string
GetObject returns the value of Object.
func (*ListFilesResponse) MarshalJSON ¶
func (s *ListFilesResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListFilesResponse) SetData ¶
func (s *ListFilesResponse) SetData(val []OpenAIFile)
SetData sets the value of Data.
func (*ListFilesResponse) SetObject ¶
func (s *ListFilesResponse) SetObject(val string)
SetObject sets the value of Object.
func (*ListFilesResponse) UnmarshalJSON ¶
func (s *ListFilesResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ListFilesResponse) Validate ¶
func (s *ListFilesResponse) Validate() error
type ListFineTuneEventsParams ¶
type ListFineTuneEventsParams struct { // The ID of the fine-tune job to get events for. FineTuneID string // Whether to stream events for the fine-tune job. If set to true, // events will be sent as data-only // [server-sent events](https://developer.mozilla. // org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) // as they become available. The stream will terminate with a // `data: [DONE]` message when the job is finished (succeeded, cancelled, // or failed). // If set to false, only events generated so far will be returned. Stream OptBool }
ListFineTuneEventsParams is parameters of listFineTuneEvents operation.
type ListFineTuneEventsResponse ¶
type ListFineTuneEventsResponse struct { Object string `json:"object"` Data []FineTuneEvent `json:"data"` }
Ref: #/components/schemas/ListFineTuneEventsResponse
func (*ListFineTuneEventsResponse) Decode ¶
func (s *ListFineTuneEventsResponse) Decode(d *jx.Decoder) error
Decode decodes ListFineTuneEventsResponse from json.
func (*ListFineTuneEventsResponse) Encode ¶
func (s *ListFineTuneEventsResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ListFineTuneEventsResponse) GetData ¶
func (s *ListFineTuneEventsResponse) GetData() []FineTuneEvent
GetData returns the value of Data.
func (*ListFineTuneEventsResponse) GetObject ¶
func (s *ListFineTuneEventsResponse) GetObject() string
GetObject returns the value of Object.
func (*ListFineTuneEventsResponse) MarshalJSON ¶
func (s *ListFineTuneEventsResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListFineTuneEventsResponse) SetData ¶
func (s *ListFineTuneEventsResponse) SetData(val []FineTuneEvent)
SetData sets the value of Data.
func (*ListFineTuneEventsResponse) SetObject ¶
func (s *ListFineTuneEventsResponse) SetObject(val string)
SetObject sets the value of Object.
func (*ListFineTuneEventsResponse) UnmarshalJSON ¶
func (s *ListFineTuneEventsResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ListFineTuneEventsResponse) Validate ¶
func (s *ListFineTuneEventsResponse) Validate() error
type ListFineTunesResponse ¶
Ref: #/components/schemas/ListFineTunesResponse
func (*ListFineTunesResponse) Decode ¶
func (s *ListFineTunesResponse) Decode(d *jx.Decoder) error
Decode decodes ListFineTunesResponse from json.
func (*ListFineTunesResponse) Encode ¶
func (s *ListFineTunesResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ListFineTunesResponse) GetData ¶
func (s *ListFineTunesResponse) GetData() []FineTune
GetData returns the value of Data.
func (*ListFineTunesResponse) GetObject ¶
func (s *ListFineTunesResponse) GetObject() string
GetObject returns the value of Object.
func (*ListFineTunesResponse) MarshalJSON ¶
func (s *ListFineTunesResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListFineTunesResponse) SetData ¶
func (s *ListFineTunesResponse) SetData(val []FineTune)
SetData sets the value of Data.
func (*ListFineTunesResponse) SetObject ¶
func (s *ListFineTunesResponse) SetObject(val string)
SetObject sets the value of Object.
func (*ListFineTunesResponse) UnmarshalJSON ¶
func (s *ListFineTunesResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ListFineTunesResponse) Validate ¶
func (s *ListFineTunesResponse) Validate() error
type ListModelsResponse ¶
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() string
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 string)
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 Model ¶
func (Model) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Model) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OpenAIFile ¶
func (*OpenAIFile) Decode ¶
func (s *OpenAIFile) Decode(d *jx.Decoder) error
Decode decodes OpenAIFile from json.
func (OpenAIFile) Encode ¶
func (s OpenAIFile) Encode(e *jx.Encoder)
Encode encodes OpenAIFile as json.
func (OpenAIFile) MarshalJSON ¶
func (s OpenAIFile) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*OpenAIFile) UnmarshalJSON ¶
func (s *OpenAIFile) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptBool ¶
OptBool is optional bool.
func NewOptBool ¶
NewOptBool returns new OptBool with value set to v.
type OptChatCompletionResponseMessage ¶
type OptChatCompletionResponseMessage struct { Value ChatCompletionResponseMessage Set bool }
OptChatCompletionResponseMessage is optional ChatCompletionResponseMessage.
func NewOptChatCompletionResponseMessage ¶
func NewOptChatCompletionResponseMessage(v ChatCompletionResponseMessage) OptChatCompletionResponseMessage
NewOptChatCompletionResponseMessage returns new OptChatCompletionResponseMessage with value set to v.
func (*OptChatCompletionResponseMessage) Decode ¶
func (o *OptChatCompletionResponseMessage) Decode(d *jx.Decoder) error
Decode decodes ChatCompletionResponseMessage from json.
func (OptChatCompletionResponseMessage) Encode ¶
func (o OptChatCompletionResponseMessage) Encode(e *jx.Encoder)
Encode encodes ChatCompletionResponseMessage as json.
func (OptChatCompletionResponseMessage) Get ¶
func (o OptChatCompletionResponseMessage) Get() (v ChatCompletionResponseMessage, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptChatCompletionResponseMessage) IsSet ¶
func (o OptChatCompletionResponseMessage) IsSet() bool
IsSet returns true if OptChatCompletionResponseMessage was set.
func (OptChatCompletionResponseMessage) MarshalJSON ¶
func (s OptChatCompletionResponseMessage) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptChatCompletionResponseMessage) Or ¶
func (o OptChatCompletionResponseMessage) Or(d ChatCompletionResponseMessage) ChatCompletionResponseMessage
Or returns value if set, or given parameter if does not.
func (*OptChatCompletionResponseMessage) Reset ¶
func (o *OptChatCompletionResponseMessage) Reset()
Reset unsets value.
func (*OptChatCompletionResponseMessage) SetTo ¶
func (o *OptChatCompletionResponseMessage) SetTo(v ChatCompletionResponseMessage)
SetTo sets value to v.
func (*OptChatCompletionResponseMessage) UnmarshalJSON ¶
func (s *OptChatCompletionResponseMessage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptCreateChatCompletionRequestLogitBias ¶
type OptCreateChatCompletionRequestLogitBias struct { Value *CreateChatCompletionRequestLogitBias Set bool }
OptCreateChatCompletionRequestLogitBias is optional *CreateChatCompletionRequestLogitBias.
func NewOptCreateChatCompletionRequestLogitBias ¶
func NewOptCreateChatCompletionRequestLogitBias(v *CreateChatCompletionRequestLogitBias) OptCreateChatCompletionRequestLogitBias
NewOptCreateChatCompletionRequestLogitBias returns new OptCreateChatCompletionRequestLogitBias with value set to v.
func (*OptCreateChatCompletionRequestLogitBias) Decode ¶
func (o *OptCreateChatCompletionRequestLogitBias) Decode(d *jx.Decoder) error
Decode decodes *CreateChatCompletionRequestLogitBias from json.
func (OptCreateChatCompletionRequestLogitBias) Encode ¶
func (o OptCreateChatCompletionRequestLogitBias) Encode(e *jx.Encoder)
Encode encodes *CreateChatCompletionRequestLogitBias as json.
func (OptCreateChatCompletionRequestLogitBias) Get ¶
func (o OptCreateChatCompletionRequestLogitBias) Get() (v *CreateChatCompletionRequestLogitBias, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptCreateChatCompletionRequestLogitBias) IsSet ¶
func (o OptCreateChatCompletionRequestLogitBias) IsSet() bool
IsSet returns true if OptCreateChatCompletionRequestLogitBias was set.
func (OptCreateChatCompletionRequestLogitBias) MarshalJSON ¶
func (s OptCreateChatCompletionRequestLogitBias) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptCreateChatCompletionRequestLogitBias) Or ¶
func (o OptCreateChatCompletionRequestLogitBias) Or(d *CreateChatCompletionRequestLogitBias) *CreateChatCompletionRequestLogitBias
Or returns value if set, or given parameter if does not.
func (*OptCreateChatCompletionRequestLogitBias) Reset ¶
func (o *OptCreateChatCompletionRequestLogitBias) Reset()
Reset unsets value.
func (*OptCreateChatCompletionRequestLogitBias) SetTo ¶
func (o *OptCreateChatCompletionRequestLogitBias) SetTo(v *CreateChatCompletionRequestLogitBias)
SetTo sets value to v.
func (*OptCreateChatCompletionRequestLogitBias) UnmarshalJSON ¶
func (s *OptCreateChatCompletionRequestLogitBias) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptCreateChatCompletionRequestStop ¶
type OptCreateChatCompletionRequestStop struct { Value CreateChatCompletionRequestStop Set bool }
OptCreateChatCompletionRequestStop is optional CreateChatCompletionRequestStop.
func NewOptCreateChatCompletionRequestStop ¶
func NewOptCreateChatCompletionRequestStop(v CreateChatCompletionRequestStop) OptCreateChatCompletionRequestStop
NewOptCreateChatCompletionRequestStop returns new OptCreateChatCompletionRequestStop with value set to v.
func (*OptCreateChatCompletionRequestStop) Decode ¶
func (o *OptCreateChatCompletionRequestStop) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequestStop from json.
func (OptCreateChatCompletionRequestStop) Encode ¶
func (o OptCreateChatCompletionRequestStop) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionRequestStop as json.
func (OptCreateChatCompletionRequestStop) Get ¶
func (o OptCreateChatCompletionRequestStop) Get() (v CreateChatCompletionRequestStop, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptCreateChatCompletionRequestStop) IsSet ¶
func (o OptCreateChatCompletionRequestStop) IsSet() bool
IsSet returns true if OptCreateChatCompletionRequestStop was set.
func (OptCreateChatCompletionRequestStop) MarshalJSON ¶
func (s OptCreateChatCompletionRequestStop) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptCreateChatCompletionRequestStop) Or ¶
func (o OptCreateChatCompletionRequestStop) Or(d CreateChatCompletionRequestStop) CreateChatCompletionRequestStop
Or returns value if set, or given parameter if does not.
func (*OptCreateChatCompletionRequestStop) Reset ¶
func (o *OptCreateChatCompletionRequestStop) Reset()
Reset unsets value.
func (*OptCreateChatCompletionRequestStop) SetTo ¶
func (o *OptCreateChatCompletionRequestStop) SetTo(v CreateChatCompletionRequestStop)
SetTo sets value to v.
func (*OptCreateChatCompletionRequestStop) UnmarshalJSON ¶
func (s *OptCreateChatCompletionRequestStop) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptCreateChatCompletionResponseUsage ¶
type OptCreateChatCompletionResponseUsage struct { Value CreateChatCompletionResponseUsage Set bool }
OptCreateChatCompletionResponseUsage is optional CreateChatCompletionResponseUsage.
func NewOptCreateChatCompletionResponseUsage ¶
func NewOptCreateChatCompletionResponseUsage(v CreateChatCompletionResponseUsage) OptCreateChatCompletionResponseUsage
NewOptCreateChatCompletionResponseUsage returns new OptCreateChatCompletionResponseUsage with value set to v.
func (*OptCreateChatCompletionResponseUsage) Decode ¶
func (o *OptCreateChatCompletionResponseUsage) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionResponseUsage from json.
func (OptCreateChatCompletionResponseUsage) Encode ¶
func (o OptCreateChatCompletionResponseUsage) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionResponseUsage as json.
func (OptCreateChatCompletionResponseUsage) Get ¶
func (o OptCreateChatCompletionResponseUsage) Get() (v CreateChatCompletionResponseUsage, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptCreateChatCompletionResponseUsage) IsSet ¶
func (o OptCreateChatCompletionResponseUsage) IsSet() bool
IsSet returns true if OptCreateChatCompletionResponseUsage was set.
func (OptCreateChatCompletionResponseUsage) MarshalJSON ¶
func (s OptCreateChatCompletionResponseUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptCreateChatCompletionResponseUsage) Or ¶
func (o OptCreateChatCompletionResponseUsage) Or(d CreateChatCompletionResponseUsage) CreateChatCompletionResponseUsage
Or returns value if set, or given parameter if does not.
func (*OptCreateChatCompletionResponseUsage) Reset ¶
func (o *OptCreateChatCompletionResponseUsage) Reset()
Reset unsets value.
func (*OptCreateChatCompletionResponseUsage) SetTo ¶
func (o *OptCreateChatCompletionResponseUsage) SetTo(v CreateChatCompletionResponseUsage)
SetTo sets value to v.
func (*OptCreateChatCompletionResponseUsage) UnmarshalJSON ¶
func (s *OptCreateChatCompletionResponseUsage) 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 OptMultipartFile ¶
type OptMultipartFile struct { Value ht.MultipartFile Set bool }
OptMultipartFile is optional ht.MultipartFile.
func NewOptMultipartFile ¶
func NewOptMultipartFile(v ht.MultipartFile) OptMultipartFile
NewOptMultipartFile returns new OptMultipartFile with value set to v.
func (OptMultipartFile) Get ¶
func (o OptMultipartFile) Get() (v ht.MultipartFile, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptMultipartFile) IsSet ¶
func (o OptMultipartFile) IsSet() bool
IsSet returns true if OptMultipartFile was set.
func (OptMultipartFile) Or ¶
func (o OptMultipartFile) Or(d ht.MultipartFile) ht.MultipartFile
Or returns value if set, or given parameter if does not.
func (*OptMultipartFile) SetTo ¶
func (o *OptMultipartFile) SetTo(v ht.MultipartFile)
SetTo sets value to v.
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) 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 OptNilCreateEditResponseChoicesItemLogprobs ¶
type OptNilCreateEditResponseChoicesItemLogprobs struct { Value CreateEditResponseChoicesItemLogprobs Set bool Null bool }
OptNilCreateEditResponseChoicesItemLogprobs is optional nullable CreateEditResponseChoicesItemLogprobs.
func NewOptNilCreateEditResponseChoicesItemLogprobs ¶
func NewOptNilCreateEditResponseChoicesItemLogprobs(v CreateEditResponseChoicesItemLogprobs) OptNilCreateEditResponseChoicesItemLogprobs
NewOptNilCreateEditResponseChoicesItemLogprobs returns new OptNilCreateEditResponseChoicesItemLogprobs with value set to v.
func (*OptNilCreateEditResponseChoicesItemLogprobs) Decode ¶
func (o *OptNilCreateEditResponseChoicesItemLogprobs) Decode(d *jx.Decoder) error
Decode decodes CreateEditResponseChoicesItemLogprobs from json.
func (OptNilCreateEditResponseChoicesItemLogprobs) Encode ¶
func (o OptNilCreateEditResponseChoicesItemLogprobs) Encode(e *jx.Encoder)
Encode encodes CreateEditResponseChoicesItemLogprobs as json.
func (OptNilCreateEditResponseChoicesItemLogprobs) Get ¶
func (o OptNilCreateEditResponseChoicesItemLogprobs) Get() (v CreateEditResponseChoicesItemLogprobs, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateEditResponseChoicesItemLogprobs) IsNull ¶
func (o OptNilCreateEditResponseChoicesItemLogprobs) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateEditResponseChoicesItemLogprobs) IsSet ¶
func (o OptNilCreateEditResponseChoicesItemLogprobs) IsSet() bool
IsSet returns true if OptNilCreateEditResponseChoicesItemLogprobs was set.
func (OptNilCreateEditResponseChoicesItemLogprobs) MarshalJSON ¶
func (s OptNilCreateEditResponseChoicesItemLogprobs) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilCreateEditResponseChoicesItemLogprobs) Or ¶
func (o OptNilCreateEditResponseChoicesItemLogprobs) Or(d CreateEditResponseChoicesItemLogprobs) CreateEditResponseChoicesItemLogprobs
Or returns value if set, or given parameter if does not.
func (*OptNilCreateEditResponseChoicesItemLogprobs) Reset ¶
func (o *OptNilCreateEditResponseChoicesItemLogprobs) Reset()
Reset unsets value.
func (*OptNilCreateEditResponseChoicesItemLogprobs) SetTo ¶
func (o *OptNilCreateEditResponseChoicesItemLogprobs) SetTo(v CreateEditResponseChoicesItemLogprobs)
SetTo sets value to v.
func (*OptNilCreateEditResponseChoicesItemLogprobs) SetToNull ¶
func (o *OptNilCreateEditResponseChoicesItemLogprobs) SetToNull()
SetNull sets value to null.
func (*OptNilCreateEditResponseChoicesItemLogprobs) UnmarshalJSON ¶
func (s *OptNilCreateEditResponseChoicesItemLogprobs) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilCreateImageEditRequestResponseFormat ¶
type OptNilCreateImageEditRequestResponseFormat struct { Value CreateImageEditRequestResponseFormat Set bool Null bool }
OptNilCreateImageEditRequestResponseFormat is optional nullable CreateImageEditRequestResponseFormat.
func NewOptNilCreateImageEditRequestResponseFormat ¶
func NewOptNilCreateImageEditRequestResponseFormat(v CreateImageEditRequestResponseFormat) OptNilCreateImageEditRequestResponseFormat
NewOptNilCreateImageEditRequestResponseFormat returns new OptNilCreateImageEditRequestResponseFormat with value set to v.
func (OptNilCreateImageEditRequestResponseFormat) Get ¶
func (o OptNilCreateImageEditRequestResponseFormat) Get() (v CreateImageEditRequestResponseFormat, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateImageEditRequestResponseFormat) IsNull ¶
func (o OptNilCreateImageEditRequestResponseFormat) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateImageEditRequestResponseFormat) IsSet ¶
func (o OptNilCreateImageEditRequestResponseFormat) IsSet() bool
IsSet returns true if OptNilCreateImageEditRequestResponseFormat was set.
func (OptNilCreateImageEditRequestResponseFormat) Or ¶
func (o OptNilCreateImageEditRequestResponseFormat) Or(d CreateImageEditRequestResponseFormat) CreateImageEditRequestResponseFormat
Or returns value if set, or given parameter if does not.
func (*OptNilCreateImageEditRequestResponseFormat) Reset ¶
func (o *OptNilCreateImageEditRequestResponseFormat) Reset()
Reset unsets value.
func (*OptNilCreateImageEditRequestResponseFormat) SetTo ¶
func (o *OptNilCreateImageEditRequestResponseFormat) SetTo(v CreateImageEditRequestResponseFormat)
SetTo sets value to v.
func (*OptNilCreateImageEditRequestResponseFormat) SetToNull ¶
func (o *OptNilCreateImageEditRequestResponseFormat) SetToNull()
SetNull sets value to null.
type OptNilCreateImageEditRequestSize ¶
type OptNilCreateImageEditRequestSize struct { Value CreateImageEditRequestSize Set bool Null bool }
OptNilCreateImageEditRequestSize is optional nullable CreateImageEditRequestSize.
func NewOptNilCreateImageEditRequestSize ¶
func NewOptNilCreateImageEditRequestSize(v CreateImageEditRequestSize) OptNilCreateImageEditRequestSize
NewOptNilCreateImageEditRequestSize returns new OptNilCreateImageEditRequestSize with value set to v.
func (OptNilCreateImageEditRequestSize) Get ¶
func (o OptNilCreateImageEditRequestSize) Get() (v CreateImageEditRequestSize, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateImageEditRequestSize) IsNull ¶
func (o OptNilCreateImageEditRequestSize) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateImageEditRequestSize) IsSet ¶
func (o OptNilCreateImageEditRequestSize) IsSet() bool
IsSet returns true if OptNilCreateImageEditRequestSize was set.
func (OptNilCreateImageEditRequestSize) Or ¶
func (o OptNilCreateImageEditRequestSize) Or(d CreateImageEditRequestSize) CreateImageEditRequestSize
Or returns value if set, or given parameter if does not.
func (*OptNilCreateImageEditRequestSize) Reset ¶
func (o *OptNilCreateImageEditRequestSize) Reset()
Reset unsets value.
func (*OptNilCreateImageEditRequestSize) SetTo ¶
func (o *OptNilCreateImageEditRequestSize) SetTo(v CreateImageEditRequestSize)
SetTo sets value to v.
func (*OptNilCreateImageEditRequestSize) SetToNull ¶
func (o *OptNilCreateImageEditRequestSize) SetToNull()
SetNull sets value to null.
type OptNilCreateImageRequestResponseFormat ¶
type OptNilCreateImageRequestResponseFormat struct { Value CreateImageRequestResponseFormat Set bool Null bool }
OptNilCreateImageRequestResponseFormat is optional nullable CreateImageRequestResponseFormat.
func NewOptNilCreateImageRequestResponseFormat ¶
func NewOptNilCreateImageRequestResponseFormat(v CreateImageRequestResponseFormat) OptNilCreateImageRequestResponseFormat
NewOptNilCreateImageRequestResponseFormat returns new OptNilCreateImageRequestResponseFormat with value set to v.
func (*OptNilCreateImageRequestResponseFormat) Decode ¶
func (o *OptNilCreateImageRequestResponseFormat) Decode(d *jx.Decoder) error
Decode decodes CreateImageRequestResponseFormat from json.
func (OptNilCreateImageRequestResponseFormat) Encode ¶
func (o OptNilCreateImageRequestResponseFormat) Encode(e *jx.Encoder)
Encode encodes CreateImageRequestResponseFormat as json.
func (OptNilCreateImageRequestResponseFormat) Get ¶
func (o OptNilCreateImageRequestResponseFormat) Get() (v CreateImageRequestResponseFormat, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateImageRequestResponseFormat) IsNull ¶
func (o OptNilCreateImageRequestResponseFormat) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateImageRequestResponseFormat) IsSet ¶
func (o OptNilCreateImageRequestResponseFormat) IsSet() bool
IsSet returns true if OptNilCreateImageRequestResponseFormat was set.
func (OptNilCreateImageRequestResponseFormat) MarshalJSON ¶
func (s OptNilCreateImageRequestResponseFormat) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilCreateImageRequestResponseFormat) Or ¶
func (o OptNilCreateImageRequestResponseFormat) Or(d CreateImageRequestResponseFormat) CreateImageRequestResponseFormat
Or returns value if set, or given parameter if does not.
func (*OptNilCreateImageRequestResponseFormat) Reset ¶
func (o *OptNilCreateImageRequestResponseFormat) Reset()
Reset unsets value.
func (*OptNilCreateImageRequestResponseFormat) SetTo ¶
func (o *OptNilCreateImageRequestResponseFormat) SetTo(v CreateImageRequestResponseFormat)
SetTo sets value to v.
func (*OptNilCreateImageRequestResponseFormat) SetToNull ¶
func (o *OptNilCreateImageRequestResponseFormat) SetToNull()
SetNull sets value to null.
func (*OptNilCreateImageRequestResponseFormat) UnmarshalJSON ¶
func (s *OptNilCreateImageRequestResponseFormat) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilCreateImageRequestSize ¶
type OptNilCreateImageRequestSize struct { Value CreateImageRequestSize Set bool Null bool }
OptNilCreateImageRequestSize is optional nullable CreateImageRequestSize.
func NewOptNilCreateImageRequestSize ¶
func NewOptNilCreateImageRequestSize(v CreateImageRequestSize) OptNilCreateImageRequestSize
NewOptNilCreateImageRequestSize returns new OptNilCreateImageRequestSize with value set to v.
func (*OptNilCreateImageRequestSize) Decode ¶
func (o *OptNilCreateImageRequestSize) Decode(d *jx.Decoder) error
Decode decodes CreateImageRequestSize from json.
func (OptNilCreateImageRequestSize) Encode ¶
func (o OptNilCreateImageRequestSize) Encode(e *jx.Encoder)
Encode encodes CreateImageRequestSize as json.
func (OptNilCreateImageRequestSize) Get ¶
func (o OptNilCreateImageRequestSize) Get() (v CreateImageRequestSize, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateImageRequestSize) IsNull ¶
func (o OptNilCreateImageRequestSize) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateImageRequestSize) IsSet ¶
func (o OptNilCreateImageRequestSize) IsSet() bool
IsSet returns true if OptNilCreateImageRequestSize was set.
func (OptNilCreateImageRequestSize) MarshalJSON ¶
func (s OptNilCreateImageRequestSize) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*OptNilCreateImageRequestSize) Reset ¶
func (o *OptNilCreateImageRequestSize) Reset()
Reset unsets value.
func (*OptNilCreateImageRequestSize) SetTo ¶
func (o *OptNilCreateImageRequestSize) SetTo(v CreateImageRequestSize)
SetTo sets value to v.
func (*OptNilCreateImageRequestSize) SetToNull ¶
func (o *OptNilCreateImageRequestSize) SetToNull()
SetNull sets value to null.
func (*OptNilCreateImageRequestSize) UnmarshalJSON ¶
func (s *OptNilCreateImageRequestSize) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilCreateImageVariationRequestResponseFormat ¶
type OptNilCreateImageVariationRequestResponseFormat struct { Value CreateImageVariationRequestResponseFormat Set bool Null bool }
OptNilCreateImageVariationRequestResponseFormat is optional nullable CreateImageVariationRequestResponseFormat.
func NewOptNilCreateImageVariationRequestResponseFormat ¶
func NewOptNilCreateImageVariationRequestResponseFormat(v CreateImageVariationRequestResponseFormat) OptNilCreateImageVariationRequestResponseFormat
NewOptNilCreateImageVariationRequestResponseFormat returns new OptNilCreateImageVariationRequestResponseFormat with value set to v.
func (OptNilCreateImageVariationRequestResponseFormat) Get ¶
func (o OptNilCreateImageVariationRequestResponseFormat) Get() (v CreateImageVariationRequestResponseFormat, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateImageVariationRequestResponseFormat) IsNull ¶
func (o OptNilCreateImageVariationRequestResponseFormat) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateImageVariationRequestResponseFormat) IsSet ¶
func (o OptNilCreateImageVariationRequestResponseFormat) IsSet() bool
IsSet returns true if OptNilCreateImageVariationRequestResponseFormat was set.
func (OptNilCreateImageVariationRequestResponseFormat) Or ¶
func (o OptNilCreateImageVariationRequestResponseFormat) Or(d CreateImageVariationRequestResponseFormat) CreateImageVariationRequestResponseFormat
Or returns value if set, or given parameter if does not.
func (*OptNilCreateImageVariationRequestResponseFormat) Reset ¶
func (o *OptNilCreateImageVariationRequestResponseFormat) Reset()
Reset unsets value.
func (*OptNilCreateImageVariationRequestResponseFormat) SetTo ¶
func (o *OptNilCreateImageVariationRequestResponseFormat) SetTo(v CreateImageVariationRequestResponseFormat)
SetTo sets value to v.
func (*OptNilCreateImageVariationRequestResponseFormat) SetToNull ¶
func (o *OptNilCreateImageVariationRequestResponseFormat) SetToNull()
SetNull sets value to null.
type OptNilCreateImageVariationRequestSize ¶
type OptNilCreateImageVariationRequestSize struct { Value CreateImageVariationRequestSize Set bool Null bool }
OptNilCreateImageVariationRequestSize is optional nullable CreateImageVariationRequestSize.
func NewOptNilCreateImageVariationRequestSize ¶
func NewOptNilCreateImageVariationRequestSize(v CreateImageVariationRequestSize) OptNilCreateImageVariationRequestSize
NewOptNilCreateImageVariationRequestSize returns new OptNilCreateImageVariationRequestSize with value set to v.
func (OptNilCreateImageVariationRequestSize) Get ¶
func (o OptNilCreateImageVariationRequestSize) Get() (v CreateImageVariationRequestSize, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateImageVariationRequestSize) IsNull ¶
func (o OptNilCreateImageVariationRequestSize) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateImageVariationRequestSize) IsSet ¶
func (o OptNilCreateImageVariationRequestSize) IsSet() bool
IsSet returns true if OptNilCreateImageVariationRequestSize was set.
func (OptNilCreateImageVariationRequestSize) Or ¶
func (o OptNilCreateImageVariationRequestSize) Or(d CreateImageVariationRequestSize) CreateImageVariationRequestSize
Or returns value if set, or given parameter if does not.
func (*OptNilCreateImageVariationRequestSize) Reset ¶
func (o *OptNilCreateImageVariationRequestSize) Reset()
Reset unsets value.
func (*OptNilCreateImageVariationRequestSize) SetTo ¶
func (o *OptNilCreateImageVariationRequestSize) SetTo(v CreateImageVariationRequestSize)
SetTo sets value to v.
func (*OptNilCreateImageVariationRequestSize) SetToNull ¶
func (o *OptNilCreateImageVariationRequestSize) SetToNull()
SetNull sets value to null.
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) IsNull ¶
func (o OptNilFloat64) IsNull() bool
IsSet 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 OptNilFloat64Array ¶
OptNilFloat64Array is optional nullable []float64.
func NewOptNilFloat64Array ¶
func NewOptNilFloat64Array(v []float64) OptNilFloat64Array
NewOptNilFloat64Array returns new OptNilFloat64Array with value set to v.
func (*OptNilFloat64Array) Decode ¶
func (o *OptNilFloat64Array) Decode(d *jx.Decoder) error
Decode decodes []float64 from json.
func (OptNilFloat64Array) Encode ¶
func (o OptNilFloat64Array) Encode(e *jx.Encoder)
Encode encodes []float64 as json.
func (OptNilFloat64Array) Get ¶
func (o OptNilFloat64Array) Get() (v []float64, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilFloat64Array) IsNull ¶
func (o OptNilFloat64Array) IsNull() bool
IsSet returns true if value is Null.
func (OptNilFloat64Array) IsSet ¶
func (o OptNilFloat64Array) IsSet() bool
IsSet returns true if OptNilFloat64Array was set.
func (OptNilFloat64Array) MarshalJSON ¶
func (s OptNilFloat64Array) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilFloat64Array) Or ¶
func (o OptNilFloat64Array) Or(d []float64) []float64
Or returns value if set, or given parameter if does not.
func (*OptNilFloat64Array) SetTo ¶
func (o *OptNilFloat64Array) SetTo(v []float64)
SetTo sets value to v.
func (*OptNilFloat64Array) SetToNull ¶
func (o *OptNilFloat64Array) SetToNull()
SetNull sets value to null.
func (*OptNilFloat64Array) UnmarshalJSON ¶
func (s *OptNilFloat64Array) 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) 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) IsNull ¶
func (o OptNilString) IsNull() bool
IsSet 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 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 WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the metric.NewNoopMeterProvider 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 RetrieveFileParams ¶
type RetrieveFileParams struct { // The ID of the file to use for this request. FileID string }
RetrieveFileParams is parameters of retrieveFile operation.
type RetrieveFineTuneParams ¶
type RetrieveFineTuneParams struct { // The ID of the fine-tune job. FineTuneID string }
RetrieveFineTuneParams is parameters of retrieveFineTune operation.
type RetrieveModelParams ¶
type RetrieveModelParams struct { // The ID of the model to use for this request. Model string }
RetrieveModelParams is parameters of retrieveModel operation.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
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, 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) CancelFineTune ¶
func (UnimplementedHandler) CancelFineTune(ctx context.Context, params CancelFineTuneParams) (r FineTune, _ error)
CancelFineTune implements cancelFineTune operation.
Immediately cancel a fine-tune job.
POST /fine-tunes/{fine_tune_id}/cancel
func (UnimplementedHandler) CreateChatCompletion ¶
func (UnimplementedHandler) CreateChatCompletion(ctx context.Context, req *CreateChatCompletionRequest) (r *CreateChatCompletionResponse, _ error)
CreateChatCompletion implements createChatCompletion operation.
Creates a completion for the chat message.
POST /chat/completions
func (UnimplementedHandler) CreateEdit ¶
func (UnimplementedHandler) CreateEdit(ctx context.Context, req *CreateEditRequest) (r *CreateEditResponse, _ error)
CreateEdit implements createEdit operation.
Creates a new edit for the provided input, instruction, and parameters.
POST /edits
func (UnimplementedHandler) CreateFineTune ¶
func (UnimplementedHandler) CreateFineTune(ctx context.Context, req *CreateFineTuneRequest) (r FineTune, _ error)
CreateFineTune implements createFineTune operation.
Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning).
POST /fine-tunes
func (UnimplementedHandler) CreateImage ¶
func (UnimplementedHandler) CreateImage(ctx context.Context, req *CreateImageRequest) (r ImagesResponse, _ error)
CreateImage implements createImage operation.
Creates an image given a prompt.
POST /images/generations
func (UnimplementedHandler) CreateImageEdit ¶
func (UnimplementedHandler) CreateImageEdit(ctx context.Context, req *CreateImageEditRequestForm) (r ImagesResponse, _ error)
CreateImageEdit implements createImageEdit operation.
Creates an edited or extended image given an original image and a prompt.
POST /images/edits
func (UnimplementedHandler) CreateImageVariation ¶
func (UnimplementedHandler) CreateImageVariation(ctx context.Context, req *CreateImageVariationRequestForm) (r ImagesResponse, _ error)
CreateImageVariation implements createImageVariation operation.
Creates a variation of a given image.
POST /images/variations
func (UnimplementedHandler) CreateModeration ¶
func (UnimplementedHandler) CreateModeration(ctx context.Context, req *CreateModerationRequest) (r *CreateModerationResponse, _ error)
CreateModeration implements createModeration operation.
Classifies if text violates OpenAI's Content Policy.
POST /moderations
func (UnimplementedHandler) DeleteFile ¶
func (UnimplementedHandler) DeleteFile(ctx context.Context, params DeleteFileParams) (r *DeleteFileResponse, _ error)
DeleteFile implements deleteFile operation.
Delete a file.
DELETE /files/{file_id}
func (UnimplementedHandler) DeleteModel ¶
func (UnimplementedHandler) DeleteModel(ctx context.Context, params DeleteModelParams) (r *DeleteModelResponse, _ error)
DeleteModel implements deleteModel operation.
Delete a fine-tuned model. You must have the Owner role in your organization.
DELETE /models/{model}
func (UnimplementedHandler) DownloadFile ¶
func (UnimplementedHandler) DownloadFile(ctx context.Context, params DownloadFileParams) (r string, _ error)
DownloadFile implements downloadFile operation.
Returns the contents of the specified file.
GET /files/{file_id}/content
func (UnimplementedHandler) ListFiles ¶
func (UnimplementedHandler) ListFiles(ctx context.Context) (r *ListFilesResponse, _ error)
ListFiles implements listFiles operation.
Returns a list of files that belong to the user's organization.
GET /files
func (UnimplementedHandler) ListFineTuneEvents ¶
func (UnimplementedHandler) ListFineTuneEvents(ctx context.Context, params ListFineTuneEventsParams) (r *ListFineTuneEventsResponse, _ error)
ListFineTuneEvents implements listFineTuneEvents operation.
Get fine-grained status updates for a fine-tune job.
GET /fine-tunes/{fine_tune_id}/events
func (UnimplementedHandler) ListFineTunes ¶
func (UnimplementedHandler) ListFineTunes(ctx context.Context) (r *ListFineTunesResponse, _ error)
ListFineTunes implements listFineTunes operation.
List your organization's fine-tuning jobs.
GET /fine-tunes
func (UnimplementedHandler) ListModels ¶
func (UnimplementedHandler) ListModels(ctx context.Context) (r *ListModelsResponse, _ error)
ListModels implements listModels operation.
Lists the currently available models, and provides basic information about each one such as the owner and availability.
GET /models
func (UnimplementedHandler) RetrieveFile ¶
func (UnimplementedHandler) RetrieveFile(ctx context.Context, params RetrieveFileParams) (r OpenAIFile, _ error)
RetrieveFile implements retrieveFile operation.
Returns information about a specific file.
GET /files/{file_id}
func (UnimplementedHandler) RetrieveFineTune ¶
func (UnimplementedHandler) RetrieveFineTune(ctx context.Context, params RetrieveFineTuneParams) (r FineTune, _ error)
RetrieveFineTune implements retrieveFineTune operation.
Gets info about the fine-tune job. [Learn more about Fine-tuning](/docs/guides/fine-tuning).
GET /fine-tunes/{fine_tune_id}
func (UnimplementedHandler) RetrieveModel ¶
func (UnimplementedHandler) RetrieveModel(ctx context.Context, params RetrieveModelParams) (r Model, _ error)
RetrieveModel implements retrieveModel operation.
Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
GET /models/{model}
Source Files ¶
- auth_client.go
- gen.go
- oas_cfg_gen.go
- oas_client_gen.go
- oas_defaults_gen.go
- oas_handlers_gen.go
- oas_json_gen.go
- oas_middleware_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_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go