Documentation ¶
Index ¶
- 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 (ChatCompletionRequestMessageRole) AllValues() []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 (ChatCompletionResponseMessageRole) AllValues() []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) CreateAnswer(ctx context.Context, request *CreateAnswerRequest) (*CreateAnswerResponse, error)deprecated
- func (c *Client) CreateChatCompletion(ctx context.Context, request *CreateChatCompletionRequest) (*CreateChatCompletionResponse, error)
- func (c *Client) CreateClassification(ctx context.Context, request *CreateClassificationRequest) (*CreateClassificationResponse, error)deprecated
- func (c *Client) CreateCompletion(ctx context.Context, request *CreateCompletionRequest) (*CreateCompletionResponse, error)
- func (c *Client) CreateEdit(ctx context.Context, request *CreateEditRequest) (*CreateEditResponse, error)
- func (c *Client) CreateEmbedding(ctx context.Context, request *CreateEmbeddingRequest) (*CreateEmbeddingResponse, error)
- func (c *Client) CreateFile(ctx context.Context, request *CreateFileRequestMultipart) (OpenAIFile, 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 *CreateImageEditRequestMultipart) (ImagesResponse, error)
- func (c *Client) CreateImageVariation(ctx context.Context, request *CreateImageVariationRequestMultipart) (ImagesResponse, error)
- func (c *Client) CreateModeration(ctx context.Context, request *CreateModerationRequest) (*CreateModerationResponse, error)
- func (c *Client) CreateSearch(ctx context.Context, request *CreateSearchRequest, params CreateSearchParams) (*CreateSearchResponse, error)deprecated
- func (c *Client) CreateTranscription(ctx context.Context, request *CreateTranscriptionRequestMultipart) (*CreateTranscriptionResponse, error)
- func (c *Client) CreateTranslation(ctx context.Context, request *CreateTranslationRequestMultipart) (*CreateTranslationResponse, 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) ListEngines(ctx context.Context) (*ListEnginesResponse, error)deprecated
- 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) RetrieveEngine(ctx context.Context, params RetrieveEngineParams) (Engine, error)deprecated
- 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 CreateAnswerRequest
- func (s *CreateAnswerRequest) Decode(d *jx.Decoder) error
- func (s *CreateAnswerRequest) Encode(e *jx.Encoder)
- func (s *CreateAnswerRequest) GetDocuments() OptNilStringArray
- func (s *CreateAnswerRequest) GetExamples() [][]string
- func (s *CreateAnswerRequest) GetExamplesContext() string
- func (s *CreateAnswerRequest) GetExpand() OptNilAnyArray
- func (s *CreateAnswerRequest) GetFile() OptNilString
- func (s *CreateAnswerRequest) GetLogitBias() OptCreateAnswerRequestLogitBias
- func (s *CreateAnswerRequest) GetLogprobs() OptNilInt
- func (s *CreateAnswerRequest) GetMaxRerank() OptNilInt
- func (s *CreateAnswerRequest) GetMaxTokens() OptNilInt
- func (s *CreateAnswerRequest) GetModel() string
- func (s *CreateAnswerRequest) GetN() OptNilInt
- func (s *CreateAnswerRequest) GetQuestion() string
- func (s *CreateAnswerRequest) GetReturnMetadata() OptNilBool
- func (s *CreateAnswerRequest) GetReturnPrompt() OptNilBool
- func (s *CreateAnswerRequest) GetSearchModel() OptNilString
- func (s *CreateAnswerRequest) GetStop() OptNilCreateAnswerRequestStop
- func (s *CreateAnswerRequest) GetTemperature() OptNilFloat64
- func (s *CreateAnswerRequest) GetUser() OptString
- func (s *CreateAnswerRequest) MarshalJSON() ([]byte, error)
- func (s *CreateAnswerRequest) SetDocuments(val OptNilStringArray)
- func (s *CreateAnswerRequest) SetExamples(val [][]string)
- func (s *CreateAnswerRequest) SetExamplesContext(val string)
- func (s *CreateAnswerRequest) SetExpand(val OptNilAnyArray)
- func (s *CreateAnswerRequest) SetFile(val OptNilString)
- func (s *CreateAnswerRequest) SetLogitBias(val OptCreateAnswerRequestLogitBias)
- func (s *CreateAnswerRequest) SetLogprobs(val OptNilInt)
- func (s *CreateAnswerRequest) SetMaxRerank(val OptNilInt)
- func (s *CreateAnswerRequest) SetMaxTokens(val OptNilInt)
- func (s *CreateAnswerRequest) SetModel(val string)
- func (s *CreateAnswerRequest) SetN(val OptNilInt)
- func (s *CreateAnswerRequest) SetQuestion(val string)
- func (s *CreateAnswerRequest) SetReturnMetadata(val OptNilBool)
- func (s *CreateAnswerRequest) SetReturnPrompt(val OptNilBool)
- func (s *CreateAnswerRequest) SetSearchModel(val OptNilString)
- func (s *CreateAnswerRequest) SetStop(val OptNilCreateAnswerRequestStop)
- func (s *CreateAnswerRequest) SetTemperature(val OptNilFloat64)
- func (s *CreateAnswerRequest) SetUser(val OptString)
- func (s *CreateAnswerRequest) UnmarshalJSON(data []byte) error
- func (s *CreateAnswerRequest) Validate() error
- type CreateAnswerRequestLogitBias
- type CreateAnswerRequestStop
- func (s *CreateAnswerRequestStop) Decode(d *jx.Decoder) error
- func (s CreateAnswerRequestStop) Encode(e *jx.Encoder)
- func (s CreateAnswerRequestStop) GetString() (v string, ok bool)
- func (s CreateAnswerRequestStop) GetStringArray() (v []string, ok bool)
- func (s CreateAnswerRequestStop) IsString() bool
- func (s CreateAnswerRequestStop) IsStringArray() bool
- func (s CreateAnswerRequestStop) MarshalJSON() ([]byte, error)
- func (s *CreateAnswerRequestStop) SetString(v string)
- func (s *CreateAnswerRequestStop) SetStringArray(v []string)
- func (s *CreateAnswerRequestStop) UnmarshalJSON(data []byte) error
- func (s CreateAnswerRequestStop) Validate() error
- type CreateAnswerRequestStopType
- type CreateAnswerResponse
- func (s *CreateAnswerResponse) Decode(d *jx.Decoder) error
- func (s *CreateAnswerResponse) Encode(e *jx.Encoder)
- func (s *CreateAnswerResponse) GetAnswers() []string
- func (s *CreateAnswerResponse) GetCompletion() OptString
- func (s *CreateAnswerResponse) GetModel() OptString
- func (s *CreateAnswerResponse) GetObject() OptString
- func (s *CreateAnswerResponse) GetSearchModel() OptString
- func (s *CreateAnswerResponse) GetSelectedDocuments() []CreateAnswerResponseSelectedDocumentsItem
- func (s *CreateAnswerResponse) MarshalJSON() ([]byte, error)
- func (s *CreateAnswerResponse) SetAnswers(val []string)
- func (s *CreateAnswerResponse) SetCompletion(val OptString)
- func (s *CreateAnswerResponse) SetModel(val OptString)
- func (s *CreateAnswerResponse) SetObject(val OptString)
- func (s *CreateAnswerResponse) SetSearchModel(val OptString)
- func (s *CreateAnswerResponse) SetSelectedDocuments(val []CreateAnswerResponseSelectedDocumentsItem)
- func (s *CreateAnswerResponse) UnmarshalJSON(data []byte) error
- type CreateAnswerResponseSelectedDocumentsItem
- func (s *CreateAnswerResponseSelectedDocumentsItem) Decode(d *jx.Decoder) error
- func (s *CreateAnswerResponseSelectedDocumentsItem) Encode(e *jx.Encoder)
- func (s *CreateAnswerResponseSelectedDocumentsItem) GetDocument() OptInt
- func (s *CreateAnswerResponseSelectedDocumentsItem) GetText() OptString
- func (s *CreateAnswerResponseSelectedDocumentsItem) MarshalJSON() ([]byte, error)
- func (s *CreateAnswerResponseSelectedDocumentsItem) SetDocument(val OptInt)
- func (s *CreateAnswerResponseSelectedDocumentsItem) SetText(val OptString)
- func (s *CreateAnswerResponseSelectedDocumentsItem) UnmarshalJSON(data []byte) error
- type CreateChatCompletionRequest
- func (s *CreateChatCompletionRequest) Decode(d *jx.Decoder) error
- func (s *CreateChatCompletionRequest) Encode(e *jx.Encoder)
- func (s *CreateChatCompletionRequest) GetFrequencyPenalty() OptNilFloat64
- func (s *CreateChatCompletionRequest) GetLogitBias() 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() OptNilCreateChatCompletionRequestStop
- 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 OptNilCreateChatCompletionRequestStop)
- 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) GetString() (v string, ok bool)
- func (s CreateChatCompletionRequestStop) GetStringArray() (v []string, ok bool)
- func (s CreateChatCompletionRequestStop) IsString() bool
- func (s CreateChatCompletionRequestStop) IsStringArray() bool
- func (s CreateChatCompletionRequestStop) MarshalJSON() ([]byte, error)
- func (s *CreateChatCompletionRequestStop) SetString(v string)
- func (s *CreateChatCompletionRequestStop) SetStringArray(v []string)
- func (s *CreateChatCompletionRequestStop) UnmarshalJSON(data []byte) error
- func (s CreateChatCompletionRequestStop) Validate() error
- type CreateChatCompletionRequestStopType
- type 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 CreateClassificationRequest
- func (s *CreateClassificationRequest) Decode(d *jx.Decoder) error
- func (s *CreateClassificationRequest) Encode(e *jx.Encoder)
- func (s *CreateClassificationRequest) GetExamples() OptNilStringArrayArray
- func (s *CreateClassificationRequest) GetExpand() OptNilAnyArray
- func (s *CreateClassificationRequest) GetFile() OptNilString
- func (s *CreateClassificationRequest) GetLabels() OptNilStringArray
- func (s *CreateClassificationRequest) GetLogitBias() OptCreateClassificationRequestLogitBias
- func (s *CreateClassificationRequest) GetLogprobs() OptNilInt
- func (s *CreateClassificationRequest) GetMaxExamples() OptNilInt
- func (s *CreateClassificationRequest) GetModel() string
- func (s *CreateClassificationRequest) GetQuery() string
- func (s *CreateClassificationRequest) GetReturnMetadata() OptNilBool
- func (s *CreateClassificationRequest) GetReturnPrompt() OptNilBool
- func (s *CreateClassificationRequest) GetSearchModel() OptNilString
- func (s *CreateClassificationRequest) GetTemperature() OptNilFloat64
- func (s *CreateClassificationRequest) GetUser() OptString
- func (s *CreateClassificationRequest) MarshalJSON() ([]byte, error)
- func (s *CreateClassificationRequest) SetExamples(val OptNilStringArrayArray)
- func (s *CreateClassificationRequest) SetExpand(val OptNilAnyArray)
- func (s *CreateClassificationRequest) SetFile(val OptNilString)
- func (s *CreateClassificationRequest) SetLabels(val OptNilStringArray)
- func (s *CreateClassificationRequest) SetLogitBias(val OptCreateClassificationRequestLogitBias)
- func (s *CreateClassificationRequest) SetLogprobs(val OptNilInt)
- func (s *CreateClassificationRequest) SetMaxExamples(val OptNilInt)
- func (s *CreateClassificationRequest) SetModel(val string)
- func (s *CreateClassificationRequest) SetQuery(val string)
- func (s *CreateClassificationRequest) SetReturnMetadata(val OptNilBool)
- func (s *CreateClassificationRequest) SetReturnPrompt(val OptNilBool)
- func (s *CreateClassificationRequest) SetSearchModel(val OptNilString)
- func (s *CreateClassificationRequest) SetTemperature(val OptNilFloat64)
- func (s *CreateClassificationRequest) SetUser(val OptString)
- func (s *CreateClassificationRequest) UnmarshalJSON(data []byte) error
- func (s *CreateClassificationRequest) Validate() error
- type CreateClassificationRequestLogitBias
- func (s *CreateClassificationRequestLogitBias) Decode(d *jx.Decoder) error
- func (s *CreateClassificationRequestLogitBias) Encode(e *jx.Encoder)
- func (s *CreateClassificationRequestLogitBias) MarshalJSON() ([]byte, error)
- func (s *CreateClassificationRequestLogitBias) UnmarshalJSON(data []byte) error
- type CreateClassificationResponse
- func (s *CreateClassificationResponse) Decode(d *jx.Decoder) error
- func (s *CreateClassificationResponse) Encode(e *jx.Encoder)
- func (s *CreateClassificationResponse) GetCompletion() OptString
- func (s *CreateClassificationResponse) GetLabel() OptString
- func (s *CreateClassificationResponse) GetModel() OptString
- func (s *CreateClassificationResponse) GetObject() OptString
- func (s *CreateClassificationResponse) GetSearchModel() OptString
- func (s *CreateClassificationResponse) GetSelectedExamples() []CreateClassificationResponseSelectedExamplesItem
- func (s *CreateClassificationResponse) MarshalJSON() ([]byte, error)
- func (s *CreateClassificationResponse) SetCompletion(val OptString)
- func (s *CreateClassificationResponse) SetLabel(val OptString)
- func (s *CreateClassificationResponse) SetModel(val OptString)
- func (s *CreateClassificationResponse) SetObject(val OptString)
- func (s *CreateClassificationResponse) SetSearchModel(val OptString)
- func (s *CreateClassificationResponse) SetSelectedExamples(val []CreateClassificationResponseSelectedExamplesItem)
- func (s *CreateClassificationResponse) UnmarshalJSON(data []byte) error
- type CreateClassificationResponseSelectedExamplesItem
- func (s *CreateClassificationResponseSelectedExamplesItem) Decode(d *jx.Decoder) error
- func (s *CreateClassificationResponseSelectedExamplesItem) Encode(e *jx.Encoder)
- func (s *CreateClassificationResponseSelectedExamplesItem) GetDocument() OptInt
- func (s *CreateClassificationResponseSelectedExamplesItem) GetLabel() OptString
- func (s *CreateClassificationResponseSelectedExamplesItem) GetText() OptString
- func (s *CreateClassificationResponseSelectedExamplesItem) MarshalJSON() ([]byte, error)
- func (s *CreateClassificationResponseSelectedExamplesItem) SetDocument(val OptInt)
- func (s *CreateClassificationResponseSelectedExamplesItem) SetLabel(val OptString)
- func (s *CreateClassificationResponseSelectedExamplesItem) SetText(val OptString)
- func (s *CreateClassificationResponseSelectedExamplesItem) UnmarshalJSON(data []byte) error
- type CreateCompletionRequest
- func (s *CreateCompletionRequest) Decode(d *jx.Decoder) error
- func (s *CreateCompletionRequest) Encode(e *jx.Encoder)
- func (s *CreateCompletionRequest) GetBestOf() OptNilInt
- func (s *CreateCompletionRequest) GetEcho() OptNilBool
- func (s *CreateCompletionRequest) GetFrequencyPenalty() OptNilFloat64
- func (s *CreateCompletionRequest) GetLogitBias() OptCreateCompletionRequestLogitBias
- func (s *CreateCompletionRequest) GetLogprobs() OptNilInt
- func (s *CreateCompletionRequest) GetMaxTokens() OptNilInt
- func (s *CreateCompletionRequest) GetModel() string
- func (s *CreateCompletionRequest) GetN() OptNilInt
- func (s *CreateCompletionRequest) GetPresencePenalty() OptNilFloat64
- func (s *CreateCompletionRequest) GetPrompt() OptNilCreateCompletionRequestPrompt
- func (s *CreateCompletionRequest) GetStop() OptNilCreateCompletionRequestStop
- func (s *CreateCompletionRequest) GetStream() OptNilBool
- func (s *CreateCompletionRequest) GetSuffix() OptNilString
- func (s *CreateCompletionRequest) GetTemperature() OptNilFloat64
- func (s *CreateCompletionRequest) GetTopP() OptNilFloat64
- func (s *CreateCompletionRequest) GetUser() OptString
- func (s *CreateCompletionRequest) MarshalJSON() ([]byte, error)
- func (s *CreateCompletionRequest) SetBestOf(val OptNilInt)
- func (s *CreateCompletionRequest) SetEcho(val OptNilBool)
- func (s *CreateCompletionRequest) SetFrequencyPenalty(val OptNilFloat64)
- func (s *CreateCompletionRequest) SetLogitBias(val OptCreateCompletionRequestLogitBias)
- func (s *CreateCompletionRequest) SetLogprobs(val OptNilInt)
- func (s *CreateCompletionRequest) SetMaxTokens(val OptNilInt)
- func (s *CreateCompletionRequest) SetModel(val string)
- func (s *CreateCompletionRequest) SetN(val OptNilInt)
- func (s *CreateCompletionRequest) SetPresencePenalty(val OptNilFloat64)
- func (s *CreateCompletionRequest) SetPrompt(val OptNilCreateCompletionRequestPrompt)
- func (s *CreateCompletionRequest) SetStop(val OptNilCreateCompletionRequestStop)
- func (s *CreateCompletionRequest) SetStream(val OptNilBool)
- func (s *CreateCompletionRequest) SetSuffix(val OptNilString)
- func (s *CreateCompletionRequest) SetTemperature(val OptNilFloat64)
- func (s *CreateCompletionRequest) SetTopP(val OptNilFloat64)
- func (s *CreateCompletionRequest) SetUser(val OptString)
- func (s *CreateCompletionRequest) UnmarshalJSON(data []byte) error
- func (s *CreateCompletionRequest) Validate() error
- type CreateCompletionRequestLogitBias
- type CreateCompletionRequestPrompt
- func (s *CreateCompletionRequestPrompt) Decode(d *jx.Decoder) error
- func (s CreateCompletionRequestPrompt) Encode(e *jx.Encoder)
- func (s CreateCompletionRequestPrompt) GetString() (v string, ok bool)
- func (s CreateCompletionRequestPrompt) GetStringArray() (v []string, ok bool)
- func (s CreateCompletionRequestPrompt) IsString() bool
- func (s CreateCompletionRequestPrompt) IsStringArray() bool
- func (s CreateCompletionRequestPrompt) MarshalJSON() ([]byte, error)
- func (s *CreateCompletionRequestPrompt) SetString(v string)
- func (s *CreateCompletionRequestPrompt) SetStringArray(v []string)
- func (s *CreateCompletionRequestPrompt) UnmarshalJSON(data []byte) error
- func (s CreateCompletionRequestPrompt) Validate() error
- type CreateCompletionRequestPromptType
- type CreateCompletionRequestStop
- func (s *CreateCompletionRequestStop) Decode(d *jx.Decoder) error
- func (s CreateCompletionRequestStop) Encode(e *jx.Encoder)
- func (s CreateCompletionRequestStop) GetNull() (v struct{}, ok bool)
- func (s CreateCompletionRequestStop) GetString() (v string, ok bool)
- func (s CreateCompletionRequestStop) GetStringArray() (v []string, ok bool)
- func (s CreateCompletionRequestStop) IsNull() bool
- func (s CreateCompletionRequestStop) IsString() bool
- func (s CreateCompletionRequestStop) IsStringArray() bool
- func (s CreateCompletionRequestStop) MarshalJSON() ([]byte, error)
- func (s *CreateCompletionRequestStop) SetNull(v struct{})
- func (s *CreateCompletionRequestStop) SetString(v string)
- func (s *CreateCompletionRequestStop) SetStringArray(v []string)
- func (s *CreateCompletionRequestStop) UnmarshalJSON(data []byte) error
- func (s CreateCompletionRequestStop) Validate() error
- type CreateCompletionRequestStopType
- type CreateCompletionResponse
- func (s *CreateCompletionResponse) Decode(d *jx.Decoder) error
- func (s *CreateCompletionResponse) Encode(e *jx.Encoder)
- func (s *CreateCompletionResponse) GetChoices() []CreateCompletionResponseChoicesItem
- func (s *CreateCompletionResponse) GetCreated() int
- func (s *CreateCompletionResponse) GetID() string
- func (s *CreateCompletionResponse) GetModel() string
- func (s *CreateCompletionResponse) GetObject() string
- func (s *CreateCompletionResponse) GetUsage() OptCreateCompletionResponseUsage
- func (s *CreateCompletionResponse) MarshalJSON() ([]byte, error)
- func (s *CreateCompletionResponse) SetChoices(val []CreateCompletionResponseChoicesItem)
- func (s *CreateCompletionResponse) SetCreated(val int)
- func (s *CreateCompletionResponse) SetID(val string)
- func (s *CreateCompletionResponse) SetModel(val string)
- func (s *CreateCompletionResponse) SetObject(val string)
- func (s *CreateCompletionResponse) SetUsage(val OptCreateCompletionResponseUsage)
- func (s *CreateCompletionResponse) UnmarshalJSON(data []byte) error
- func (s *CreateCompletionResponse) Validate() error
- type CreateCompletionResponseChoicesItem
- func (s *CreateCompletionResponseChoicesItem) Decode(d *jx.Decoder) error
- func (s *CreateCompletionResponseChoicesItem) Encode(e *jx.Encoder)
- func (s *CreateCompletionResponseChoicesItem) GetFinishReason() OptString
- func (s *CreateCompletionResponseChoicesItem) GetIndex() OptInt
- func (s *CreateCompletionResponseChoicesItem) GetLogprobs() OptNilCreateCompletionResponseChoicesItemLogprobs
- func (s *CreateCompletionResponseChoicesItem) GetText() OptString
- func (s *CreateCompletionResponseChoicesItem) MarshalJSON() ([]byte, error)
- func (s *CreateCompletionResponseChoicesItem) SetFinishReason(val OptString)
- func (s *CreateCompletionResponseChoicesItem) SetIndex(val OptInt)
- func (s *CreateCompletionResponseChoicesItem) SetLogprobs(val OptNilCreateCompletionResponseChoicesItemLogprobs)
- func (s *CreateCompletionResponseChoicesItem) SetText(val OptString)
- func (s *CreateCompletionResponseChoicesItem) UnmarshalJSON(data []byte) error
- func (s *CreateCompletionResponseChoicesItem) Validate() error
- type CreateCompletionResponseChoicesItemLogprobs
- func (s *CreateCompletionResponseChoicesItemLogprobs) Decode(d *jx.Decoder) error
- func (s *CreateCompletionResponseChoicesItemLogprobs) Encode(e *jx.Encoder)
- func (s *CreateCompletionResponseChoicesItemLogprobs) GetTextOffset() []int
- func (s *CreateCompletionResponseChoicesItemLogprobs) GetTokenLogprobs() []float64
- func (s *CreateCompletionResponseChoicesItemLogprobs) GetTokens() []string
- func (s *CreateCompletionResponseChoicesItemLogprobs) GetTopLogprobs() []CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem
- func (s *CreateCompletionResponseChoicesItemLogprobs) MarshalJSON() ([]byte, error)
- func (s *CreateCompletionResponseChoicesItemLogprobs) SetTextOffset(val []int)
- func (s *CreateCompletionResponseChoicesItemLogprobs) SetTokenLogprobs(val []float64)
- func (s *CreateCompletionResponseChoicesItemLogprobs) SetTokens(val []string)
- func (s *CreateCompletionResponseChoicesItemLogprobs) SetTopLogprobs(val []CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem)
- func (s *CreateCompletionResponseChoicesItemLogprobs) UnmarshalJSON(data []byte) error
- func (s *CreateCompletionResponseChoicesItemLogprobs) Validate() error
- type CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem
- func (s *CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem) Decode(d *jx.Decoder) error
- func (s *CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem) Encode(e *jx.Encoder)
- func (s *CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem) MarshalJSON() ([]byte, error)
- func (s *CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem) UnmarshalJSON(data []byte) error
- type CreateCompletionResponseUsage
- func (s *CreateCompletionResponseUsage) Decode(d *jx.Decoder) error
- func (s *CreateCompletionResponseUsage) Encode(e *jx.Encoder)
- func (s *CreateCompletionResponseUsage) GetCompletionTokens() int
- func (s *CreateCompletionResponseUsage) GetPromptTokens() int
- func (s *CreateCompletionResponseUsage) GetTotalTokens() int
- func (s *CreateCompletionResponseUsage) MarshalJSON() ([]byte, error)
- func (s *CreateCompletionResponseUsage) SetCompletionTokens(val int)
- func (s *CreateCompletionResponseUsage) SetPromptTokens(val int)
- func (s *CreateCompletionResponseUsage) SetTotalTokens(val int)
- func (s *CreateCompletionResponseUsage) 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 CreateEmbeddingRequest
- func (s *CreateEmbeddingRequest) Decode(d *jx.Decoder) error
- func (s *CreateEmbeddingRequest) Encode(e *jx.Encoder)
- func (s *CreateEmbeddingRequest) GetInput() CreateEmbeddingRequestInput
- func (s *CreateEmbeddingRequest) GetModel() string
- func (s *CreateEmbeddingRequest) GetUser() OptString
- func (s *CreateEmbeddingRequest) MarshalJSON() ([]byte, error)
- func (s *CreateEmbeddingRequest) SetInput(val CreateEmbeddingRequestInput)
- func (s *CreateEmbeddingRequest) SetModel(val string)
- func (s *CreateEmbeddingRequest) SetUser(val OptString)
- func (s *CreateEmbeddingRequest) UnmarshalJSON(data []byte) error
- func (s *CreateEmbeddingRequest) Validate() error
- type CreateEmbeddingRequestInput
- func (s *CreateEmbeddingRequestInput) Decode(d *jx.Decoder) error
- func (s CreateEmbeddingRequestInput) Encode(e *jx.Encoder)
- func (s CreateEmbeddingRequestInput) GetString() (v string, ok bool)
- func (s CreateEmbeddingRequestInput) GetStringArray() (v []string, ok bool)
- func (s CreateEmbeddingRequestInput) IsString() bool
- func (s CreateEmbeddingRequestInput) IsStringArray() bool
- func (s CreateEmbeddingRequestInput) MarshalJSON() ([]byte, error)
- func (s *CreateEmbeddingRequestInput) SetString(v string)
- func (s *CreateEmbeddingRequestInput) SetStringArray(v []string)
- func (s *CreateEmbeddingRequestInput) UnmarshalJSON(data []byte) error
- func (s CreateEmbeddingRequestInput) Validate() error
- type CreateEmbeddingRequestInputType
- type CreateEmbeddingResponse
- func (s *CreateEmbeddingResponse) Decode(d *jx.Decoder) error
- func (s *CreateEmbeddingResponse) Encode(e *jx.Encoder)
- func (s *CreateEmbeddingResponse) GetData() []CreateEmbeddingResponseDataItem
- func (s *CreateEmbeddingResponse) GetModel() string
- func (s *CreateEmbeddingResponse) GetObject() string
- func (s *CreateEmbeddingResponse) GetUsage() CreateEmbeddingResponseUsage
- func (s *CreateEmbeddingResponse) MarshalJSON() ([]byte, error)
- func (s *CreateEmbeddingResponse) SetData(val []CreateEmbeddingResponseDataItem)
- func (s *CreateEmbeddingResponse) SetModel(val string)
- func (s *CreateEmbeddingResponse) SetObject(val string)
- func (s *CreateEmbeddingResponse) SetUsage(val CreateEmbeddingResponseUsage)
- func (s *CreateEmbeddingResponse) UnmarshalJSON(data []byte) error
- func (s *CreateEmbeddingResponse) Validate() error
- type CreateEmbeddingResponseDataItem
- func (s *CreateEmbeddingResponseDataItem) Decode(d *jx.Decoder) error
- func (s *CreateEmbeddingResponseDataItem) Encode(e *jx.Encoder)
- func (s *CreateEmbeddingResponseDataItem) GetEmbedding() []float64
- func (s *CreateEmbeddingResponseDataItem) GetIndex() int
- func (s *CreateEmbeddingResponseDataItem) GetObject() string
- func (s *CreateEmbeddingResponseDataItem) MarshalJSON() ([]byte, error)
- func (s *CreateEmbeddingResponseDataItem) SetEmbedding(val []float64)
- func (s *CreateEmbeddingResponseDataItem) SetIndex(val int)
- func (s *CreateEmbeddingResponseDataItem) SetObject(val string)
- func (s *CreateEmbeddingResponseDataItem) UnmarshalJSON(data []byte) error
- func (s *CreateEmbeddingResponseDataItem) Validate() error
- type CreateEmbeddingResponseUsage
- func (s *CreateEmbeddingResponseUsage) Decode(d *jx.Decoder) error
- func (s *CreateEmbeddingResponseUsage) Encode(e *jx.Encoder)
- func (s *CreateEmbeddingResponseUsage) GetPromptTokens() int
- func (s *CreateEmbeddingResponseUsage) GetTotalTokens() int
- func (s *CreateEmbeddingResponseUsage) MarshalJSON() ([]byte, error)
- func (s *CreateEmbeddingResponseUsage) SetPromptTokens(val int)
- func (s *CreateEmbeddingResponseUsage) SetTotalTokens(val int)
- func (s *CreateEmbeddingResponseUsage) UnmarshalJSON(data []byte) error
- type CreateFileRequestMultipart
- 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 CreateImageEditRequestMultipart
- func (s *CreateImageEditRequestMultipart) GetImage() ht.MultipartFile
- func (s *CreateImageEditRequestMultipart) GetMask() OptMultipartFile
- func (s *CreateImageEditRequestMultipart) GetN() OptNilInt
- func (s *CreateImageEditRequestMultipart) GetPrompt() string
- func (s *CreateImageEditRequestMultipart) GetResponseFormat() OptNilCreateImageEditRequestMultipartResponseFormat
- func (s *CreateImageEditRequestMultipart) GetSize() OptNilCreateImageEditRequestMultipartSize
- func (s *CreateImageEditRequestMultipart) GetUser() OptString
- func (s *CreateImageEditRequestMultipart) SetImage(val ht.MultipartFile)
- func (s *CreateImageEditRequestMultipart) SetMask(val OptMultipartFile)
- func (s *CreateImageEditRequestMultipart) SetN(val OptNilInt)
- func (s *CreateImageEditRequestMultipart) SetPrompt(val string)
- func (s *CreateImageEditRequestMultipart) SetResponseFormat(val OptNilCreateImageEditRequestMultipartResponseFormat)
- func (s *CreateImageEditRequestMultipart) SetSize(val OptNilCreateImageEditRequestMultipartSize)
- func (s *CreateImageEditRequestMultipart) SetUser(val OptString)
- func (s *CreateImageEditRequestMultipart) Validate() error
- type CreateImageEditRequestMultipartResponseFormat
- func (CreateImageEditRequestMultipartResponseFormat) AllValues() []CreateImageEditRequestMultipartResponseFormat
- func (s CreateImageEditRequestMultipartResponseFormat) MarshalText() ([]byte, error)
- func (s *CreateImageEditRequestMultipartResponseFormat) UnmarshalText(data []byte) error
- func (s CreateImageEditRequestMultipartResponseFormat) Validate() error
- type CreateImageEditRequestMultipartSize
- func (CreateImageEditRequestMultipartSize) AllValues() []CreateImageEditRequestMultipartSize
- func (s CreateImageEditRequestMultipartSize) MarshalText() ([]byte, error)
- func (s *CreateImageEditRequestMultipartSize) UnmarshalText(data []byte) error
- func (s CreateImageEditRequestMultipartSize) Validate() error
- 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 (CreateImageRequestResponseFormat) AllValues() []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 (CreateImageRequestSize) AllValues() []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 CreateImageVariationRequestMultipart
- func (s *CreateImageVariationRequestMultipart) GetImage() ht.MultipartFile
- func (s *CreateImageVariationRequestMultipart) GetN() OptNilInt
- func (s *CreateImageVariationRequestMultipart) GetResponseFormat() OptNilCreateImageVariationRequestMultipartResponseFormat
- func (s *CreateImageVariationRequestMultipart) GetSize() OptNilCreateImageVariationRequestMultipartSize
- func (s *CreateImageVariationRequestMultipart) GetUser() OptString
- func (s *CreateImageVariationRequestMultipart) SetImage(val ht.MultipartFile)
- func (s *CreateImageVariationRequestMultipart) SetN(val OptNilInt)
- func (s *CreateImageVariationRequestMultipart) SetResponseFormat(val OptNilCreateImageVariationRequestMultipartResponseFormat)
- func (s *CreateImageVariationRequestMultipart) SetSize(val OptNilCreateImageVariationRequestMultipartSize)
- func (s *CreateImageVariationRequestMultipart) SetUser(val OptString)
- func (s *CreateImageVariationRequestMultipart) Validate() error
- type CreateImageVariationRequestMultipartResponseFormat
- func (CreateImageVariationRequestMultipartResponseFormat) AllValues() []CreateImageVariationRequestMultipartResponseFormat
- func (s CreateImageVariationRequestMultipartResponseFormat) MarshalText() ([]byte, error)
- func (s *CreateImageVariationRequestMultipartResponseFormat) UnmarshalText(data []byte) error
- func (s CreateImageVariationRequestMultipartResponseFormat) Validate() error
- type CreateImageVariationRequestMultipartSize
- func (CreateImageVariationRequestMultipartSize) AllValues() []CreateImageVariationRequestMultipartSize
- func (s CreateImageVariationRequestMultipartSize) MarshalText() ([]byte, error)
- func (s *CreateImageVariationRequestMultipartSize) UnmarshalText(data []byte) error
- func (s CreateImageVariationRequestMultipartSize) Validate() error
- 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 CreateSearchParams
- type CreateSearchRequest
- func (s *CreateSearchRequest) Decode(d *jx.Decoder) error
- func (s *CreateSearchRequest) Encode(e *jx.Encoder)
- func (s *CreateSearchRequest) GetDocuments() OptNilStringArray
- func (s *CreateSearchRequest) GetFile() OptNilString
- func (s *CreateSearchRequest) GetMaxRerank() OptNilInt
- func (s *CreateSearchRequest) GetQuery() string
- func (s *CreateSearchRequest) GetReturnMetadata() OptNilBool
- func (s *CreateSearchRequest) GetUser() OptString
- func (s *CreateSearchRequest) MarshalJSON() ([]byte, error)
- func (s *CreateSearchRequest) SetDocuments(val OptNilStringArray)
- func (s *CreateSearchRequest) SetFile(val OptNilString)
- func (s *CreateSearchRequest) SetMaxRerank(val OptNilInt)
- func (s *CreateSearchRequest) SetQuery(val string)
- func (s *CreateSearchRequest) SetReturnMetadata(val OptNilBool)
- func (s *CreateSearchRequest) SetUser(val OptString)
- func (s *CreateSearchRequest) UnmarshalJSON(data []byte) error
- func (s *CreateSearchRequest) Validate() error
- type CreateSearchResponse
- func (s *CreateSearchResponse) Decode(d *jx.Decoder) error
- func (s *CreateSearchResponse) Encode(e *jx.Encoder)
- func (s *CreateSearchResponse) GetData() []CreateSearchResponseDataItem
- func (s *CreateSearchResponse) GetModel() OptString
- func (s *CreateSearchResponse) GetObject() OptString
- func (s *CreateSearchResponse) MarshalJSON() ([]byte, error)
- func (s *CreateSearchResponse) SetData(val []CreateSearchResponseDataItem)
- func (s *CreateSearchResponse) SetModel(val OptString)
- func (s *CreateSearchResponse) SetObject(val OptString)
- func (s *CreateSearchResponse) UnmarshalJSON(data []byte) error
- func (s *CreateSearchResponse) Validate() error
- type CreateSearchResponseDataItem
- func (s *CreateSearchResponseDataItem) Decode(d *jx.Decoder) error
- func (s *CreateSearchResponseDataItem) Encode(e *jx.Encoder)
- func (s *CreateSearchResponseDataItem) GetDocument() OptInt
- func (s *CreateSearchResponseDataItem) GetObject() OptString
- func (s *CreateSearchResponseDataItem) GetScore() OptFloat64
- func (s *CreateSearchResponseDataItem) MarshalJSON() ([]byte, error)
- func (s *CreateSearchResponseDataItem) SetDocument(val OptInt)
- func (s *CreateSearchResponseDataItem) SetObject(val OptString)
- func (s *CreateSearchResponseDataItem) SetScore(val OptFloat64)
- func (s *CreateSearchResponseDataItem) UnmarshalJSON(data []byte) error
- func (s *CreateSearchResponseDataItem) Validate() error
- type CreateTranscriptionRequestMultipart
- func (s *CreateTranscriptionRequestMultipart) GetFile() ht.MultipartFile
- func (s *CreateTranscriptionRequestMultipart) GetLanguage() OptString
- func (s *CreateTranscriptionRequestMultipart) GetModel() string
- func (s *CreateTranscriptionRequestMultipart) GetPrompt() OptString
- func (s *CreateTranscriptionRequestMultipart) GetResponseFormat() OptString
- func (s *CreateTranscriptionRequestMultipart) GetTemperature() OptFloat64
- func (s *CreateTranscriptionRequestMultipart) SetFile(val ht.MultipartFile)
- func (s *CreateTranscriptionRequestMultipart) SetLanguage(val OptString)
- func (s *CreateTranscriptionRequestMultipart) SetModel(val string)
- func (s *CreateTranscriptionRequestMultipart) SetPrompt(val OptString)
- func (s *CreateTranscriptionRequestMultipart) SetResponseFormat(val OptString)
- func (s *CreateTranscriptionRequestMultipart) SetTemperature(val OptFloat64)
- func (s *CreateTranscriptionRequestMultipart) Validate() error
- type CreateTranscriptionResponse
- func (s *CreateTranscriptionResponse) Decode(d *jx.Decoder) error
- func (s *CreateTranscriptionResponse) Encode(e *jx.Encoder)
- func (s *CreateTranscriptionResponse) GetText() string
- func (s *CreateTranscriptionResponse) MarshalJSON() ([]byte, error)
- func (s *CreateTranscriptionResponse) SetText(val string)
- func (s *CreateTranscriptionResponse) UnmarshalJSON(data []byte) error
- type CreateTranslationRequestMultipart
- func (s *CreateTranslationRequestMultipart) GetFile() ht.MultipartFile
- func (s *CreateTranslationRequestMultipart) GetModel() string
- func (s *CreateTranslationRequestMultipart) GetPrompt() OptString
- func (s *CreateTranslationRequestMultipart) GetResponseFormat() OptString
- func (s *CreateTranslationRequestMultipart) GetTemperature() OptFloat64
- func (s *CreateTranslationRequestMultipart) SetFile(val ht.MultipartFile)
- func (s *CreateTranslationRequestMultipart) SetModel(val string)
- func (s *CreateTranslationRequestMultipart) SetPrompt(val OptString)
- func (s *CreateTranslationRequestMultipart) SetResponseFormat(val OptString)
- func (s *CreateTranslationRequestMultipart) SetTemperature(val OptFloat64)
- func (s *CreateTranslationRequestMultipart) Validate() error
- type CreateTranslationResponse
- func (s *CreateTranslationResponse) Decode(d *jx.Decoder) error
- func (s *CreateTranslationResponse) Encode(e *jx.Encoder)
- func (s *CreateTranslationResponse) GetText() string
- func (s *CreateTranslationResponse) MarshalJSON() ([]byte, error)
- func (s *CreateTranslationResponse) SetText(val string)
- func (s *CreateTranslationResponse) UnmarshalJSON(data []byte) 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 Engine
- type ErrorHandler
- type FineTune
- type FineTuneEvent
- type Handler
- type ImagesResponse
- type Invoker
- type Labeler
- type ListEnginesResponse
- func (s *ListEnginesResponse) Decode(d *jx.Decoder) error
- func (s *ListEnginesResponse) Encode(e *jx.Encoder)
- func (s *ListEnginesResponse) GetData() []Engine
- func (s *ListEnginesResponse) GetObject() string
- func (s *ListEnginesResponse) MarshalJSON() ([]byte, error)
- func (s *ListEnginesResponse) SetData(val []Engine)
- func (s *ListEnginesResponse) SetObject(val string)
- func (s *ListEnginesResponse) UnmarshalJSON(data []byte) error
- func (s *ListEnginesResponse) Validate() error
- 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 OperationName
- 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 OptCreateAnswerRequestLogitBias
- func (o *OptCreateAnswerRequestLogitBias) Decode(d *jx.Decoder) error
- func (o OptCreateAnswerRequestLogitBias) Encode(e *jx.Encoder)
- func (o OptCreateAnswerRequestLogitBias) Get() (v *CreateAnswerRequestLogitBias, ok bool)
- func (o OptCreateAnswerRequestLogitBias) IsSet() bool
- func (s OptCreateAnswerRequestLogitBias) MarshalJSON() ([]byte, error)
- func (o OptCreateAnswerRequestLogitBias) Or(d *CreateAnswerRequestLogitBias) *CreateAnswerRequestLogitBias
- func (o *OptCreateAnswerRequestLogitBias) Reset()
- func (o *OptCreateAnswerRequestLogitBias) SetTo(v *CreateAnswerRequestLogitBias)
- func (s *OptCreateAnswerRequestLogitBias) 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 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 OptCreateClassificationRequestLogitBias
- func (o *OptCreateClassificationRequestLogitBias) Decode(d *jx.Decoder) error
- func (o OptCreateClassificationRequestLogitBias) Encode(e *jx.Encoder)
- func (o OptCreateClassificationRequestLogitBias) Get() (v *CreateClassificationRequestLogitBias, ok bool)
- func (o OptCreateClassificationRequestLogitBias) IsSet() bool
- func (s OptCreateClassificationRequestLogitBias) MarshalJSON() ([]byte, error)
- func (o OptCreateClassificationRequestLogitBias) Or(d *CreateClassificationRequestLogitBias) *CreateClassificationRequestLogitBias
- func (o *OptCreateClassificationRequestLogitBias) Reset()
- func (o *OptCreateClassificationRequestLogitBias) SetTo(v *CreateClassificationRequestLogitBias)
- func (s *OptCreateClassificationRequestLogitBias) UnmarshalJSON(data []byte) error
- type OptCreateCompletionRequestLogitBias
- func (o *OptCreateCompletionRequestLogitBias) Decode(d *jx.Decoder) error
- func (o OptCreateCompletionRequestLogitBias) Encode(e *jx.Encoder)
- func (o OptCreateCompletionRequestLogitBias) Get() (v *CreateCompletionRequestLogitBias, ok bool)
- func (o OptCreateCompletionRequestLogitBias) IsSet() bool
- func (s OptCreateCompletionRequestLogitBias) MarshalJSON() ([]byte, error)
- func (o OptCreateCompletionRequestLogitBias) Or(d *CreateCompletionRequestLogitBias) *CreateCompletionRequestLogitBias
- func (o *OptCreateCompletionRequestLogitBias) Reset()
- func (o *OptCreateCompletionRequestLogitBias) SetTo(v *CreateCompletionRequestLogitBias)
- func (s *OptCreateCompletionRequestLogitBias) UnmarshalJSON(data []byte) error
- type OptCreateCompletionResponseUsage
- func (o *OptCreateCompletionResponseUsage) Decode(d *jx.Decoder) error
- func (o OptCreateCompletionResponseUsage) Encode(e *jx.Encoder)
- func (o OptCreateCompletionResponseUsage) Get() (v CreateCompletionResponseUsage, ok bool)
- func (o OptCreateCompletionResponseUsage) IsSet() bool
- func (s OptCreateCompletionResponseUsage) MarshalJSON() ([]byte, error)
- func (o OptCreateCompletionResponseUsage) Or(d CreateCompletionResponseUsage) CreateCompletionResponseUsage
- func (o *OptCreateCompletionResponseUsage) Reset()
- func (o *OptCreateCompletionResponseUsage) SetTo(v CreateCompletionResponseUsage)
- func (s *OptCreateCompletionResponseUsage) UnmarshalJSON(data []byte) error
- type OptFloat64
- func (o *OptFloat64) Decode(d *jx.Decoder) error
- func (o OptFloat64) Encode(e *jx.Encoder)
- func (o OptFloat64) Get() (v float64, ok bool)
- func (o OptFloat64) IsSet() bool
- func (s OptFloat64) MarshalJSON() ([]byte, error)
- func (o OptFloat64) Or(d float64) float64
- func (o *OptFloat64) Reset()
- func (o *OptFloat64) SetTo(v float64)
- func (s *OptFloat64) 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 OptNilAnyArray
- func (o *OptNilAnyArray) Decode(d *jx.Decoder) error
- func (o OptNilAnyArray) Encode(e *jx.Encoder)
- func (o OptNilAnyArray) Get() (v []jx.Raw, ok bool)
- func (o OptNilAnyArray) IsNull() bool
- func (o OptNilAnyArray) IsSet() bool
- func (s OptNilAnyArray) MarshalJSON() ([]byte, error)
- func (o OptNilAnyArray) Or(d []jx.Raw) []jx.Raw
- func (o *OptNilAnyArray) Reset()
- func (o *OptNilAnyArray) SetTo(v []jx.Raw)
- func (o *OptNilAnyArray) SetToNull()
- func (s *OptNilAnyArray) UnmarshalJSON(data []byte) error
- type OptNilBool
- func (o *OptNilBool) Decode(d *jx.Decoder) error
- func (o OptNilBool) Encode(e *jx.Encoder)
- func (o OptNilBool) Get() (v bool, ok bool)
- func (o OptNilBool) 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 OptNilCreateAnswerRequestStop
- func (o *OptNilCreateAnswerRequestStop) Decode(d *jx.Decoder) error
- func (o OptNilCreateAnswerRequestStop) Encode(e *jx.Encoder)
- func (o OptNilCreateAnswerRequestStop) Get() (v CreateAnswerRequestStop, ok bool)
- func (o OptNilCreateAnswerRequestStop) IsNull() bool
- func (o OptNilCreateAnswerRequestStop) IsSet() bool
- func (s OptNilCreateAnswerRequestStop) MarshalJSON() ([]byte, error)
- func (o OptNilCreateAnswerRequestStop) Or(d CreateAnswerRequestStop) CreateAnswerRequestStop
- func (o *OptNilCreateAnswerRequestStop) Reset()
- func (o *OptNilCreateAnswerRequestStop) SetTo(v CreateAnswerRequestStop)
- func (o *OptNilCreateAnswerRequestStop) SetToNull()
- func (s *OptNilCreateAnswerRequestStop) UnmarshalJSON(data []byte) error
- type OptNilCreateChatCompletionRequestStop
- func (o *OptNilCreateChatCompletionRequestStop) Decode(d *jx.Decoder) error
- func (o OptNilCreateChatCompletionRequestStop) Encode(e *jx.Encoder)
- func (o OptNilCreateChatCompletionRequestStop) Get() (v CreateChatCompletionRequestStop, ok bool)
- func (o OptNilCreateChatCompletionRequestStop) IsNull() bool
- func (o OptNilCreateChatCompletionRequestStop) IsSet() bool
- func (s OptNilCreateChatCompletionRequestStop) MarshalJSON() ([]byte, error)
- func (o OptNilCreateChatCompletionRequestStop) Or(d CreateChatCompletionRequestStop) CreateChatCompletionRequestStop
- func (o *OptNilCreateChatCompletionRequestStop) Reset()
- func (o *OptNilCreateChatCompletionRequestStop) SetTo(v CreateChatCompletionRequestStop)
- func (o *OptNilCreateChatCompletionRequestStop) SetToNull()
- func (s *OptNilCreateChatCompletionRequestStop) UnmarshalJSON(data []byte) error
- type OptNilCreateCompletionRequestPrompt
- func (o *OptNilCreateCompletionRequestPrompt) Decode(d *jx.Decoder) error
- func (o OptNilCreateCompletionRequestPrompt) Encode(e *jx.Encoder)
- func (o OptNilCreateCompletionRequestPrompt) Get() (v CreateCompletionRequestPrompt, ok bool)
- func (o OptNilCreateCompletionRequestPrompt) IsNull() bool
- func (o OptNilCreateCompletionRequestPrompt) IsSet() bool
- func (s OptNilCreateCompletionRequestPrompt) MarshalJSON() ([]byte, error)
- func (o OptNilCreateCompletionRequestPrompt) Or(d CreateCompletionRequestPrompt) CreateCompletionRequestPrompt
- func (o *OptNilCreateCompletionRequestPrompt) Reset()
- func (o *OptNilCreateCompletionRequestPrompt) SetTo(v CreateCompletionRequestPrompt)
- func (o *OptNilCreateCompletionRequestPrompt) SetToNull()
- func (s *OptNilCreateCompletionRequestPrompt) UnmarshalJSON(data []byte) error
- type OptNilCreateCompletionRequestStop
- func (o *OptNilCreateCompletionRequestStop) Decode(d *jx.Decoder) error
- func (o OptNilCreateCompletionRequestStop) Encode(e *jx.Encoder)
- func (o OptNilCreateCompletionRequestStop) Get() (v CreateCompletionRequestStop, ok bool)
- func (o OptNilCreateCompletionRequestStop) IsNull() bool
- func (o OptNilCreateCompletionRequestStop) IsSet() bool
- func (s OptNilCreateCompletionRequestStop) MarshalJSON() ([]byte, error)
- func (o OptNilCreateCompletionRequestStop) Or(d CreateCompletionRequestStop) CreateCompletionRequestStop
- func (o *OptNilCreateCompletionRequestStop) Reset()
- func (o *OptNilCreateCompletionRequestStop) SetTo(v CreateCompletionRequestStop)
- func (o *OptNilCreateCompletionRequestStop) SetToNull()
- func (s *OptNilCreateCompletionRequestStop) UnmarshalJSON(data []byte) error
- type OptNilCreateCompletionResponseChoicesItemLogprobs
- func (o *OptNilCreateCompletionResponseChoicesItemLogprobs) Decode(d *jx.Decoder) error
- func (o OptNilCreateCompletionResponseChoicesItemLogprobs) Encode(e *jx.Encoder)
- func (o OptNilCreateCompletionResponseChoicesItemLogprobs) Get() (v CreateCompletionResponseChoicesItemLogprobs, ok bool)
- func (o OptNilCreateCompletionResponseChoicesItemLogprobs) IsNull() bool
- func (o OptNilCreateCompletionResponseChoicesItemLogprobs) IsSet() bool
- func (s OptNilCreateCompletionResponseChoicesItemLogprobs) MarshalJSON() ([]byte, error)
- func (o OptNilCreateCompletionResponseChoicesItemLogprobs) Or(d CreateCompletionResponseChoicesItemLogprobs) CreateCompletionResponseChoicesItemLogprobs
- func (o *OptNilCreateCompletionResponseChoicesItemLogprobs) Reset()
- func (o *OptNilCreateCompletionResponseChoicesItemLogprobs) SetTo(v CreateCompletionResponseChoicesItemLogprobs)
- func (o *OptNilCreateCompletionResponseChoicesItemLogprobs) SetToNull()
- func (s *OptNilCreateCompletionResponseChoicesItemLogprobs) 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 OptNilCreateImageEditRequestMultipartResponseFormat
- func (o OptNilCreateImageEditRequestMultipartResponseFormat) Get() (v CreateImageEditRequestMultipartResponseFormat, ok bool)
- func (o OptNilCreateImageEditRequestMultipartResponseFormat) IsNull() bool
- func (o OptNilCreateImageEditRequestMultipartResponseFormat) IsSet() bool
- func (o OptNilCreateImageEditRequestMultipartResponseFormat) Or(d CreateImageEditRequestMultipartResponseFormat) CreateImageEditRequestMultipartResponseFormat
- func (o *OptNilCreateImageEditRequestMultipartResponseFormat) Reset()
- func (o *OptNilCreateImageEditRequestMultipartResponseFormat) SetTo(v CreateImageEditRequestMultipartResponseFormat)
- func (o *OptNilCreateImageEditRequestMultipartResponseFormat) SetToNull()
- type OptNilCreateImageEditRequestMultipartSize
- func (o OptNilCreateImageEditRequestMultipartSize) Get() (v CreateImageEditRequestMultipartSize, ok bool)
- func (o OptNilCreateImageEditRequestMultipartSize) IsNull() bool
- func (o OptNilCreateImageEditRequestMultipartSize) IsSet() bool
- func (o OptNilCreateImageEditRequestMultipartSize) Or(d CreateImageEditRequestMultipartSize) CreateImageEditRequestMultipartSize
- func (o *OptNilCreateImageEditRequestMultipartSize) Reset()
- func (o *OptNilCreateImageEditRequestMultipartSize) SetTo(v CreateImageEditRequestMultipartSize)
- func (o *OptNilCreateImageEditRequestMultipartSize) 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 OptNilCreateImageVariationRequestMultipartResponseFormat
- func (o OptNilCreateImageVariationRequestMultipartResponseFormat) Get() (v CreateImageVariationRequestMultipartResponseFormat, ok bool)
- func (o OptNilCreateImageVariationRequestMultipartResponseFormat) IsNull() bool
- func (o OptNilCreateImageVariationRequestMultipartResponseFormat) IsSet() bool
- func (o OptNilCreateImageVariationRequestMultipartResponseFormat) Or(d CreateImageVariationRequestMultipartResponseFormat) CreateImageVariationRequestMultipartResponseFormat
- func (o *OptNilCreateImageVariationRequestMultipartResponseFormat) Reset()
- func (o *OptNilCreateImageVariationRequestMultipartResponseFormat) SetTo(v CreateImageVariationRequestMultipartResponseFormat)
- func (o *OptNilCreateImageVariationRequestMultipartResponseFormat) SetToNull()
- type OptNilCreateImageVariationRequestMultipartSize
- func (o OptNilCreateImageVariationRequestMultipartSize) Get() (v CreateImageVariationRequestMultipartSize, ok bool)
- func (o OptNilCreateImageVariationRequestMultipartSize) IsNull() bool
- func (o OptNilCreateImageVariationRequestMultipartSize) IsSet() bool
- func (o OptNilCreateImageVariationRequestMultipartSize) Or(d CreateImageVariationRequestMultipartSize) CreateImageVariationRequestMultipartSize
- func (o *OptNilCreateImageVariationRequestMultipartSize) Reset()
- func (o *OptNilCreateImageVariationRequestMultipartSize) SetTo(v CreateImageVariationRequestMultipartSize)
- func (o *OptNilCreateImageVariationRequestMultipartSize) 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 OptNilStringArray
- func (o *OptNilStringArray) Decode(d *jx.Decoder) error
- func (o OptNilStringArray) Encode(e *jx.Encoder)
- func (o OptNilStringArray) Get() (v []string, ok bool)
- func (o OptNilStringArray) IsNull() bool
- func (o OptNilStringArray) IsSet() bool
- func (s OptNilStringArray) MarshalJSON() ([]byte, error)
- func (o OptNilStringArray) Or(d []string) []string
- func (o *OptNilStringArray) Reset()
- func (o *OptNilStringArray) SetTo(v []string)
- func (o *OptNilStringArray) SetToNull()
- func (s *OptNilStringArray) UnmarshalJSON(data []byte) error
- type OptNilStringArrayArray
- func (o *OptNilStringArrayArray) Decode(d *jx.Decoder) error
- func (o OptNilStringArrayArray) Encode(e *jx.Encoder)
- func (o OptNilStringArrayArray) Get() (v [][]string, ok bool)
- func (o OptNilStringArrayArray) IsNull() bool
- func (o OptNilStringArrayArray) IsSet() bool
- func (s OptNilStringArrayArray) MarshalJSON() ([]byte, error)
- func (o OptNilStringArrayArray) Or(d [][]string) [][]string
- func (o *OptNilStringArrayArray) Reset()
- func (o *OptNilStringArrayArray) SetTo(v [][]string)
- func (o *OptNilStringArrayArray) SetToNull()
- func (s *OptNilStringArrayArray) 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 RetrieveEngineParams
- 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) CreateAnswer(ctx context.Context, req *CreateAnswerRequest) (r *CreateAnswerResponse, _ error)deprecated
- func (UnimplementedHandler) CreateChatCompletion(ctx context.Context, req *CreateChatCompletionRequest) (r *CreateChatCompletionResponse, _ error)
- func (UnimplementedHandler) CreateClassification(ctx context.Context, req *CreateClassificationRequest) (r *CreateClassificationResponse, _ error)deprecated
- func (UnimplementedHandler) CreateCompletion(ctx context.Context, req *CreateCompletionRequest) (r *CreateCompletionResponse, _ error)
- func (UnimplementedHandler) CreateEdit(ctx context.Context, req *CreateEditRequest) (r *CreateEditResponse, _ error)
- func (UnimplementedHandler) CreateEmbedding(ctx context.Context, req *CreateEmbeddingRequest) (r *CreateEmbeddingResponse, _ error)
- func (UnimplementedHandler) CreateFile(ctx context.Context, req *CreateFileRequestMultipart) (r OpenAIFile, _ 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 *CreateImageEditRequestMultipart) (r ImagesResponse, _ error)
- func (UnimplementedHandler) CreateImageVariation(ctx context.Context, req *CreateImageVariationRequestMultipart) (r ImagesResponse, _ error)
- func (UnimplementedHandler) CreateModeration(ctx context.Context, req *CreateModerationRequest) (r *CreateModerationResponse, _ error)
- func (UnimplementedHandler) CreateSearch(ctx context.Context, req *CreateSearchRequest, params CreateSearchParams) (r *CreateSearchResponse, _ error)deprecated
- func (UnimplementedHandler) CreateTranscription(ctx context.Context, req *CreateTranscriptionRequestMultipart) (r *CreateTranscriptionResponse, _ error)
- func (UnimplementedHandler) CreateTranslation(ctx context.Context, req *CreateTranslationRequestMultipart) (r *CreateTranslationResponse, _ 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) ListEngines(ctx context.Context) (r *ListEnginesResponse, _ error)deprecated
- 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) RetrieveEngine(ctx context.Context, params RetrieveEngineParams) (r Engine, _ error)deprecated
- 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 ¶
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) AllValues ¶
func (ChatCompletionRequestMessageRole) AllValues() []ChatCompletionRequestMessageRole
AllValues returns all ChatCompletionRequestMessageRole values.
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) AllValues ¶
func (ChatCompletionResponseMessageRole) AllValues() []ChatCompletionResponseMessageRole
AllValues returns all ChatCompletionResponseMessageRole values.
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) CreateAnswer
deprecated
func (c *Client) CreateAnswer(ctx context.Context, request *CreateAnswerRequest) (*CreateAnswerResponse, error)
CreateAnswer invokes createAnswer operation.
Answers the specified question using the provided documents and examples. The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for [completion](/docs/api-reference/completions).
Deprecated: schema marks this operation as deprecated.
POST /answers
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) CreateClassification
deprecated
func (c *Client) CreateClassification(ctx context.Context, request *CreateClassificationRequest) (*CreateClassificationResponse, error)
CreateClassification invokes createClassification operation.
Classifies the specified `query` using provided examples. The endpoint first [searches](/docs/api-reference/searches) over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the [completions](/docs/api-reference/completions) endpoint. Labeled examples can be provided via an uploaded `file`, or explicitly listed in the request using the `examples` parameter for quick tests and small scale use cases.
Deprecated: schema marks this operation as deprecated.
POST /classifications
func (*Client) CreateCompletion ¶
func (c *Client) CreateCompletion(ctx context.Context, request *CreateCompletionRequest) (*CreateCompletionResponse, error)
CreateCompletion invokes createCompletion operation.
Creates a completion for the provided prompt and parameters.
POST /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) CreateEmbedding ¶
func (c *Client) CreateEmbedding(ctx context.Context, request *CreateEmbeddingRequest) (*CreateEmbeddingResponse, error)
CreateEmbedding invokes createEmbedding operation.
Creates an embedding vector representing the input text.
POST /embeddings
func (*Client) CreateFile ¶
func (c *Client) CreateFile(ctx context.Context, request *CreateFileRequestMultipart) (OpenAIFile, error)
CreateFile invokes createFile operation.
Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.
POST /files
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 *CreateImageEditRequestMultipart) (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 *CreateImageVariationRequestMultipart) (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) CreateSearch
deprecated
func (c *Client) CreateSearch(ctx context.Context, request *CreateSearchRequest, params CreateSearchParams) (*CreateSearchResponse, error)
CreateSearch invokes createSearch operation.
The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them. To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.
Deprecated: schema marks this operation as deprecated.
POST /engines/{engine_id}/search
func (*Client) CreateTranscription ¶
func (c *Client) CreateTranscription(ctx context.Context, request *CreateTranscriptionRequestMultipart) (*CreateTranscriptionResponse, error)
CreateTranscription invokes createTranscription operation.
Transcribes audio into the input language.
POST /audio/transcriptions
func (*Client) CreateTranslation ¶
func (c *Client) CreateTranslation(ctx context.Context, request *CreateTranslationRequestMultipart) (*CreateTranslationResponse, error)
CreateTranslation invokes createTranslation operation.
Translates audio into into English.
POST /audio/translations
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) ListEngines
deprecated
func (c *Client) ListEngines(ctx context.Context) (*ListEnginesResponse, error)
ListEngines invokes listEngines operation.
Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.
Deprecated: schema marks this operation as deprecated.
GET /engines
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) RetrieveEngine
deprecated
RetrieveEngine invokes retrieveEngine operation.
Retrieves a model instance, providing basic information about it such as the owner and availability.
Deprecated: schema marks this operation as deprecated.
GET /engines/{engine_id}
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 CreateAnswerRequest ¶
type CreateAnswerRequest struct { // ID of the model to use for completion. You can select one of `ada`, `babbage`, `curie`, or // `davinci`. Model string `json:"model"` // Question to get answered. Question string `json:"question"` // List of (question, answer) pairs that will help steer the model towards the tone and answer format // you'd like. We recommend adding 2 to 3 examples. Examples [][]string `json:"examples"` // A text snippet containing the contextual information used to generate the answers for the // `examples` you provide. ExamplesContext string `json:"examples_context"` // List of documents from which the answer for the input `question` should be derived. If this is an // empty list, the question will be answered based on the question-answer examples. // You should specify either `documents` or a `file`, but not both. Documents OptNilStringArray `json:"documents"` // The ID of an uploaded file that contains documents to search over. See [upload // file](/docs/api-reference/files/upload) for how to upload a file of the desired format and purpose. // You should specify either `documents` or a `file`, but not both. File OptNilString `json:"file"` // ID of the model to use for [Search](/docs/api-reference/searches/create). You can select one of // `ada`, `babbage`, `curie`, or `davinci`. SearchModel OptNilString `json:"search_model"` // The maximum number of documents to be ranked by [Search](/docs/api-reference/searches/create) when // using `file`. Setting it to a higher value leads to improved accuracy but with increased latency // and cost. MaxRerank OptNilInt `json:"max_rerank"` // 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. Temperature OptNilFloat64 `json:"temperature"` // Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For // example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will // always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in // the response. // The maximum value for `logprobs` is 5. If you need more than this, please contact us through our // [Help center](https://help.openai.com) and describe your use case. // When `logprobs` is set, `completion` will be automatically added into `expand` to get the logprobs. Logprobs OptNilInt `json:"logprobs"` // The maximum number of tokens allowed for the generated answer. MaxTokens OptNilInt `json:"max_tokens"` // Up to 4 sequences where the API will stop generating further tokens. The returned text will not // contain the stop sequence. Stop OptNilCreateAnswerRequestStop `json:"stop"` // How many answers to generate for each question. N OptNilInt `json:"n"` // Modify the likelihood of specified tokens appearing in the completion. // Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an // associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) // (which works for both GPT-2 and GPT-3) to convert text to token IDs. 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. // As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being // generated. LogitBias OptCreateAnswerRequestLogitBias `json:"logit_bias"` // A special boolean flag for showing metadata. If set to `true`, each document entry in the returned // JSON will contain a "metadata" field. // This flag only takes effect when `file` is set. ReturnMetadata OptNilBool `json:"return_metadata"` // If set to `true`, the returned JSON will include a "prompt" field containing the final prompt that // was used to request a completion. This is mainly useful for debugging purposes. ReturnPrompt OptNilBool `json:"return_prompt"` // If an object name is in the list, we provide the full information of the object; otherwise, we // only provide the object ID. Currently we support `completion` and `file` objects for expansion. Expand OptNilAnyArray `json:"expand"` // 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/CreateAnswerRequest
func (*CreateAnswerRequest) Decode ¶
func (s *CreateAnswerRequest) Decode(d *jx.Decoder) error
Decode decodes CreateAnswerRequest from json.
func (*CreateAnswerRequest) Encode ¶
func (s *CreateAnswerRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateAnswerRequest) GetDocuments ¶
func (s *CreateAnswerRequest) GetDocuments() OptNilStringArray
GetDocuments returns the value of Documents.
func (*CreateAnswerRequest) GetExamples ¶
func (s *CreateAnswerRequest) GetExamples() [][]string
GetExamples returns the value of Examples.
func (*CreateAnswerRequest) GetExamplesContext ¶
func (s *CreateAnswerRequest) GetExamplesContext() string
GetExamplesContext returns the value of ExamplesContext.
func (*CreateAnswerRequest) GetExpand ¶
func (s *CreateAnswerRequest) GetExpand() OptNilAnyArray
GetExpand returns the value of Expand.
func (*CreateAnswerRequest) GetFile ¶
func (s *CreateAnswerRequest) GetFile() OptNilString
GetFile returns the value of File.
func (*CreateAnswerRequest) GetLogitBias ¶
func (s *CreateAnswerRequest) GetLogitBias() OptCreateAnswerRequestLogitBias
GetLogitBias returns the value of LogitBias.
func (*CreateAnswerRequest) GetLogprobs ¶
func (s *CreateAnswerRequest) GetLogprobs() OptNilInt
GetLogprobs returns the value of Logprobs.
func (*CreateAnswerRequest) GetMaxRerank ¶
func (s *CreateAnswerRequest) GetMaxRerank() OptNilInt
GetMaxRerank returns the value of MaxRerank.
func (*CreateAnswerRequest) GetMaxTokens ¶
func (s *CreateAnswerRequest) GetMaxTokens() OptNilInt
GetMaxTokens returns the value of MaxTokens.
func (*CreateAnswerRequest) GetModel ¶
func (s *CreateAnswerRequest) GetModel() string
GetModel returns the value of Model.
func (*CreateAnswerRequest) GetN ¶
func (s *CreateAnswerRequest) GetN() OptNilInt
GetN returns the value of N.
func (*CreateAnswerRequest) GetQuestion ¶
func (s *CreateAnswerRequest) GetQuestion() string
GetQuestion returns the value of Question.
func (*CreateAnswerRequest) GetReturnMetadata ¶
func (s *CreateAnswerRequest) GetReturnMetadata() OptNilBool
GetReturnMetadata returns the value of ReturnMetadata.
func (*CreateAnswerRequest) GetReturnPrompt ¶
func (s *CreateAnswerRequest) GetReturnPrompt() OptNilBool
GetReturnPrompt returns the value of ReturnPrompt.
func (*CreateAnswerRequest) GetSearchModel ¶
func (s *CreateAnswerRequest) GetSearchModel() OptNilString
GetSearchModel returns the value of SearchModel.
func (*CreateAnswerRequest) GetStop ¶
func (s *CreateAnswerRequest) GetStop() OptNilCreateAnswerRequestStop
GetStop returns the value of Stop.
func (*CreateAnswerRequest) GetTemperature ¶
func (s *CreateAnswerRequest) GetTemperature() OptNilFloat64
GetTemperature returns the value of Temperature.
func (*CreateAnswerRequest) GetUser ¶
func (s *CreateAnswerRequest) GetUser() OptString
GetUser returns the value of User.
func (*CreateAnswerRequest) MarshalJSON ¶
func (s *CreateAnswerRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateAnswerRequest) SetDocuments ¶
func (s *CreateAnswerRequest) SetDocuments(val OptNilStringArray)
SetDocuments sets the value of Documents.
func (*CreateAnswerRequest) SetExamples ¶
func (s *CreateAnswerRequest) SetExamples(val [][]string)
SetExamples sets the value of Examples.
func (*CreateAnswerRequest) SetExamplesContext ¶
func (s *CreateAnswerRequest) SetExamplesContext(val string)
SetExamplesContext sets the value of ExamplesContext.
func (*CreateAnswerRequest) SetExpand ¶
func (s *CreateAnswerRequest) SetExpand(val OptNilAnyArray)
SetExpand sets the value of Expand.
func (*CreateAnswerRequest) SetFile ¶
func (s *CreateAnswerRequest) SetFile(val OptNilString)
SetFile sets the value of File.
func (*CreateAnswerRequest) SetLogitBias ¶
func (s *CreateAnswerRequest) SetLogitBias(val OptCreateAnswerRequestLogitBias)
SetLogitBias sets the value of LogitBias.
func (*CreateAnswerRequest) SetLogprobs ¶
func (s *CreateAnswerRequest) SetLogprobs(val OptNilInt)
SetLogprobs sets the value of Logprobs.
func (*CreateAnswerRequest) SetMaxRerank ¶
func (s *CreateAnswerRequest) SetMaxRerank(val OptNilInt)
SetMaxRerank sets the value of MaxRerank.
func (*CreateAnswerRequest) SetMaxTokens ¶
func (s *CreateAnswerRequest) SetMaxTokens(val OptNilInt)
SetMaxTokens sets the value of MaxTokens.
func (*CreateAnswerRequest) SetModel ¶
func (s *CreateAnswerRequest) SetModel(val string)
SetModel sets the value of Model.
func (*CreateAnswerRequest) SetN ¶
func (s *CreateAnswerRequest) SetN(val OptNilInt)
SetN sets the value of N.
func (*CreateAnswerRequest) SetQuestion ¶
func (s *CreateAnswerRequest) SetQuestion(val string)
SetQuestion sets the value of Question.
func (*CreateAnswerRequest) SetReturnMetadata ¶
func (s *CreateAnswerRequest) SetReturnMetadata(val OptNilBool)
SetReturnMetadata sets the value of ReturnMetadata.
func (*CreateAnswerRequest) SetReturnPrompt ¶
func (s *CreateAnswerRequest) SetReturnPrompt(val OptNilBool)
SetReturnPrompt sets the value of ReturnPrompt.
func (*CreateAnswerRequest) SetSearchModel ¶
func (s *CreateAnswerRequest) SetSearchModel(val OptNilString)
SetSearchModel sets the value of SearchModel.
func (*CreateAnswerRequest) SetStop ¶
func (s *CreateAnswerRequest) SetStop(val OptNilCreateAnswerRequestStop)
SetStop sets the value of Stop.
func (*CreateAnswerRequest) SetTemperature ¶
func (s *CreateAnswerRequest) SetTemperature(val OptNilFloat64)
SetTemperature sets the value of Temperature.
func (*CreateAnswerRequest) SetUser ¶
func (s *CreateAnswerRequest) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateAnswerRequest) UnmarshalJSON ¶
func (s *CreateAnswerRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateAnswerRequest) Validate ¶
func (s *CreateAnswerRequest) Validate() error
type CreateAnswerRequestLogitBias ¶
type CreateAnswerRequestLogitBias 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 GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. 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. As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated.
func (*CreateAnswerRequestLogitBias) Decode ¶
func (s *CreateAnswerRequestLogitBias) Decode(d *jx.Decoder) error
Decode decodes CreateAnswerRequestLogitBias from json.
func (*CreateAnswerRequestLogitBias) Encode ¶
func (s *CreateAnswerRequestLogitBias) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateAnswerRequestLogitBias) MarshalJSON ¶
func (s *CreateAnswerRequestLogitBias) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateAnswerRequestLogitBias) UnmarshalJSON ¶
func (s *CreateAnswerRequestLogitBias) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateAnswerRequestStop ¶
type CreateAnswerRequestStop struct { Type CreateAnswerRequestStopType // switch on this field String string StringArray []string }
Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. CreateAnswerRequestStop represents sum type.
func NewStringArrayCreateAnswerRequestStop ¶
func NewStringArrayCreateAnswerRequestStop(v []string) CreateAnswerRequestStop
NewStringArrayCreateAnswerRequestStop returns new CreateAnswerRequestStop from []string.
func NewStringCreateAnswerRequestStop ¶
func NewStringCreateAnswerRequestStop(v string) CreateAnswerRequestStop
NewStringCreateAnswerRequestStop returns new CreateAnswerRequestStop from string.
func (*CreateAnswerRequestStop) Decode ¶
func (s *CreateAnswerRequestStop) Decode(d *jx.Decoder) error
Decode decodes CreateAnswerRequestStop from json.
func (CreateAnswerRequestStop) Encode ¶
func (s CreateAnswerRequestStop) Encode(e *jx.Encoder)
Encode encodes CreateAnswerRequestStop as json.
func (CreateAnswerRequestStop) GetString ¶
func (s CreateAnswerRequestStop) GetString() (v string, ok bool)
GetString returns string and true boolean if CreateAnswerRequestStop is string.
func (CreateAnswerRequestStop) GetStringArray ¶
func (s CreateAnswerRequestStop) GetStringArray() (v []string, ok bool)
GetStringArray returns []string and true boolean if CreateAnswerRequestStop is []string.
func (CreateAnswerRequestStop) IsString ¶
func (s CreateAnswerRequestStop) IsString() bool
IsString reports whether CreateAnswerRequestStop is string.
func (CreateAnswerRequestStop) IsStringArray ¶
func (s CreateAnswerRequestStop) IsStringArray() bool
IsStringArray reports whether CreateAnswerRequestStop is []string.
func (CreateAnswerRequestStop) MarshalJSON ¶
func (s CreateAnswerRequestStop) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateAnswerRequestStop) SetString ¶
func (s *CreateAnswerRequestStop) SetString(v string)
SetString sets CreateAnswerRequestStop to string.
func (*CreateAnswerRequestStop) SetStringArray ¶
func (s *CreateAnswerRequestStop) SetStringArray(v []string)
SetStringArray sets CreateAnswerRequestStop to []string.
func (*CreateAnswerRequestStop) UnmarshalJSON ¶
func (s *CreateAnswerRequestStop) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (CreateAnswerRequestStop) Validate ¶
func (s CreateAnswerRequestStop) Validate() error
type CreateAnswerRequestStopType ¶
type CreateAnswerRequestStopType string
CreateAnswerRequestStopType is oneOf type of CreateAnswerRequestStop.
const ( StringCreateAnswerRequestStop CreateAnswerRequestStopType = "string" StringArrayCreateAnswerRequestStop CreateAnswerRequestStopType = "[]string" )
Possible values for CreateAnswerRequestStopType.
type CreateAnswerResponse ¶
type CreateAnswerResponse struct { Object OptString `json:"object"` Model OptString `json:"model"` SearchModel OptString `json:"search_model"` Completion OptString `json:"completion"` Answers []string `json:"answers"` SelectedDocuments []CreateAnswerResponseSelectedDocumentsItem `json:"selected_documents"` }
Ref: #/components/schemas/CreateAnswerResponse
func (*CreateAnswerResponse) Decode ¶
func (s *CreateAnswerResponse) Decode(d *jx.Decoder) error
Decode decodes CreateAnswerResponse from json.
func (*CreateAnswerResponse) Encode ¶
func (s *CreateAnswerResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateAnswerResponse) GetAnswers ¶
func (s *CreateAnswerResponse) GetAnswers() []string
GetAnswers returns the value of Answers.
func (*CreateAnswerResponse) GetCompletion ¶
func (s *CreateAnswerResponse) GetCompletion() OptString
GetCompletion returns the value of Completion.
func (*CreateAnswerResponse) GetModel ¶
func (s *CreateAnswerResponse) GetModel() OptString
GetModel returns the value of Model.
func (*CreateAnswerResponse) GetObject ¶
func (s *CreateAnswerResponse) GetObject() OptString
GetObject returns the value of Object.
func (*CreateAnswerResponse) GetSearchModel ¶
func (s *CreateAnswerResponse) GetSearchModel() OptString
GetSearchModel returns the value of SearchModel.
func (*CreateAnswerResponse) GetSelectedDocuments ¶
func (s *CreateAnswerResponse) GetSelectedDocuments() []CreateAnswerResponseSelectedDocumentsItem
GetSelectedDocuments returns the value of SelectedDocuments.
func (*CreateAnswerResponse) MarshalJSON ¶
func (s *CreateAnswerResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateAnswerResponse) SetAnswers ¶
func (s *CreateAnswerResponse) SetAnswers(val []string)
SetAnswers sets the value of Answers.
func (*CreateAnswerResponse) SetCompletion ¶
func (s *CreateAnswerResponse) SetCompletion(val OptString)
SetCompletion sets the value of Completion.
func (*CreateAnswerResponse) SetModel ¶
func (s *CreateAnswerResponse) SetModel(val OptString)
SetModel sets the value of Model.
func (*CreateAnswerResponse) SetObject ¶
func (s *CreateAnswerResponse) SetObject(val OptString)
SetObject sets the value of Object.
func (*CreateAnswerResponse) SetSearchModel ¶
func (s *CreateAnswerResponse) SetSearchModel(val OptString)
SetSearchModel sets the value of SearchModel.
func (*CreateAnswerResponse) SetSelectedDocuments ¶
func (s *CreateAnswerResponse) SetSelectedDocuments(val []CreateAnswerResponseSelectedDocumentsItem)
SetSelectedDocuments sets the value of SelectedDocuments.
func (*CreateAnswerResponse) UnmarshalJSON ¶
func (s *CreateAnswerResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateAnswerResponseSelectedDocumentsItem ¶
type CreateAnswerResponseSelectedDocumentsItem struct { Document OptInt `json:"document"` Text OptString `json:"text"` }
func (*CreateAnswerResponseSelectedDocumentsItem) Decode ¶
func (s *CreateAnswerResponseSelectedDocumentsItem) Decode(d *jx.Decoder) error
Decode decodes CreateAnswerResponseSelectedDocumentsItem from json.
func (*CreateAnswerResponseSelectedDocumentsItem) Encode ¶
func (s *CreateAnswerResponseSelectedDocumentsItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateAnswerResponseSelectedDocumentsItem) GetDocument ¶
func (s *CreateAnswerResponseSelectedDocumentsItem) GetDocument() OptInt
GetDocument returns the value of Document.
func (*CreateAnswerResponseSelectedDocumentsItem) GetText ¶
func (s *CreateAnswerResponseSelectedDocumentsItem) GetText() OptString
GetText returns the value of Text.
func (*CreateAnswerResponseSelectedDocumentsItem) MarshalJSON ¶
func (s *CreateAnswerResponseSelectedDocumentsItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateAnswerResponseSelectedDocumentsItem) SetDocument ¶
func (s *CreateAnswerResponseSelectedDocumentsItem) SetDocument(val OptInt)
SetDocument sets the value of Document.
func (*CreateAnswerResponseSelectedDocumentsItem) SetText ¶
func (s *CreateAnswerResponseSelectedDocumentsItem) SetText(val OptString)
SetText sets the value of Text.
func (*CreateAnswerResponseSelectedDocumentsItem) UnmarshalJSON ¶
func (s *CreateAnswerResponseSelectedDocumentsItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
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 OptNilCreateChatCompletionRequestStop `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() OptNilCreateChatCompletionRequestStop
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 OptNilCreateChatCompletionRequestStop)
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 String string StringArray []string }
Up to 4 sequences where the API will stop generating further tokens. CreateChatCompletionRequestStop represents sum type.
func NewStringArrayCreateChatCompletionRequestStop ¶
func NewStringArrayCreateChatCompletionRequestStop(v []string) CreateChatCompletionRequestStop
NewStringArrayCreateChatCompletionRequestStop returns new CreateChatCompletionRequestStop from []string.
func NewStringCreateChatCompletionRequestStop ¶
func NewStringCreateChatCompletionRequestStop(v string) CreateChatCompletionRequestStop
NewStringCreateChatCompletionRequestStop returns new CreateChatCompletionRequestStop from string.
func (*CreateChatCompletionRequestStop) Decode ¶
func (s *CreateChatCompletionRequestStop) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequestStop from json.
func (CreateChatCompletionRequestStop) Encode ¶
func (s CreateChatCompletionRequestStop) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionRequestStop as json.
func (CreateChatCompletionRequestStop) GetString ¶
func (s CreateChatCompletionRequestStop) GetString() (v string, ok bool)
GetString returns string and true boolean if CreateChatCompletionRequestStop is string.
func (CreateChatCompletionRequestStop) GetStringArray ¶
func (s CreateChatCompletionRequestStop) GetStringArray() (v []string, ok bool)
GetStringArray returns []string and true boolean if CreateChatCompletionRequestStop is []string.
func (CreateChatCompletionRequestStop) IsString ¶
func (s CreateChatCompletionRequestStop) IsString() bool
IsString reports whether CreateChatCompletionRequestStop is string.
func (CreateChatCompletionRequestStop) IsStringArray ¶
func (s CreateChatCompletionRequestStop) IsStringArray() bool
IsStringArray reports whether CreateChatCompletionRequestStop is []string.
func (CreateChatCompletionRequestStop) MarshalJSON ¶
func (s CreateChatCompletionRequestStop) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateChatCompletionRequestStop) SetString ¶
func (s *CreateChatCompletionRequestStop) SetString(v string)
SetString sets CreateChatCompletionRequestStop to string.
func (*CreateChatCompletionRequestStop) SetStringArray ¶
func (s *CreateChatCompletionRequestStop) SetStringArray(v []string)
SetStringArray sets CreateChatCompletionRequestStop to []string.
func (*CreateChatCompletionRequestStop) UnmarshalJSON ¶
func (s *CreateChatCompletionRequestStop) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (CreateChatCompletionRequestStop) Validate ¶
func (s CreateChatCompletionRequestStop) Validate() error
type CreateChatCompletionRequestStopType ¶
type CreateChatCompletionRequestStopType string
CreateChatCompletionRequestStopType is oneOf type of CreateChatCompletionRequestStop.
const ( StringCreateChatCompletionRequestStop CreateChatCompletionRequestStopType = "string" StringArrayCreateChatCompletionRequestStop CreateChatCompletionRequestStopType = "[]string" )
Possible values for CreateChatCompletionRequestStopType.
type 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 CreateClassificationRequest ¶
type CreateClassificationRequest struct { // ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see // all of your available models, or see our [Model overview](/docs/models/overview) for descriptions // of them. Model string `json:"model"` // Query to be classified. Query string `json:"query"` // A list of examples with labels, in the following format: // `[["The movie is so interesting.", "Positive"], ["It is quite boring.", "Negative"], ...]` // All the label strings will be normalized to be capitalized. // You should specify either `examples` or `file`, but not both. Examples OptNilStringArrayArray `json:"examples"` // The ID of the uploaded file that contains training examples. See [upload // file](/docs/api-reference/files/upload) for how to upload a file of the desired format and purpose. // You should specify either `examples` or `file`, but not both. File OptNilString `json:"file"` // The set of categories being classified. If not specified, candidate labels will be automatically // collected from the examples you provide. All the label strings will be normalized to be // capitalized. Labels OptNilStringArray `json:"labels"` // ID of the model to use for [Search](/docs/api-reference/searches/create). You can select one of // `ada`, `babbage`, `curie`, or `davinci`. SearchModel OptNilString `json:"search_model"` // 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. Temperature OptNilFloat64 `json:"temperature"` // Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For // example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will // always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in // the response. // The maximum value for `logprobs` is 5. If you need more than this, please contact us through our // [Help center](https://help.openai.com) and describe your use case. // When `logprobs` is set, `completion` will be automatically added into `expand` to get the logprobs. Logprobs OptNilInt `json:"logprobs"` // The maximum number of examples to be ranked by [Search](/docs/api-reference/searches/create) when // using `file`. Setting it to a higher value leads to improved accuracy but with increased latency // and cost. MaxExamples OptNilInt `json:"max_examples"` // Modify the likelihood of specified tokens appearing in the completion. // Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an // associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) // (which works for both GPT-2 and GPT-3) to convert text to token IDs. 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. // As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being // generated. LogitBias OptCreateClassificationRequestLogitBias `json:"logit_bias"` // If set to `true`, the returned JSON will include a "prompt" field containing the final prompt that // was used to request a completion. This is mainly useful for debugging purposes. ReturnPrompt OptNilBool `json:"return_prompt"` // A special boolean flag for showing metadata. If set to `true`, each document entry in the returned // JSON will contain a "metadata" field. // This flag only takes effect when `file` is set. ReturnMetadata OptNilBool `json:"return_metadata"` // If an object name is in the list, we provide the full information of the object; otherwise, we // only provide the object ID. Currently we support `completion` and `file` objects for expansion. Expand OptNilAnyArray `json:"expand"` // 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/CreateClassificationRequest
func (*CreateClassificationRequest) Decode ¶
func (s *CreateClassificationRequest) Decode(d *jx.Decoder) error
Decode decodes CreateClassificationRequest from json.
func (*CreateClassificationRequest) Encode ¶
func (s *CreateClassificationRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateClassificationRequest) GetExamples ¶
func (s *CreateClassificationRequest) GetExamples() OptNilStringArrayArray
GetExamples returns the value of Examples.
func (*CreateClassificationRequest) GetExpand ¶
func (s *CreateClassificationRequest) GetExpand() OptNilAnyArray
GetExpand returns the value of Expand.
func (*CreateClassificationRequest) GetFile ¶
func (s *CreateClassificationRequest) GetFile() OptNilString
GetFile returns the value of File.
func (*CreateClassificationRequest) GetLabels ¶
func (s *CreateClassificationRequest) GetLabels() OptNilStringArray
GetLabels returns the value of Labels.
func (*CreateClassificationRequest) GetLogitBias ¶
func (s *CreateClassificationRequest) GetLogitBias() OptCreateClassificationRequestLogitBias
GetLogitBias returns the value of LogitBias.
func (*CreateClassificationRequest) GetLogprobs ¶
func (s *CreateClassificationRequest) GetLogprobs() OptNilInt
GetLogprobs returns the value of Logprobs.
func (*CreateClassificationRequest) GetMaxExamples ¶
func (s *CreateClassificationRequest) GetMaxExamples() OptNilInt
GetMaxExamples returns the value of MaxExamples.
func (*CreateClassificationRequest) GetModel ¶
func (s *CreateClassificationRequest) GetModel() string
GetModel returns the value of Model.
func (*CreateClassificationRequest) GetQuery ¶
func (s *CreateClassificationRequest) GetQuery() string
GetQuery returns the value of Query.
func (*CreateClassificationRequest) GetReturnMetadata ¶
func (s *CreateClassificationRequest) GetReturnMetadata() OptNilBool
GetReturnMetadata returns the value of ReturnMetadata.
func (*CreateClassificationRequest) GetReturnPrompt ¶
func (s *CreateClassificationRequest) GetReturnPrompt() OptNilBool
GetReturnPrompt returns the value of ReturnPrompt.
func (*CreateClassificationRequest) GetSearchModel ¶
func (s *CreateClassificationRequest) GetSearchModel() OptNilString
GetSearchModel returns the value of SearchModel.
func (*CreateClassificationRequest) GetTemperature ¶
func (s *CreateClassificationRequest) GetTemperature() OptNilFloat64
GetTemperature returns the value of Temperature.
func (*CreateClassificationRequest) GetUser ¶
func (s *CreateClassificationRequest) GetUser() OptString
GetUser returns the value of User.
func (*CreateClassificationRequest) MarshalJSON ¶
func (s *CreateClassificationRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateClassificationRequest) SetExamples ¶
func (s *CreateClassificationRequest) SetExamples(val OptNilStringArrayArray)
SetExamples sets the value of Examples.
func (*CreateClassificationRequest) SetExpand ¶
func (s *CreateClassificationRequest) SetExpand(val OptNilAnyArray)
SetExpand sets the value of Expand.
func (*CreateClassificationRequest) SetFile ¶
func (s *CreateClassificationRequest) SetFile(val OptNilString)
SetFile sets the value of File.
func (*CreateClassificationRequest) SetLabels ¶
func (s *CreateClassificationRequest) SetLabels(val OptNilStringArray)
SetLabels sets the value of Labels.
func (*CreateClassificationRequest) SetLogitBias ¶
func (s *CreateClassificationRequest) SetLogitBias(val OptCreateClassificationRequestLogitBias)
SetLogitBias sets the value of LogitBias.
func (*CreateClassificationRequest) SetLogprobs ¶
func (s *CreateClassificationRequest) SetLogprobs(val OptNilInt)
SetLogprobs sets the value of Logprobs.
func (*CreateClassificationRequest) SetMaxExamples ¶
func (s *CreateClassificationRequest) SetMaxExamples(val OptNilInt)
SetMaxExamples sets the value of MaxExamples.
func (*CreateClassificationRequest) SetModel ¶
func (s *CreateClassificationRequest) SetModel(val string)
SetModel sets the value of Model.
func (*CreateClassificationRequest) SetQuery ¶
func (s *CreateClassificationRequest) SetQuery(val string)
SetQuery sets the value of Query.
func (*CreateClassificationRequest) SetReturnMetadata ¶
func (s *CreateClassificationRequest) SetReturnMetadata(val OptNilBool)
SetReturnMetadata sets the value of ReturnMetadata.
func (*CreateClassificationRequest) SetReturnPrompt ¶
func (s *CreateClassificationRequest) SetReturnPrompt(val OptNilBool)
SetReturnPrompt sets the value of ReturnPrompt.
func (*CreateClassificationRequest) SetSearchModel ¶
func (s *CreateClassificationRequest) SetSearchModel(val OptNilString)
SetSearchModel sets the value of SearchModel.
func (*CreateClassificationRequest) SetTemperature ¶
func (s *CreateClassificationRequest) SetTemperature(val OptNilFloat64)
SetTemperature sets the value of Temperature.
func (*CreateClassificationRequest) SetUser ¶
func (s *CreateClassificationRequest) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateClassificationRequest) UnmarshalJSON ¶
func (s *CreateClassificationRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateClassificationRequest) Validate ¶
func (s *CreateClassificationRequest) Validate() error
type CreateClassificationRequestLogitBias ¶
type CreateClassificationRequestLogitBias 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 GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. 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. As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated.
func (*CreateClassificationRequestLogitBias) Decode ¶
func (s *CreateClassificationRequestLogitBias) Decode(d *jx.Decoder) error
Decode decodes CreateClassificationRequestLogitBias from json.
func (*CreateClassificationRequestLogitBias) Encode ¶
func (s *CreateClassificationRequestLogitBias) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateClassificationRequestLogitBias) MarshalJSON ¶
func (s *CreateClassificationRequestLogitBias) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateClassificationRequestLogitBias) UnmarshalJSON ¶
func (s *CreateClassificationRequestLogitBias) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateClassificationResponse ¶
type CreateClassificationResponse struct { Object OptString `json:"object"` Model OptString `json:"model"` SearchModel OptString `json:"search_model"` Completion OptString `json:"completion"` Label OptString `json:"label"` SelectedExamples []CreateClassificationResponseSelectedExamplesItem `json:"selected_examples"` }
Ref: #/components/schemas/CreateClassificationResponse
func (*CreateClassificationResponse) Decode ¶
func (s *CreateClassificationResponse) Decode(d *jx.Decoder) error
Decode decodes CreateClassificationResponse from json.
func (*CreateClassificationResponse) Encode ¶
func (s *CreateClassificationResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateClassificationResponse) GetCompletion ¶
func (s *CreateClassificationResponse) GetCompletion() OptString
GetCompletion returns the value of Completion.
func (*CreateClassificationResponse) GetLabel ¶
func (s *CreateClassificationResponse) GetLabel() OptString
GetLabel returns the value of Label.
func (*CreateClassificationResponse) GetModel ¶
func (s *CreateClassificationResponse) GetModel() OptString
GetModel returns the value of Model.
func (*CreateClassificationResponse) GetObject ¶
func (s *CreateClassificationResponse) GetObject() OptString
GetObject returns the value of Object.
func (*CreateClassificationResponse) GetSearchModel ¶
func (s *CreateClassificationResponse) GetSearchModel() OptString
GetSearchModel returns the value of SearchModel.
func (*CreateClassificationResponse) GetSelectedExamples ¶
func (s *CreateClassificationResponse) GetSelectedExamples() []CreateClassificationResponseSelectedExamplesItem
GetSelectedExamples returns the value of SelectedExamples.
func (*CreateClassificationResponse) MarshalJSON ¶
func (s *CreateClassificationResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateClassificationResponse) SetCompletion ¶
func (s *CreateClassificationResponse) SetCompletion(val OptString)
SetCompletion sets the value of Completion.
func (*CreateClassificationResponse) SetLabel ¶
func (s *CreateClassificationResponse) SetLabel(val OptString)
SetLabel sets the value of Label.
func (*CreateClassificationResponse) SetModel ¶
func (s *CreateClassificationResponse) SetModel(val OptString)
SetModel sets the value of Model.
func (*CreateClassificationResponse) SetObject ¶
func (s *CreateClassificationResponse) SetObject(val OptString)
SetObject sets the value of Object.
func (*CreateClassificationResponse) SetSearchModel ¶
func (s *CreateClassificationResponse) SetSearchModel(val OptString)
SetSearchModel sets the value of SearchModel.
func (*CreateClassificationResponse) SetSelectedExamples ¶
func (s *CreateClassificationResponse) SetSelectedExamples(val []CreateClassificationResponseSelectedExamplesItem)
SetSelectedExamples sets the value of SelectedExamples.
func (*CreateClassificationResponse) UnmarshalJSON ¶
func (s *CreateClassificationResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateClassificationResponseSelectedExamplesItem ¶
type CreateClassificationResponseSelectedExamplesItem struct { Document OptInt `json:"document"` Text OptString `json:"text"` Label OptString `json:"label"` }
func (*CreateClassificationResponseSelectedExamplesItem) Decode ¶
func (s *CreateClassificationResponseSelectedExamplesItem) Decode(d *jx.Decoder) error
Decode decodes CreateClassificationResponseSelectedExamplesItem from json.
func (*CreateClassificationResponseSelectedExamplesItem) Encode ¶
func (s *CreateClassificationResponseSelectedExamplesItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateClassificationResponseSelectedExamplesItem) GetDocument ¶
func (s *CreateClassificationResponseSelectedExamplesItem) GetDocument() OptInt
GetDocument returns the value of Document.
func (*CreateClassificationResponseSelectedExamplesItem) GetLabel ¶
func (s *CreateClassificationResponseSelectedExamplesItem) GetLabel() OptString
GetLabel returns the value of Label.
func (*CreateClassificationResponseSelectedExamplesItem) GetText ¶
func (s *CreateClassificationResponseSelectedExamplesItem) GetText() OptString
GetText returns the value of Text.
func (*CreateClassificationResponseSelectedExamplesItem) MarshalJSON ¶
func (s *CreateClassificationResponseSelectedExamplesItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateClassificationResponseSelectedExamplesItem) SetDocument ¶
func (s *CreateClassificationResponseSelectedExamplesItem) SetDocument(val OptInt)
SetDocument sets the value of Document.
func (*CreateClassificationResponseSelectedExamplesItem) SetLabel ¶
func (s *CreateClassificationResponseSelectedExamplesItem) SetLabel(val OptString)
SetLabel sets the value of Label.
func (*CreateClassificationResponseSelectedExamplesItem) SetText ¶
func (s *CreateClassificationResponseSelectedExamplesItem) SetText(val OptString)
SetText sets the value of Text.
func (*CreateClassificationResponseSelectedExamplesItem) UnmarshalJSON ¶
func (s *CreateClassificationResponseSelectedExamplesItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateCompletionRequest ¶
type CreateCompletionRequest struct { // ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see // all of your available models, or see our [Model overview](/docs/models/overview) for descriptions // of them. Model string `json:"model"` // The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, // or array of token arrays. // Note that <|endoftext|> is the document separator that the model sees during training, so if a // prompt is not specified the model will generate as if from the beginning of a new document. Prompt OptNilCreateCompletionRequestPrompt `json:"prompt"` // The suffix that comes after a completion of inserted text. Suffix OptNilString `json:"suffix"` // The maximum number of [tokens](/tokenizer) to generate in the completion. // The token count of your prompt plus `max_tokens` cannot exceed the model's context length. Most // models have a context length of 2048 tokens (except for the newest models, which support 4096). MaxTokens OptNilInt `json:"max_tokens"` // 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 completions to generate for each prompt. // **Note:** Because this parameter generates many completions, it can quickly consume your token // quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`. N OptNilInt `json:"n"` // Whether to stream back partial progress. If set, 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"` // Include the log probabilities on the `logprobs` most likely tokens, as well the chosen tokens. For // example, if `logprobs` is 5, the API will return a list of the 5 most likely tokens. The API will // always return the `logprob` of the sampled token, so there may be up to `logprobs+1` elements in // the response. // The maximum value for `logprobs` is 5. If you need more than this, please contact us through our // [Help center](https://help.openai.com) and describe your use case. Logprobs OptNilInt `json:"logprobs"` // Echo back the prompt in addition to the completion. Echo OptNilBool `json:"echo"` // Up to 4 sequences where the API will stop generating further tokens. The returned text will not // contain the stop sequence. Stop OptNilCreateCompletionRequestStop `json:"stop"` // 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"` // Generates `best_of` completions server-side and returns the "best" (the one with the highest log // probability per token). Results cannot be streamed. // When used with `n`, `best_of` controls the number of candidate completions and `n` specifies how // many to return – `best_of` must be greater than `n`. // **Note:** Because this parameter generates many completions, it can quickly consume your token // quota. Use carefully and ensure that you have reasonable settings for `max_tokens` and `stop`. BestOf OptNilInt `json:"best_of"` // Modify the likelihood of specified tokens appearing in the completion. // Accepts a json object that maps tokens (specified by their token ID in the GPT tokenizer) to an // associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) // (which works for both GPT-2 and GPT-3) to convert text to token IDs. 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. // As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being // generated. LogitBias OptCreateCompletionRequestLogitBias `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/CreateCompletionRequest
func (*CreateCompletionRequest) Decode ¶
func (s *CreateCompletionRequest) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionRequest from json.
func (*CreateCompletionRequest) Encode ¶
func (s *CreateCompletionRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateCompletionRequest) GetBestOf ¶
func (s *CreateCompletionRequest) GetBestOf() OptNilInt
GetBestOf returns the value of BestOf.
func (*CreateCompletionRequest) GetEcho ¶
func (s *CreateCompletionRequest) GetEcho() OptNilBool
GetEcho returns the value of Echo.
func (*CreateCompletionRequest) GetFrequencyPenalty ¶
func (s *CreateCompletionRequest) GetFrequencyPenalty() OptNilFloat64
GetFrequencyPenalty returns the value of FrequencyPenalty.
func (*CreateCompletionRequest) GetLogitBias ¶
func (s *CreateCompletionRequest) GetLogitBias() OptCreateCompletionRequestLogitBias
GetLogitBias returns the value of LogitBias.
func (*CreateCompletionRequest) GetLogprobs ¶
func (s *CreateCompletionRequest) GetLogprobs() OptNilInt
GetLogprobs returns the value of Logprobs.
func (*CreateCompletionRequest) GetMaxTokens ¶
func (s *CreateCompletionRequest) GetMaxTokens() OptNilInt
GetMaxTokens returns the value of MaxTokens.
func (*CreateCompletionRequest) GetModel ¶
func (s *CreateCompletionRequest) GetModel() string
GetModel returns the value of Model.
func (*CreateCompletionRequest) GetN ¶
func (s *CreateCompletionRequest) GetN() OptNilInt
GetN returns the value of N.
func (*CreateCompletionRequest) GetPresencePenalty ¶
func (s *CreateCompletionRequest) GetPresencePenalty() OptNilFloat64
GetPresencePenalty returns the value of PresencePenalty.
func (*CreateCompletionRequest) GetPrompt ¶
func (s *CreateCompletionRequest) GetPrompt() OptNilCreateCompletionRequestPrompt
GetPrompt returns the value of Prompt.
func (*CreateCompletionRequest) GetStop ¶
func (s *CreateCompletionRequest) GetStop() OptNilCreateCompletionRequestStop
GetStop returns the value of Stop.
func (*CreateCompletionRequest) GetStream ¶
func (s *CreateCompletionRequest) GetStream() OptNilBool
GetStream returns the value of Stream.
func (*CreateCompletionRequest) GetSuffix ¶
func (s *CreateCompletionRequest) GetSuffix() OptNilString
GetSuffix returns the value of Suffix.
func (*CreateCompletionRequest) GetTemperature ¶
func (s *CreateCompletionRequest) GetTemperature() OptNilFloat64
GetTemperature returns the value of Temperature.
func (*CreateCompletionRequest) GetTopP ¶
func (s *CreateCompletionRequest) GetTopP() OptNilFloat64
GetTopP returns the value of TopP.
func (*CreateCompletionRequest) GetUser ¶
func (s *CreateCompletionRequest) GetUser() OptString
GetUser returns the value of User.
func (*CreateCompletionRequest) MarshalJSON ¶
func (s *CreateCompletionRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCompletionRequest) SetBestOf ¶
func (s *CreateCompletionRequest) SetBestOf(val OptNilInt)
SetBestOf sets the value of BestOf.
func (*CreateCompletionRequest) SetEcho ¶
func (s *CreateCompletionRequest) SetEcho(val OptNilBool)
SetEcho sets the value of Echo.
func (*CreateCompletionRequest) SetFrequencyPenalty ¶
func (s *CreateCompletionRequest) SetFrequencyPenalty(val OptNilFloat64)
SetFrequencyPenalty sets the value of FrequencyPenalty.
func (*CreateCompletionRequest) SetLogitBias ¶
func (s *CreateCompletionRequest) SetLogitBias(val OptCreateCompletionRequestLogitBias)
SetLogitBias sets the value of LogitBias.
func (*CreateCompletionRequest) SetLogprobs ¶
func (s *CreateCompletionRequest) SetLogprobs(val OptNilInt)
SetLogprobs sets the value of Logprobs.
func (*CreateCompletionRequest) SetMaxTokens ¶
func (s *CreateCompletionRequest) SetMaxTokens(val OptNilInt)
SetMaxTokens sets the value of MaxTokens.
func (*CreateCompletionRequest) SetModel ¶
func (s *CreateCompletionRequest) SetModel(val string)
SetModel sets the value of Model.
func (*CreateCompletionRequest) SetN ¶
func (s *CreateCompletionRequest) SetN(val OptNilInt)
SetN sets the value of N.
func (*CreateCompletionRequest) SetPresencePenalty ¶
func (s *CreateCompletionRequest) SetPresencePenalty(val OptNilFloat64)
SetPresencePenalty sets the value of PresencePenalty.
func (*CreateCompletionRequest) SetPrompt ¶
func (s *CreateCompletionRequest) SetPrompt(val OptNilCreateCompletionRequestPrompt)
SetPrompt sets the value of Prompt.
func (*CreateCompletionRequest) SetStop ¶
func (s *CreateCompletionRequest) SetStop(val OptNilCreateCompletionRequestStop)
SetStop sets the value of Stop.
func (*CreateCompletionRequest) SetStream ¶
func (s *CreateCompletionRequest) SetStream(val OptNilBool)
SetStream sets the value of Stream.
func (*CreateCompletionRequest) SetSuffix ¶
func (s *CreateCompletionRequest) SetSuffix(val OptNilString)
SetSuffix sets the value of Suffix.
func (*CreateCompletionRequest) SetTemperature ¶
func (s *CreateCompletionRequest) SetTemperature(val OptNilFloat64)
SetTemperature sets the value of Temperature.
func (*CreateCompletionRequest) SetTopP ¶
func (s *CreateCompletionRequest) SetTopP(val OptNilFloat64)
SetTopP sets the value of TopP.
func (*CreateCompletionRequest) SetUser ¶
func (s *CreateCompletionRequest) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateCompletionRequest) UnmarshalJSON ¶
func (s *CreateCompletionRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateCompletionRequest) Validate ¶
func (s *CreateCompletionRequest) Validate() error
type CreateCompletionRequestLogitBias ¶
type CreateCompletionRequestLogitBias 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 GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) (which works for both GPT-2 and GPT-3) to convert text to token IDs. 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. As an example, you can pass `{"50256": -100}` to prevent the <|endoftext|> token from being generated.
func (*CreateCompletionRequestLogitBias) Decode ¶
func (s *CreateCompletionRequestLogitBias) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionRequestLogitBias from json.
func (*CreateCompletionRequestLogitBias) Encode ¶
func (s *CreateCompletionRequestLogitBias) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateCompletionRequestLogitBias) MarshalJSON ¶
func (s *CreateCompletionRequestLogitBias) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCompletionRequestLogitBias) UnmarshalJSON ¶
func (s *CreateCompletionRequestLogitBias) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateCompletionRequestPrompt ¶
type CreateCompletionRequestPrompt struct { Type CreateCompletionRequestPromptType // switch on this field String string StringArray []string }
The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays. Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document. CreateCompletionRequestPrompt represents sum type.
func NewStringArrayCreateCompletionRequestPrompt ¶
func NewStringArrayCreateCompletionRequestPrompt(v []string) CreateCompletionRequestPrompt
NewStringArrayCreateCompletionRequestPrompt returns new CreateCompletionRequestPrompt from []string.
func NewStringCreateCompletionRequestPrompt ¶
func NewStringCreateCompletionRequestPrompt(v string) CreateCompletionRequestPrompt
NewStringCreateCompletionRequestPrompt returns new CreateCompletionRequestPrompt from string.
func (*CreateCompletionRequestPrompt) Decode ¶
func (s *CreateCompletionRequestPrompt) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionRequestPrompt from json.
func (CreateCompletionRequestPrompt) Encode ¶
func (s CreateCompletionRequestPrompt) Encode(e *jx.Encoder)
Encode encodes CreateCompletionRequestPrompt as json.
func (CreateCompletionRequestPrompt) GetString ¶
func (s CreateCompletionRequestPrompt) GetString() (v string, ok bool)
GetString returns string and true boolean if CreateCompletionRequestPrompt is string.
func (CreateCompletionRequestPrompt) GetStringArray ¶
func (s CreateCompletionRequestPrompt) GetStringArray() (v []string, ok bool)
GetStringArray returns []string and true boolean if CreateCompletionRequestPrompt is []string.
func (CreateCompletionRequestPrompt) IsString ¶
func (s CreateCompletionRequestPrompt) IsString() bool
IsString reports whether CreateCompletionRequestPrompt is string.
func (CreateCompletionRequestPrompt) IsStringArray ¶
func (s CreateCompletionRequestPrompt) IsStringArray() bool
IsStringArray reports whether CreateCompletionRequestPrompt is []string.
func (CreateCompletionRequestPrompt) MarshalJSON ¶
func (s CreateCompletionRequestPrompt) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCompletionRequestPrompt) SetString ¶
func (s *CreateCompletionRequestPrompt) SetString(v string)
SetString sets CreateCompletionRequestPrompt to string.
func (*CreateCompletionRequestPrompt) SetStringArray ¶
func (s *CreateCompletionRequestPrompt) SetStringArray(v []string)
SetStringArray sets CreateCompletionRequestPrompt to []string.
func (*CreateCompletionRequestPrompt) UnmarshalJSON ¶
func (s *CreateCompletionRequestPrompt) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (CreateCompletionRequestPrompt) Validate ¶
func (s CreateCompletionRequestPrompt) Validate() error
type CreateCompletionRequestPromptType ¶
type CreateCompletionRequestPromptType string
CreateCompletionRequestPromptType is oneOf type of CreateCompletionRequestPrompt.
const ( StringCreateCompletionRequestPrompt CreateCompletionRequestPromptType = "string" StringArrayCreateCompletionRequestPrompt CreateCompletionRequestPromptType = "[]string" )
Possible values for CreateCompletionRequestPromptType.
type CreateCompletionRequestStop ¶
type CreateCompletionRequestStop struct { Type CreateCompletionRequestStopType // switch on this field Null struct{} String string StringArray []string }
Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. CreateCompletionRequestStop represents sum type.
func NewNullCreateCompletionRequestStop ¶
func NewNullCreateCompletionRequestStop(v struct{}) CreateCompletionRequestStop
NewNullCreateCompletionRequestStop returns new CreateCompletionRequestStop from struct{}.
func NewStringArrayCreateCompletionRequestStop ¶
func NewStringArrayCreateCompletionRequestStop(v []string) CreateCompletionRequestStop
NewStringArrayCreateCompletionRequestStop returns new CreateCompletionRequestStop from []string.
func NewStringCreateCompletionRequestStop ¶
func NewStringCreateCompletionRequestStop(v string) CreateCompletionRequestStop
NewStringCreateCompletionRequestStop returns new CreateCompletionRequestStop from string.
func (*CreateCompletionRequestStop) Decode ¶
func (s *CreateCompletionRequestStop) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionRequestStop from json.
func (CreateCompletionRequestStop) Encode ¶
func (s CreateCompletionRequestStop) Encode(e *jx.Encoder)
Encode encodes CreateCompletionRequestStop as json.
func (CreateCompletionRequestStop) GetNull ¶
func (s CreateCompletionRequestStop) GetNull() (v struct{}, ok bool)
GetNull returns struct{} and true boolean if CreateCompletionRequestStop is struct{}.
func (CreateCompletionRequestStop) GetString ¶
func (s CreateCompletionRequestStop) GetString() (v string, ok bool)
GetString returns string and true boolean if CreateCompletionRequestStop is string.
func (CreateCompletionRequestStop) GetStringArray ¶
func (s CreateCompletionRequestStop) GetStringArray() (v []string, ok bool)
GetStringArray returns []string and true boolean if CreateCompletionRequestStop is []string.
func (CreateCompletionRequestStop) IsNull ¶
func (s CreateCompletionRequestStop) IsNull() bool
IsNull reports whether CreateCompletionRequestStop is struct{}.
func (CreateCompletionRequestStop) IsString ¶
func (s CreateCompletionRequestStop) IsString() bool
IsString reports whether CreateCompletionRequestStop is string.
func (CreateCompletionRequestStop) IsStringArray ¶
func (s CreateCompletionRequestStop) IsStringArray() bool
IsStringArray reports whether CreateCompletionRequestStop is []string.
func (CreateCompletionRequestStop) MarshalJSON ¶
func (s CreateCompletionRequestStop) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCompletionRequestStop) SetNull ¶
func (s *CreateCompletionRequestStop) SetNull(v struct{})
SetNull sets CreateCompletionRequestStop to struct{}.
func (*CreateCompletionRequestStop) SetString ¶
func (s *CreateCompletionRequestStop) SetString(v string)
SetString sets CreateCompletionRequestStop to string.
func (*CreateCompletionRequestStop) SetStringArray ¶
func (s *CreateCompletionRequestStop) SetStringArray(v []string)
SetStringArray sets CreateCompletionRequestStop to []string.
func (*CreateCompletionRequestStop) UnmarshalJSON ¶
func (s *CreateCompletionRequestStop) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (CreateCompletionRequestStop) Validate ¶
func (s CreateCompletionRequestStop) Validate() error
type CreateCompletionRequestStopType ¶
type CreateCompletionRequestStopType string
CreateCompletionRequestStopType is oneOf type of CreateCompletionRequestStop.
const ( NullCreateCompletionRequestStop CreateCompletionRequestStopType = "struct{}" StringCreateCompletionRequestStop CreateCompletionRequestStopType = "string" StringArrayCreateCompletionRequestStop CreateCompletionRequestStopType = "[]string" )
Possible values for CreateCompletionRequestStopType.
type CreateCompletionResponse ¶
type CreateCompletionResponse struct { ID string `json:"id"` Object string `json:"object"` Created int `json:"created"` Model string `json:"model"` Choices []CreateCompletionResponseChoicesItem `json:"choices"` Usage OptCreateCompletionResponseUsage `json:"usage"` }
Ref: #/components/schemas/CreateCompletionResponse
func (*CreateCompletionResponse) Decode ¶
func (s *CreateCompletionResponse) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionResponse from json.
func (*CreateCompletionResponse) Encode ¶
func (s *CreateCompletionResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateCompletionResponse) GetChoices ¶
func (s *CreateCompletionResponse) GetChoices() []CreateCompletionResponseChoicesItem
GetChoices returns the value of Choices.
func (*CreateCompletionResponse) GetCreated ¶
func (s *CreateCompletionResponse) GetCreated() int
GetCreated returns the value of Created.
func (*CreateCompletionResponse) GetID ¶
func (s *CreateCompletionResponse) GetID() string
GetID returns the value of ID.
func (*CreateCompletionResponse) GetModel ¶
func (s *CreateCompletionResponse) GetModel() string
GetModel returns the value of Model.
func (*CreateCompletionResponse) GetObject ¶
func (s *CreateCompletionResponse) GetObject() string
GetObject returns the value of Object.
func (*CreateCompletionResponse) GetUsage ¶
func (s *CreateCompletionResponse) GetUsage() OptCreateCompletionResponseUsage
GetUsage returns the value of Usage.
func (*CreateCompletionResponse) MarshalJSON ¶
func (s *CreateCompletionResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCompletionResponse) SetChoices ¶
func (s *CreateCompletionResponse) SetChoices(val []CreateCompletionResponseChoicesItem)
SetChoices sets the value of Choices.
func (*CreateCompletionResponse) SetCreated ¶
func (s *CreateCompletionResponse) SetCreated(val int)
SetCreated sets the value of Created.
func (*CreateCompletionResponse) SetID ¶
func (s *CreateCompletionResponse) SetID(val string)
SetID sets the value of ID.
func (*CreateCompletionResponse) SetModel ¶
func (s *CreateCompletionResponse) SetModel(val string)
SetModel sets the value of Model.
func (*CreateCompletionResponse) SetObject ¶
func (s *CreateCompletionResponse) SetObject(val string)
SetObject sets the value of Object.
func (*CreateCompletionResponse) SetUsage ¶
func (s *CreateCompletionResponse) SetUsage(val OptCreateCompletionResponseUsage)
SetUsage sets the value of Usage.
func (*CreateCompletionResponse) UnmarshalJSON ¶
func (s *CreateCompletionResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateCompletionResponse) Validate ¶
func (s *CreateCompletionResponse) Validate() error
type CreateCompletionResponseChoicesItem ¶
type CreateCompletionResponseChoicesItem struct { Text OptString `json:"text"` Index OptInt `json:"index"` Logprobs OptNilCreateCompletionResponseChoicesItemLogprobs `json:"logprobs"` FinishReason OptString `json:"finish_reason"` }
func (*CreateCompletionResponseChoicesItem) Decode ¶
func (s *CreateCompletionResponseChoicesItem) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionResponseChoicesItem from json.
func (*CreateCompletionResponseChoicesItem) Encode ¶
func (s *CreateCompletionResponseChoicesItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateCompletionResponseChoicesItem) GetFinishReason ¶
func (s *CreateCompletionResponseChoicesItem) GetFinishReason() OptString
GetFinishReason returns the value of FinishReason.
func (*CreateCompletionResponseChoicesItem) GetIndex ¶
func (s *CreateCompletionResponseChoicesItem) GetIndex() OptInt
GetIndex returns the value of Index.
func (*CreateCompletionResponseChoicesItem) GetLogprobs ¶
func (s *CreateCompletionResponseChoicesItem) GetLogprobs() OptNilCreateCompletionResponseChoicesItemLogprobs
GetLogprobs returns the value of Logprobs.
func (*CreateCompletionResponseChoicesItem) GetText ¶
func (s *CreateCompletionResponseChoicesItem) GetText() OptString
GetText returns the value of Text.
func (*CreateCompletionResponseChoicesItem) MarshalJSON ¶
func (s *CreateCompletionResponseChoicesItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCompletionResponseChoicesItem) SetFinishReason ¶
func (s *CreateCompletionResponseChoicesItem) SetFinishReason(val OptString)
SetFinishReason sets the value of FinishReason.
func (*CreateCompletionResponseChoicesItem) SetIndex ¶
func (s *CreateCompletionResponseChoicesItem) SetIndex(val OptInt)
SetIndex sets the value of Index.
func (*CreateCompletionResponseChoicesItem) SetLogprobs ¶
func (s *CreateCompletionResponseChoicesItem) SetLogprobs(val OptNilCreateCompletionResponseChoicesItemLogprobs)
SetLogprobs sets the value of Logprobs.
func (*CreateCompletionResponseChoicesItem) SetText ¶
func (s *CreateCompletionResponseChoicesItem) SetText(val OptString)
SetText sets the value of Text.
func (*CreateCompletionResponseChoicesItem) UnmarshalJSON ¶
func (s *CreateCompletionResponseChoicesItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateCompletionResponseChoicesItem) Validate ¶
func (s *CreateCompletionResponseChoicesItem) Validate() error
type CreateCompletionResponseChoicesItemLogprobs ¶
type CreateCompletionResponseChoicesItemLogprobs struct { Tokens []string `json:"tokens"` TokenLogprobs []float64 `json:"token_logprobs"` TopLogprobs []CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem `json:"top_logprobs"` TextOffset []int `json:"text_offset"` }
func (*CreateCompletionResponseChoicesItemLogprobs) Decode ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionResponseChoicesItemLogprobs from json.
func (*CreateCompletionResponseChoicesItemLogprobs) Encode ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateCompletionResponseChoicesItemLogprobs) GetTextOffset ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) GetTextOffset() []int
GetTextOffset returns the value of TextOffset.
func (*CreateCompletionResponseChoicesItemLogprobs) GetTokenLogprobs ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) GetTokenLogprobs() []float64
GetTokenLogprobs returns the value of TokenLogprobs.
func (*CreateCompletionResponseChoicesItemLogprobs) GetTokens ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) GetTokens() []string
GetTokens returns the value of Tokens.
func (*CreateCompletionResponseChoicesItemLogprobs) GetTopLogprobs ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) GetTopLogprobs() []CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem
GetTopLogprobs returns the value of TopLogprobs.
func (*CreateCompletionResponseChoicesItemLogprobs) MarshalJSON ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCompletionResponseChoicesItemLogprobs) SetTextOffset ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) SetTextOffset(val []int)
SetTextOffset sets the value of TextOffset.
func (*CreateCompletionResponseChoicesItemLogprobs) SetTokenLogprobs ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) SetTokenLogprobs(val []float64)
SetTokenLogprobs sets the value of TokenLogprobs.
func (*CreateCompletionResponseChoicesItemLogprobs) SetTokens ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) SetTokens(val []string)
SetTokens sets the value of Tokens.
func (*CreateCompletionResponseChoicesItemLogprobs) SetTopLogprobs ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) SetTopLogprobs(val []CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem)
SetTopLogprobs sets the value of TopLogprobs.
func (*CreateCompletionResponseChoicesItemLogprobs) UnmarshalJSON ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateCompletionResponseChoicesItemLogprobs) Validate ¶
func (s *CreateCompletionResponseChoicesItemLogprobs) Validate() error
type CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem ¶
type CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem struct{}
func (*CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem) Decode ¶
func (s *CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem from json.
func (*CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem) Encode ¶
func (s *CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem) MarshalJSON ¶
func (s *CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem) UnmarshalJSON ¶
func (s *CreateCompletionResponseChoicesItemLogprobsTopLogprobsItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateCompletionResponseUsage ¶
type CreateCompletionResponseUsage struct { PromptTokens int `json:"prompt_tokens"` CompletionTokens int `json:"completion_tokens"` TotalTokens int `json:"total_tokens"` }
func (*CreateCompletionResponseUsage) Decode ¶
func (s *CreateCompletionResponseUsage) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionResponseUsage from json.
func (*CreateCompletionResponseUsage) Encode ¶
func (s *CreateCompletionResponseUsage) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateCompletionResponseUsage) GetCompletionTokens ¶
func (s *CreateCompletionResponseUsage) GetCompletionTokens() int
GetCompletionTokens returns the value of CompletionTokens.
func (*CreateCompletionResponseUsage) GetPromptTokens ¶
func (s *CreateCompletionResponseUsage) GetPromptTokens() int
GetPromptTokens returns the value of PromptTokens.
func (*CreateCompletionResponseUsage) GetTotalTokens ¶
func (s *CreateCompletionResponseUsage) GetTotalTokens() int
GetTotalTokens returns the value of TotalTokens.
func (*CreateCompletionResponseUsage) MarshalJSON ¶
func (s *CreateCompletionResponseUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateCompletionResponseUsage) SetCompletionTokens ¶
func (s *CreateCompletionResponseUsage) SetCompletionTokens(val int)
SetCompletionTokens sets the value of CompletionTokens.
func (*CreateCompletionResponseUsage) SetPromptTokens ¶
func (s *CreateCompletionResponseUsage) SetPromptTokens(val int)
SetPromptTokens sets the value of PromptTokens.
func (*CreateCompletionResponseUsage) SetTotalTokens ¶
func (s *CreateCompletionResponseUsage) SetTotalTokens(val int)
SetTotalTokens sets the value of TotalTokens.
func (*CreateCompletionResponseUsage) UnmarshalJSON ¶
func (s *CreateCompletionResponseUsage) 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 CreateEmbeddingRequest ¶
type CreateEmbeddingRequest struct { // ID of the model to use. You can use the [List models](/docs/api-reference/models/list) API to see // all of your available models, or see our [Model overview](/docs/models/overview) for descriptions // of them. Model string `json:"model"` // Input text to get embeddings for, encoded as a string or array of tokens. To get embeddings for // multiple inputs in a single request, pass an array of strings or array of token arrays. Each input // must not exceed 8192 tokens in length. Input CreateEmbeddingRequestInput `json:"input"` // 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/CreateEmbeddingRequest
func (*CreateEmbeddingRequest) Decode ¶
func (s *CreateEmbeddingRequest) Decode(d *jx.Decoder) error
Decode decodes CreateEmbeddingRequest from json.
func (*CreateEmbeddingRequest) Encode ¶
func (s *CreateEmbeddingRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateEmbeddingRequest) GetInput ¶
func (s *CreateEmbeddingRequest) GetInput() CreateEmbeddingRequestInput
GetInput returns the value of Input.
func (*CreateEmbeddingRequest) GetModel ¶
func (s *CreateEmbeddingRequest) GetModel() string
GetModel returns the value of Model.
func (*CreateEmbeddingRequest) GetUser ¶
func (s *CreateEmbeddingRequest) GetUser() OptString
GetUser returns the value of User.
func (*CreateEmbeddingRequest) MarshalJSON ¶
func (s *CreateEmbeddingRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateEmbeddingRequest) SetInput ¶
func (s *CreateEmbeddingRequest) SetInput(val CreateEmbeddingRequestInput)
SetInput sets the value of Input.
func (*CreateEmbeddingRequest) SetModel ¶
func (s *CreateEmbeddingRequest) SetModel(val string)
SetModel sets the value of Model.
func (*CreateEmbeddingRequest) SetUser ¶
func (s *CreateEmbeddingRequest) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateEmbeddingRequest) UnmarshalJSON ¶
func (s *CreateEmbeddingRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateEmbeddingRequest) Validate ¶
func (s *CreateEmbeddingRequest) Validate() error
type CreateEmbeddingRequestInput ¶
type CreateEmbeddingRequestInput struct { Type CreateEmbeddingRequestInputType // switch on this field String string StringArray []string }
Input text to get embeddings for, encoded as a string or array of tokens. To get embeddings for multiple inputs in a single request, pass an array of strings or array of token arrays. Each input must not exceed 8192 tokens in length. CreateEmbeddingRequestInput represents sum type.
func NewStringArrayCreateEmbeddingRequestInput ¶
func NewStringArrayCreateEmbeddingRequestInput(v []string) CreateEmbeddingRequestInput
NewStringArrayCreateEmbeddingRequestInput returns new CreateEmbeddingRequestInput from []string.
func NewStringCreateEmbeddingRequestInput ¶
func NewStringCreateEmbeddingRequestInput(v string) CreateEmbeddingRequestInput
NewStringCreateEmbeddingRequestInput returns new CreateEmbeddingRequestInput from string.
func (*CreateEmbeddingRequestInput) Decode ¶
func (s *CreateEmbeddingRequestInput) Decode(d *jx.Decoder) error
Decode decodes CreateEmbeddingRequestInput from json.
func (CreateEmbeddingRequestInput) Encode ¶
func (s CreateEmbeddingRequestInput) Encode(e *jx.Encoder)
Encode encodes CreateEmbeddingRequestInput as json.
func (CreateEmbeddingRequestInput) GetString ¶
func (s CreateEmbeddingRequestInput) GetString() (v string, ok bool)
GetString returns string and true boolean if CreateEmbeddingRequestInput is string.
func (CreateEmbeddingRequestInput) GetStringArray ¶
func (s CreateEmbeddingRequestInput) GetStringArray() (v []string, ok bool)
GetStringArray returns []string and true boolean if CreateEmbeddingRequestInput is []string.
func (CreateEmbeddingRequestInput) IsString ¶
func (s CreateEmbeddingRequestInput) IsString() bool
IsString reports whether CreateEmbeddingRequestInput is string.
func (CreateEmbeddingRequestInput) IsStringArray ¶
func (s CreateEmbeddingRequestInput) IsStringArray() bool
IsStringArray reports whether CreateEmbeddingRequestInput is []string.
func (CreateEmbeddingRequestInput) MarshalJSON ¶
func (s CreateEmbeddingRequestInput) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateEmbeddingRequestInput) SetString ¶
func (s *CreateEmbeddingRequestInput) SetString(v string)
SetString sets CreateEmbeddingRequestInput to string.
func (*CreateEmbeddingRequestInput) SetStringArray ¶
func (s *CreateEmbeddingRequestInput) SetStringArray(v []string)
SetStringArray sets CreateEmbeddingRequestInput to []string.
func (*CreateEmbeddingRequestInput) UnmarshalJSON ¶
func (s *CreateEmbeddingRequestInput) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (CreateEmbeddingRequestInput) Validate ¶
func (s CreateEmbeddingRequestInput) Validate() error
type CreateEmbeddingRequestInputType ¶
type CreateEmbeddingRequestInputType string
CreateEmbeddingRequestInputType is oneOf type of CreateEmbeddingRequestInput.
const ( StringCreateEmbeddingRequestInput CreateEmbeddingRequestInputType = "string" StringArrayCreateEmbeddingRequestInput CreateEmbeddingRequestInputType = "[]string" )
Possible values for CreateEmbeddingRequestInputType.
type CreateEmbeddingResponse ¶
type CreateEmbeddingResponse struct { Object string `json:"object"` Model string `json:"model"` Data []CreateEmbeddingResponseDataItem `json:"data"` Usage CreateEmbeddingResponseUsage `json:"usage"` }
Ref: #/components/schemas/CreateEmbeddingResponse
func (*CreateEmbeddingResponse) Decode ¶
func (s *CreateEmbeddingResponse) Decode(d *jx.Decoder) error
Decode decodes CreateEmbeddingResponse from json.
func (*CreateEmbeddingResponse) Encode ¶
func (s *CreateEmbeddingResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateEmbeddingResponse) GetData ¶
func (s *CreateEmbeddingResponse) GetData() []CreateEmbeddingResponseDataItem
GetData returns the value of Data.
func (*CreateEmbeddingResponse) GetModel ¶
func (s *CreateEmbeddingResponse) GetModel() string
GetModel returns the value of Model.
func (*CreateEmbeddingResponse) GetObject ¶
func (s *CreateEmbeddingResponse) GetObject() string
GetObject returns the value of Object.
func (*CreateEmbeddingResponse) GetUsage ¶
func (s *CreateEmbeddingResponse) GetUsage() CreateEmbeddingResponseUsage
GetUsage returns the value of Usage.
func (*CreateEmbeddingResponse) MarshalJSON ¶
func (s *CreateEmbeddingResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateEmbeddingResponse) SetData ¶
func (s *CreateEmbeddingResponse) SetData(val []CreateEmbeddingResponseDataItem)
SetData sets the value of Data.
func (*CreateEmbeddingResponse) SetModel ¶
func (s *CreateEmbeddingResponse) SetModel(val string)
SetModel sets the value of Model.
func (*CreateEmbeddingResponse) SetObject ¶
func (s *CreateEmbeddingResponse) SetObject(val string)
SetObject sets the value of Object.
func (*CreateEmbeddingResponse) SetUsage ¶
func (s *CreateEmbeddingResponse) SetUsage(val CreateEmbeddingResponseUsage)
SetUsage sets the value of Usage.
func (*CreateEmbeddingResponse) UnmarshalJSON ¶
func (s *CreateEmbeddingResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateEmbeddingResponse) Validate ¶
func (s *CreateEmbeddingResponse) Validate() error
type CreateEmbeddingResponseDataItem ¶
type CreateEmbeddingResponseDataItem struct { Index int `json:"index"` Object string `json:"object"` Embedding []float64 `json:"embedding"` }
func (*CreateEmbeddingResponseDataItem) Decode ¶
func (s *CreateEmbeddingResponseDataItem) Decode(d *jx.Decoder) error
Decode decodes CreateEmbeddingResponseDataItem from json.
func (*CreateEmbeddingResponseDataItem) Encode ¶
func (s *CreateEmbeddingResponseDataItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateEmbeddingResponseDataItem) GetEmbedding ¶
func (s *CreateEmbeddingResponseDataItem) GetEmbedding() []float64
GetEmbedding returns the value of Embedding.
func (*CreateEmbeddingResponseDataItem) GetIndex ¶
func (s *CreateEmbeddingResponseDataItem) GetIndex() int
GetIndex returns the value of Index.
func (*CreateEmbeddingResponseDataItem) GetObject ¶
func (s *CreateEmbeddingResponseDataItem) GetObject() string
GetObject returns the value of Object.
func (*CreateEmbeddingResponseDataItem) MarshalJSON ¶
func (s *CreateEmbeddingResponseDataItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateEmbeddingResponseDataItem) SetEmbedding ¶
func (s *CreateEmbeddingResponseDataItem) SetEmbedding(val []float64)
SetEmbedding sets the value of Embedding.
func (*CreateEmbeddingResponseDataItem) SetIndex ¶
func (s *CreateEmbeddingResponseDataItem) SetIndex(val int)
SetIndex sets the value of Index.
func (*CreateEmbeddingResponseDataItem) SetObject ¶
func (s *CreateEmbeddingResponseDataItem) SetObject(val string)
SetObject sets the value of Object.
func (*CreateEmbeddingResponseDataItem) UnmarshalJSON ¶
func (s *CreateEmbeddingResponseDataItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateEmbeddingResponseDataItem) Validate ¶
func (s *CreateEmbeddingResponseDataItem) Validate() error
type CreateEmbeddingResponseUsage ¶
type CreateEmbeddingResponseUsage struct { PromptTokens int `json:"prompt_tokens"` TotalTokens int `json:"total_tokens"` }
func (*CreateEmbeddingResponseUsage) Decode ¶
func (s *CreateEmbeddingResponseUsage) Decode(d *jx.Decoder) error
Decode decodes CreateEmbeddingResponseUsage from json.
func (*CreateEmbeddingResponseUsage) Encode ¶
func (s *CreateEmbeddingResponseUsage) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateEmbeddingResponseUsage) GetPromptTokens ¶
func (s *CreateEmbeddingResponseUsage) GetPromptTokens() int
GetPromptTokens returns the value of PromptTokens.
func (*CreateEmbeddingResponseUsage) GetTotalTokens ¶
func (s *CreateEmbeddingResponseUsage) GetTotalTokens() int
GetTotalTokens returns the value of TotalTokens.
func (*CreateEmbeddingResponseUsage) MarshalJSON ¶
func (s *CreateEmbeddingResponseUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateEmbeddingResponseUsage) SetPromptTokens ¶
func (s *CreateEmbeddingResponseUsage) SetPromptTokens(val int)
SetPromptTokens sets the value of PromptTokens.
func (*CreateEmbeddingResponseUsage) SetTotalTokens ¶
func (s *CreateEmbeddingResponseUsage) SetTotalTokens(val int)
SetTotalTokens sets the value of TotalTokens.
func (*CreateEmbeddingResponseUsage) UnmarshalJSON ¶
func (s *CreateEmbeddingResponseUsage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateFileRequestMultipart ¶
type CreateFileRequestMultipart struct { // Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. // If the `purpose` is set to "fine-tune", each line is a JSON record with "prompt" and "completion" // fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data). File ht.MultipartFile `json:"file"` // The intended purpose of the uploaded documents. // Use "fine-tune" for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the // format of the uploaded file. Purpose string `json:"purpose"` }
Ref: #/components/schemas/CreateFileRequest
func (*CreateFileRequestMultipart) GetFile ¶
func (s *CreateFileRequestMultipart) GetFile() ht.MultipartFile
GetFile returns the value of File.
func (*CreateFileRequestMultipart) GetPurpose ¶
func (s *CreateFileRequestMultipart) GetPurpose() string
GetPurpose returns the value of Purpose.
func (*CreateFileRequestMultipart) SetFile ¶
func (s *CreateFileRequestMultipart) SetFile(val ht.MultipartFile)
SetFile sets the value of File.
func (*CreateFileRequestMultipart) SetPurpose ¶
func (s *CreateFileRequestMultipart) SetPurpose(val string)
SetPurpose sets the value of Purpose.
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 CreateImageEditRequestMultipart ¶
type CreateImageEditRequestMultipart 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 OptNilCreateImageEditRequestMultipartSize `json:"size"` // The format in which the generated images are returned. Must be one of `url` or `b64_json`. ResponseFormat OptNilCreateImageEditRequestMultipartResponseFormat `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 (*CreateImageEditRequestMultipart) GetImage ¶
func (s *CreateImageEditRequestMultipart) GetImage() ht.MultipartFile
GetImage returns the value of Image.
func (*CreateImageEditRequestMultipart) GetMask ¶
func (s *CreateImageEditRequestMultipart) GetMask() OptMultipartFile
GetMask returns the value of Mask.
func (*CreateImageEditRequestMultipart) GetN ¶
func (s *CreateImageEditRequestMultipart) GetN() OptNilInt
GetN returns the value of N.
func (*CreateImageEditRequestMultipart) GetPrompt ¶
func (s *CreateImageEditRequestMultipart) GetPrompt() string
GetPrompt returns the value of Prompt.
func (*CreateImageEditRequestMultipart) GetResponseFormat ¶
func (s *CreateImageEditRequestMultipart) GetResponseFormat() OptNilCreateImageEditRequestMultipartResponseFormat
GetResponseFormat returns the value of ResponseFormat.
func (*CreateImageEditRequestMultipart) GetSize ¶
func (s *CreateImageEditRequestMultipart) GetSize() OptNilCreateImageEditRequestMultipartSize
GetSize returns the value of Size.
func (*CreateImageEditRequestMultipart) GetUser ¶
func (s *CreateImageEditRequestMultipart) GetUser() OptString
GetUser returns the value of User.
func (*CreateImageEditRequestMultipart) SetImage ¶
func (s *CreateImageEditRequestMultipart) SetImage(val ht.MultipartFile)
SetImage sets the value of Image.
func (*CreateImageEditRequestMultipart) SetMask ¶
func (s *CreateImageEditRequestMultipart) SetMask(val OptMultipartFile)
SetMask sets the value of Mask.
func (*CreateImageEditRequestMultipart) SetN ¶
func (s *CreateImageEditRequestMultipart) SetN(val OptNilInt)
SetN sets the value of N.
func (*CreateImageEditRequestMultipart) SetPrompt ¶
func (s *CreateImageEditRequestMultipart) SetPrompt(val string)
SetPrompt sets the value of Prompt.
func (*CreateImageEditRequestMultipart) SetResponseFormat ¶
func (s *CreateImageEditRequestMultipart) SetResponseFormat(val OptNilCreateImageEditRequestMultipartResponseFormat)
SetResponseFormat sets the value of ResponseFormat.
func (*CreateImageEditRequestMultipart) SetSize ¶
func (s *CreateImageEditRequestMultipart) SetSize(val OptNilCreateImageEditRequestMultipartSize)
SetSize sets the value of Size.
func (*CreateImageEditRequestMultipart) SetUser ¶
func (s *CreateImageEditRequestMultipart) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateImageEditRequestMultipart) Validate ¶
func (s *CreateImageEditRequestMultipart) Validate() error
type CreateImageEditRequestMultipartResponseFormat ¶
type CreateImageEditRequestMultipartResponseFormat string
The format in which the generated images are returned. Must be one of `url` or `b64_json`.
const ( CreateImageEditRequestMultipartResponseFormatURL CreateImageEditRequestMultipartResponseFormat = "url" CreateImageEditRequestMultipartResponseFormatB64JSON CreateImageEditRequestMultipartResponseFormat = "b64_json" )
func (CreateImageEditRequestMultipartResponseFormat) AllValues ¶
func (CreateImageEditRequestMultipartResponseFormat) AllValues() []CreateImageEditRequestMultipartResponseFormat
AllValues returns all CreateImageEditRequestMultipartResponseFormat values.
func (CreateImageEditRequestMultipartResponseFormat) MarshalText ¶
func (s CreateImageEditRequestMultipartResponseFormat) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateImageEditRequestMultipartResponseFormat) UnmarshalText ¶
func (s *CreateImageEditRequestMultipartResponseFormat) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateImageEditRequestMultipartResponseFormat) Validate ¶
func (s CreateImageEditRequestMultipartResponseFormat) Validate() error
type CreateImageEditRequestMultipartSize ¶
type CreateImageEditRequestMultipartSize string
The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
const ( CreateImageEditRequestMultipartSize256x256 CreateImageEditRequestMultipartSize = "256x256" CreateImageEditRequestMultipartSize512x512 CreateImageEditRequestMultipartSize = "512x512" CreateImageEditRequestMultipartSize1024x1024 CreateImageEditRequestMultipartSize = "1024x1024" )
func (CreateImageEditRequestMultipartSize) AllValues ¶
func (CreateImageEditRequestMultipartSize) AllValues() []CreateImageEditRequestMultipartSize
AllValues returns all CreateImageEditRequestMultipartSize values.
func (CreateImageEditRequestMultipartSize) MarshalText ¶
func (s CreateImageEditRequestMultipartSize) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateImageEditRequestMultipartSize) UnmarshalText ¶
func (s *CreateImageEditRequestMultipartSize) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateImageEditRequestMultipartSize) Validate ¶
func (s CreateImageEditRequestMultipartSize) 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) AllValues ¶
func (CreateImageRequestResponseFormat) AllValues() []CreateImageRequestResponseFormat
AllValues returns all CreateImageRequestResponseFormat values.
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) AllValues ¶
func (CreateImageRequestSize) AllValues() []CreateImageRequestSize
AllValues returns all CreateImageRequestSize values.
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 CreateImageVariationRequestMultipart ¶
type CreateImageVariationRequestMultipart 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 OptNilCreateImageVariationRequestMultipartSize `json:"size"` // The format in which the generated images are returned. Must be one of `url` or `b64_json`. ResponseFormat OptNilCreateImageVariationRequestMultipartResponseFormat `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 (*CreateImageVariationRequestMultipart) GetImage ¶
func (s *CreateImageVariationRequestMultipart) GetImage() ht.MultipartFile
GetImage returns the value of Image.
func (*CreateImageVariationRequestMultipart) GetN ¶
func (s *CreateImageVariationRequestMultipart) GetN() OptNilInt
GetN returns the value of N.
func (*CreateImageVariationRequestMultipart) GetResponseFormat ¶
func (s *CreateImageVariationRequestMultipart) GetResponseFormat() OptNilCreateImageVariationRequestMultipartResponseFormat
GetResponseFormat returns the value of ResponseFormat.
func (*CreateImageVariationRequestMultipart) GetSize ¶
func (s *CreateImageVariationRequestMultipart) GetSize() OptNilCreateImageVariationRequestMultipartSize
GetSize returns the value of Size.
func (*CreateImageVariationRequestMultipart) GetUser ¶
func (s *CreateImageVariationRequestMultipart) GetUser() OptString
GetUser returns the value of User.
func (*CreateImageVariationRequestMultipart) SetImage ¶
func (s *CreateImageVariationRequestMultipart) SetImage(val ht.MultipartFile)
SetImage sets the value of Image.
func (*CreateImageVariationRequestMultipart) SetN ¶
func (s *CreateImageVariationRequestMultipart) SetN(val OptNilInt)
SetN sets the value of N.
func (*CreateImageVariationRequestMultipart) SetResponseFormat ¶
func (s *CreateImageVariationRequestMultipart) SetResponseFormat(val OptNilCreateImageVariationRequestMultipartResponseFormat)
SetResponseFormat sets the value of ResponseFormat.
func (*CreateImageVariationRequestMultipart) SetSize ¶
func (s *CreateImageVariationRequestMultipart) SetSize(val OptNilCreateImageVariationRequestMultipartSize)
SetSize sets the value of Size.
func (*CreateImageVariationRequestMultipart) SetUser ¶
func (s *CreateImageVariationRequestMultipart) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateImageVariationRequestMultipart) Validate ¶
func (s *CreateImageVariationRequestMultipart) Validate() error
type CreateImageVariationRequestMultipartResponseFormat ¶
type CreateImageVariationRequestMultipartResponseFormat string
The format in which the generated images are returned. Must be one of `url` or `b64_json`.
const ( CreateImageVariationRequestMultipartResponseFormatURL CreateImageVariationRequestMultipartResponseFormat = "url" CreateImageVariationRequestMultipartResponseFormatB64JSON CreateImageVariationRequestMultipartResponseFormat = "b64_json" )
func (CreateImageVariationRequestMultipartResponseFormat) AllValues ¶
func (CreateImageVariationRequestMultipartResponseFormat) AllValues() []CreateImageVariationRequestMultipartResponseFormat
AllValues returns all CreateImageVariationRequestMultipartResponseFormat values.
func (CreateImageVariationRequestMultipartResponseFormat) MarshalText ¶
func (s CreateImageVariationRequestMultipartResponseFormat) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateImageVariationRequestMultipartResponseFormat) UnmarshalText ¶
func (s *CreateImageVariationRequestMultipartResponseFormat) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateImageVariationRequestMultipartResponseFormat) Validate ¶
func (s CreateImageVariationRequestMultipartResponseFormat) Validate() error
type CreateImageVariationRequestMultipartSize ¶
type CreateImageVariationRequestMultipartSize string
The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
const ( CreateImageVariationRequestMultipartSize256x256 CreateImageVariationRequestMultipartSize = "256x256" CreateImageVariationRequestMultipartSize512x512 CreateImageVariationRequestMultipartSize = "512x512" CreateImageVariationRequestMultipartSize1024x1024 CreateImageVariationRequestMultipartSize = "1024x1024" )
func (CreateImageVariationRequestMultipartSize) AllValues ¶
func (CreateImageVariationRequestMultipartSize) AllValues() []CreateImageVariationRequestMultipartSize
AllValues returns all CreateImageVariationRequestMultipartSize values.
func (CreateImageVariationRequestMultipartSize) MarshalText ¶
func (s CreateImageVariationRequestMultipartSize) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CreateImageVariationRequestMultipartSize) UnmarshalText ¶
func (s *CreateImageVariationRequestMultipartSize) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CreateImageVariationRequestMultipartSize) Validate ¶
func (s CreateImageVariationRequestMultipartSize) 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 CreateSearchParams ¶
type CreateSearchParams struct { // The ID of the engine to use for this request. You can select one of `ada`, `babbage`, `curie`, or // `davinci`. EngineID string }
CreateSearchParams is parameters of createSearch operation.
type CreateSearchRequest ¶
type CreateSearchRequest struct { // Query to search against the documents. Query string `json:"query"` // Up to 200 documents to search over, provided as a list of strings. // The maximum document length (in tokens) is 2034 minus the number of tokens in the query. // You should specify either `documents` or a `file`, but not both. Documents OptNilStringArray `json:"documents"` // The ID of an uploaded file that contains documents to search over. // You should specify either `documents` or a `file`, but not both. File OptNilString `json:"file"` // The maximum number of documents to be re-ranked and returned by search. // This flag only takes effect when `file` is set. MaxRerank OptNilInt `json:"max_rerank"` // A special boolean flag for showing metadata. If set to `true`, each document entry in the returned // JSON will contain a "metadata" field. // This flag only takes effect when `file` is set. ReturnMetadata OptNilBool `json:"return_metadata"` // 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/CreateSearchRequest
func (*CreateSearchRequest) Decode ¶
func (s *CreateSearchRequest) Decode(d *jx.Decoder) error
Decode decodes CreateSearchRequest from json.
func (*CreateSearchRequest) Encode ¶
func (s *CreateSearchRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateSearchRequest) GetDocuments ¶
func (s *CreateSearchRequest) GetDocuments() OptNilStringArray
GetDocuments returns the value of Documents.
func (*CreateSearchRequest) GetFile ¶
func (s *CreateSearchRequest) GetFile() OptNilString
GetFile returns the value of File.
func (*CreateSearchRequest) GetMaxRerank ¶
func (s *CreateSearchRequest) GetMaxRerank() OptNilInt
GetMaxRerank returns the value of MaxRerank.
func (*CreateSearchRequest) GetQuery ¶
func (s *CreateSearchRequest) GetQuery() string
GetQuery returns the value of Query.
func (*CreateSearchRequest) GetReturnMetadata ¶
func (s *CreateSearchRequest) GetReturnMetadata() OptNilBool
GetReturnMetadata returns the value of ReturnMetadata.
func (*CreateSearchRequest) GetUser ¶
func (s *CreateSearchRequest) GetUser() OptString
GetUser returns the value of User.
func (*CreateSearchRequest) MarshalJSON ¶
func (s *CreateSearchRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateSearchRequest) SetDocuments ¶
func (s *CreateSearchRequest) SetDocuments(val OptNilStringArray)
SetDocuments sets the value of Documents.
func (*CreateSearchRequest) SetFile ¶
func (s *CreateSearchRequest) SetFile(val OptNilString)
SetFile sets the value of File.
func (*CreateSearchRequest) SetMaxRerank ¶
func (s *CreateSearchRequest) SetMaxRerank(val OptNilInt)
SetMaxRerank sets the value of MaxRerank.
func (*CreateSearchRequest) SetQuery ¶
func (s *CreateSearchRequest) SetQuery(val string)
SetQuery sets the value of Query.
func (*CreateSearchRequest) SetReturnMetadata ¶
func (s *CreateSearchRequest) SetReturnMetadata(val OptNilBool)
SetReturnMetadata sets the value of ReturnMetadata.
func (*CreateSearchRequest) SetUser ¶
func (s *CreateSearchRequest) SetUser(val OptString)
SetUser sets the value of User.
func (*CreateSearchRequest) UnmarshalJSON ¶
func (s *CreateSearchRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateSearchRequest) Validate ¶
func (s *CreateSearchRequest) Validate() error
type CreateSearchResponse ¶
type CreateSearchResponse struct { Object OptString `json:"object"` Model OptString `json:"model"` Data []CreateSearchResponseDataItem `json:"data"` }
Ref: #/components/schemas/CreateSearchResponse
func (*CreateSearchResponse) Decode ¶
func (s *CreateSearchResponse) Decode(d *jx.Decoder) error
Decode decodes CreateSearchResponse from json.
func (*CreateSearchResponse) Encode ¶
func (s *CreateSearchResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateSearchResponse) GetData ¶
func (s *CreateSearchResponse) GetData() []CreateSearchResponseDataItem
GetData returns the value of Data.
func (*CreateSearchResponse) GetModel ¶
func (s *CreateSearchResponse) GetModel() OptString
GetModel returns the value of Model.
func (*CreateSearchResponse) GetObject ¶
func (s *CreateSearchResponse) GetObject() OptString
GetObject returns the value of Object.
func (*CreateSearchResponse) MarshalJSON ¶
func (s *CreateSearchResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateSearchResponse) SetData ¶
func (s *CreateSearchResponse) SetData(val []CreateSearchResponseDataItem)
SetData sets the value of Data.
func (*CreateSearchResponse) SetModel ¶
func (s *CreateSearchResponse) SetModel(val OptString)
SetModel sets the value of Model.
func (*CreateSearchResponse) SetObject ¶
func (s *CreateSearchResponse) SetObject(val OptString)
SetObject sets the value of Object.
func (*CreateSearchResponse) UnmarshalJSON ¶
func (s *CreateSearchResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateSearchResponse) Validate ¶
func (s *CreateSearchResponse) Validate() error
type CreateSearchResponseDataItem ¶
type CreateSearchResponseDataItem struct { Object OptString `json:"object"` Document OptInt `json:"document"` Score OptFloat64 `json:"score"` }
func (*CreateSearchResponseDataItem) Decode ¶
func (s *CreateSearchResponseDataItem) Decode(d *jx.Decoder) error
Decode decodes CreateSearchResponseDataItem from json.
func (*CreateSearchResponseDataItem) Encode ¶
func (s *CreateSearchResponseDataItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateSearchResponseDataItem) GetDocument ¶
func (s *CreateSearchResponseDataItem) GetDocument() OptInt
GetDocument returns the value of Document.
func (*CreateSearchResponseDataItem) GetObject ¶
func (s *CreateSearchResponseDataItem) GetObject() OptString
GetObject returns the value of Object.
func (*CreateSearchResponseDataItem) GetScore ¶
func (s *CreateSearchResponseDataItem) GetScore() OptFloat64
GetScore returns the value of Score.
func (*CreateSearchResponseDataItem) MarshalJSON ¶
func (s *CreateSearchResponseDataItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateSearchResponseDataItem) SetDocument ¶
func (s *CreateSearchResponseDataItem) SetDocument(val OptInt)
SetDocument sets the value of Document.
func (*CreateSearchResponseDataItem) SetObject ¶
func (s *CreateSearchResponseDataItem) SetObject(val OptString)
SetObject sets the value of Object.
func (*CreateSearchResponseDataItem) SetScore ¶
func (s *CreateSearchResponseDataItem) SetScore(val OptFloat64)
SetScore sets the value of Score.
func (*CreateSearchResponseDataItem) UnmarshalJSON ¶
func (s *CreateSearchResponseDataItem) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CreateSearchResponseDataItem) Validate ¶
func (s *CreateSearchResponseDataItem) Validate() error
type CreateTranscriptionRequestMultipart ¶
type CreateTranscriptionRequestMultipart struct { // The audio file to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm. File ht.MultipartFile `json:"file"` // ID of the model to use. Only `whisper-1` is currently available. Model string `json:"model"` // An optional text to guide the model's style or continue a previous audio segment. The // [prompt](/docs/guides/speech-to-text/prompting) should match the audio language. Prompt OptString `json:"prompt"` // The format of the transcript output, in one of these options: json, text, srt, verbose_json, or // vtt. ResponseFormat OptString `json:"response_format"` // The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, // while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model // will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically // increase the temperature until certain thresholds are hit. Temperature OptFloat64 `json:"temperature"` // The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia. // org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency. Language OptString `json:"language"` }
Ref: #/components/schemas/CreateTranscriptionRequest
func (*CreateTranscriptionRequestMultipart) GetFile ¶
func (s *CreateTranscriptionRequestMultipart) GetFile() ht.MultipartFile
GetFile returns the value of File.
func (*CreateTranscriptionRequestMultipart) GetLanguage ¶
func (s *CreateTranscriptionRequestMultipart) GetLanguage() OptString
GetLanguage returns the value of Language.
func (*CreateTranscriptionRequestMultipart) GetModel ¶
func (s *CreateTranscriptionRequestMultipart) GetModel() string
GetModel returns the value of Model.
func (*CreateTranscriptionRequestMultipart) GetPrompt ¶
func (s *CreateTranscriptionRequestMultipart) GetPrompt() OptString
GetPrompt returns the value of Prompt.
func (*CreateTranscriptionRequestMultipart) GetResponseFormat ¶
func (s *CreateTranscriptionRequestMultipart) GetResponseFormat() OptString
GetResponseFormat returns the value of ResponseFormat.
func (*CreateTranscriptionRequestMultipart) GetTemperature ¶
func (s *CreateTranscriptionRequestMultipart) GetTemperature() OptFloat64
GetTemperature returns the value of Temperature.
func (*CreateTranscriptionRequestMultipart) SetFile ¶
func (s *CreateTranscriptionRequestMultipart) SetFile(val ht.MultipartFile)
SetFile sets the value of File.
func (*CreateTranscriptionRequestMultipart) SetLanguage ¶
func (s *CreateTranscriptionRequestMultipart) SetLanguage(val OptString)
SetLanguage sets the value of Language.
func (*CreateTranscriptionRequestMultipart) SetModel ¶
func (s *CreateTranscriptionRequestMultipart) SetModel(val string)
SetModel sets the value of Model.
func (*CreateTranscriptionRequestMultipart) SetPrompt ¶
func (s *CreateTranscriptionRequestMultipart) SetPrompt(val OptString)
SetPrompt sets the value of Prompt.
func (*CreateTranscriptionRequestMultipart) SetResponseFormat ¶
func (s *CreateTranscriptionRequestMultipart) SetResponseFormat(val OptString)
SetResponseFormat sets the value of ResponseFormat.
func (*CreateTranscriptionRequestMultipart) SetTemperature ¶
func (s *CreateTranscriptionRequestMultipart) SetTemperature(val OptFloat64)
SetTemperature sets the value of Temperature.
func (*CreateTranscriptionRequestMultipart) Validate ¶
func (s *CreateTranscriptionRequestMultipart) Validate() error
type CreateTranscriptionResponse ¶
type CreateTranscriptionResponse struct {
Text string `json:"text"`
}
Ref: #/components/schemas/CreateTranscriptionResponse
func (*CreateTranscriptionResponse) Decode ¶
func (s *CreateTranscriptionResponse) Decode(d *jx.Decoder) error
Decode decodes CreateTranscriptionResponse from json.
func (*CreateTranscriptionResponse) Encode ¶
func (s *CreateTranscriptionResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateTranscriptionResponse) GetText ¶
func (s *CreateTranscriptionResponse) GetText() string
GetText returns the value of Text.
func (*CreateTranscriptionResponse) MarshalJSON ¶
func (s *CreateTranscriptionResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateTranscriptionResponse) SetText ¶
func (s *CreateTranscriptionResponse) SetText(val string)
SetText sets the value of Text.
func (*CreateTranscriptionResponse) UnmarshalJSON ¶
func (s *CreateTranscriptionResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateTranslationRequestMultipart ¶
type CreateTranslationRequestMultipart struct { // The audio file to translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm. File ht.MultipartFile `json:"file"` // ID of the model to use. Only `whisper-1` is currently available. Model string `json:"model"` // An optional text to guide the model's style or continue a previous audio segment. The // [prompt](/docs/guides/speech-to-text/prompting) should be in English. Prompt OptString `json:"prompt"` // The format of the transcript output, in one of these options: json, text, srt, verbose_json, or // vtt. ResponseFormat OptString `json:"response_format"` // The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, // while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model // will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically // increase the temperature until certain thresholds are hit. Temperature OptFloat64 `json:"temperature"` }
Ref: #/components/schemas/CreateTranslationRequest
func (*CreateTranslationRequestMultipart) GetFile ¶
func (s *CreateTranslationRequestMultipart) GetFile() ht.MultipartFile
GetFile returns the value of File.
func (*CreateTranslationRequestMultipart) GetModel ¶
func (s *CreateTranslationRequestMultipart) GetModel() string
GetModel returns the value of Model.
func (*CreateTranslationRequestMultipart) GetPrompt ¶
func (s *CreateTranslationRequestMultipart) GetPrompt() OptString
GetPrompt returns the value of Prompt.
func (*CreateTranslationRequestMultipart) GetResponseFormat ¶
func (s *CreateTranslationRequestMultipart) GetResponseFormat() OptString
GetResponseFormat returns the value of ResponseFormat.
func (*CreateTranslationRequestMultipart) GetTemperature ¶
func (s *CreateTranslationRequestMultipart) GetTemperature() OptFloat64
GetTemperature returns the value of Temperature.
func (*CreateTranslationRequestMultipart) SetFile ¶
func (s *CreateTranslationRequestMultipart) SetFile(val ht.MultipartFile)
SetFile sets the value of File.
func (*CreateTranslationRequestMultipart) SetModel ¶
func (s *CreateTranslationRequestMultipart) SetModel(val string)
SetModel sets the value of Model.
func (*CreateTranslationRequestMultipart) SetPrompt ¶
func (s *CreateTranslationRequestMultipart) SetPrompt(val OptString)
SetPrompt sets the value of Prompt.
func (*CreateTranslationRequestMultipart) SetResponseFormat ¶
func (s *CreateTranslationRequestMultipart) SetResponseFormat(val OptString)
SetResponseFormat sets the value of ResponseFormat.
func (*CreateTranslationRequestMultipart) SetTemperature ¶
func (s *CreateTranslationRequestMultipart) SetTemperature(val OptFloat64)
SetTemperature sets the value of Temperature.
func (*CreateTranslationRequestMultipart) Validate ¶
func (s *CreateTranslationRequestMultipart) Validate() error
type CreateTranslationResponse ¶
type CreateTranslationResponse struct {
Text string `json:"text"`
}
Ref: #/components/schemas/CreateTranslationResponse
func (*CreateTranslationResponse) Decode ¶
func (s *CreateTranslationResponse) Decode(d *jx.Decoder) error
Decode decodes CreateTranslationResponse from json.
func (*CreateTranslationResponse) Encode ¶
func (s *CreateTranslationResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateTranslationResponse) GetText ¶
func (s *CreateTranslationResponse) GetText() string
GetText returns the value of Text.
func (*CreateTranslationResponse) MarshalJSON ¶
func (s *CreateTranslationResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateTranslationResponse) SetText ¶
func (s *CreateTranslationResponse) SetText(val string)
SetText sets the value of Text.
func (*CreateTranslationResponse) UnmarshalJSON ¶
func (s *CreateTranslationResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
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 Engine ¶
func (Engine) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Engine) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
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) // CreateAnswer implements createAnswer operation. // // Answers the specified question using the provided documents and examples. // The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to // find relevant context. The relevant context is combined with the provided examples and question to // create the prompt for [completion](/docs/api-reference/completions). // // Deprecated: schema marks this operation as deprecated. // // POST /answers CreateAnswer(ctx context.Context, req *CreateAnswerRequest) (*CreateAnswerResponse, error) // CreateChatCompletion implements createChatCompletion operation. // // Creates a completion for the chat message. // // POST /chat/completions CreateChatCompletion(ctx context.Context, req *CreateChatCompletionRequest) (*CreateChatCompletionResponse, error) // CreateClassification implements createClassification operation. // // Classifies the specified `query` using provided examples. // The endpoint first [searches](/docs/api-reference/searches) over the labeled examples // to select the ones most relevant for the particular query. Then, the relevant examples // are combined with the query to construct a prompt to produce the final label via the // [completions](/docs/api-reference/completions) endpoint. // Labeled examples can be provided via an uploaded `file`, or explicitly listed in the // request using the `examples` parameter for quick tests and small scale use cases. // // Deprecated: schema marks this operation as deprecated. // // POST /classifications CreateClassification(ctx context.Context, req *CreateClassificationRequest) (*CreateClassificationResponse, error) // CreateCompletion implements createCompletion operation. // // Creates a completion for the provided prompt and parameters. // // POST /completions CreateCompletion(ctx context.Context, req *CreateCompletionRequest) (*CreateCompletionResponse, 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) // CreateEmbedding implements createEmbedding operation. // // Creates an embedding vector representing the input text. // // POST /embeddings CreateEmbedding(ctx context.Context, req *CreateEmbeddingRequest) (*CreateEmbeddingResponse, error) // CreateFile implements createFile operation. // // Upload a file that contains document(s) to be used across various endpoints/features. Currently, // the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you // need to increase the storage limit. // // POST /files CreateFile(ctx context.Context, req *CreateFileRequestMultipart) (OpenAIFile, 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 *CreateImageEditRequestMultipart) (ImagesResponse, error) // CreateImageVariation implements createImageVariation operation. // // Creates a variation of a given image. // // POST /images/variations CreateImageVariation(ctx context.Context, req *CreateImageVariationRequestMultipart) (ImagesResponse, error) // CreateModeration implements createModeration operation. // // Classifies if text violates OpenAI's Content Policy. // // POST /moderations CreateModeration(ctx context.Context, req *CreateModerationRequest) (*CreateModerationResponse, error) // CreateSearch implements createSearch operation. // // The search endpoint computes similarity scores between provided query and documents. Documents can // be passed directly to the API if there are no more than 200 of them. // To go beyond the 200 document limit, documents can be processed offline and then used for // efficient retrieval at query time. When `file` is set, the search endpoint searches over all the // documents in the given file and returns up to the `max_rerank` number of documents. These // documents will be returned along with their search scores. // The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go // higher), where a score above 200 usually means the document is semantically similar to the query. // // Deprecated: schema marks this operation as deprecated. // // POST /engines/{engine_id}/search CreateSearch(ctx context.Context, req *CreateSearchRequest, params CreateSearchParams) (*CreateSearchResponse, error) // CreateTranscription implements createTranscription operation. // // Transcribes audio into the input language. // // POST /audio/transcriptions CreateTranscription(ctx context.Context, req *CreateTranscriptionRequestMultipart) (*CreateTranscriptionResponse, error) // CreateTranslation implements createTranslation operation. // // Translates audio into into English. // // POST /audio/translations CreateTranslation(ctx context.Context, req *CreateTranslationRequestMultipart) (*CreateTranslationResponse, 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) // ListEngines implements listEngines operation. // // Lists the currently available (non-finetuned) models, and provides basic information about each // one such as the owner and availability. // // Deprecated: schema marks this operation as deprecated. // // GET /engines ListEngines(ctx context.Context) (*ListEnginesResponse, 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) // RetrieveEngine implements retrieveEngine operation. // // Retrieves a model instance, providing basic information about it such as the owner and // availability. // // Deprecated: schema marks this operation as deprecated. // // GET /engines/{engine_id} RetrieveEngine(ctx context.Context, params RetrieveEngineParams) (Engine, 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 Invoker ¶
type Invoker interface { // CancelFineTune invokes cancelFineTune operation. // // Immediately cancel a fine-tune job. // // POST /fine-tunes/{fine_tune_id}/cancel CancelFineTune(ctx context.Context, params CancelFineTuneParams) (FineTune, error) // CreateAnswer invokes createAnswer operation. // // Answers the specified question using the provided documents and examples. // The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to // find relevant context. The relevant context is combined with the provided examples and question to // create the prompt for [completion](/docs/api-reference/completions). // // Deprecated: schema marks this operation as deprecated. // // POST /answers CreateAnswer(ctx context.Context, request *CreateAnswerRequest) (*CreateAnswerResponse, error) // CreateChatCompletion invokes createChatCompletion operation. // // Creates a completion for the chat message. // // POST /chat/completions CreateChatCompletion(ctx context.Context, request *CreateChatCompletionRequest) (*CreateChatCompletionResponse, error) // CreateClassification invokes createClassification operation. // // Classifies the specified `query` using provided examples. // The endpoint first [searches](/docs/api-reference/searches) over the labeled examples // to select the ones most relevant for the particular query. Then, the relevant examples // are combined with the query to construct a prompt to produce the final label via the // [completions](/docs/api-reference/completions) endpoint. // Labeled examples can be provided via an uploaded `file`, or explicitly listed in the // request using the `examples` parameter for quick tests and small scale use cases. // // Deprecated: schema marks this operation as deprecated. // // POST /classifications CreateClassification(ctx context.Context, request *CreateClassificationRequest) (*CreateClassificationResponse, error) // CreateCompletion invokes createCompletion operation. // // Creates a completion for the provided prompt and parameters. // // POST /completions CreateCompletion(ctx context.Context, request *CreateCompletionRequest) (*CreateCompletionResponse, error) // CreateEdit invokes createEdit operation. // // Creates a new edit for the provided input, instruction, and parameters. // // POST /edits CreateEdit(ctx context.Context, request *CreateEditRequest) (*CreateEditResponse, error) // CreateEmbedding invokes createEmbedding operation. // // Creates an embedding vector representing the input text. // // POST /embeddings CreateEmbedding(ctx context.Context, request *CreateEmbeddingRequest) (*CreateEmbeddingResponse, error) // CreateFile invokes createFile operation. // // Upload a file that contains document(s) to be used across various endpoints/features. Currently, // the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you // need to increase the storage limit. // // POST /files CreateFile(ctx context.Context, request *CreateFileRequestMultipart) (OpenAIFile, 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 CreateFineTune(ctx context.Context, request *CreateFineTuneRequest) (FineTune, error) // CreateImage invokes createImage operation. // // Creates an image given a prompt. // // POST /images/generations CreateImage(ctx context.Context, request *CreateImageRequest) (ImagesResponse, error) // CreateImageEdit invokes createImageEdit operation. // // Creates an edited or extended image given an original image and a prompt. // // POST /images/edits CreateImageEdit(ctx context.Context, request *CreateImageEditRequestMultipart) (ImagesResponse, error) // CreateImageVariation invokes createImageVariation operation. // // Creates a variation of a given image. // // POST /images/variations CreateImageVariation(ctx context.Context, request *CreateImageVariationRequestMultipart) (ImagesResponse, error) // CreateModeration invokes createModeration operation. // // Classifies if text violates OpenAI's Content Policy. // // POST /moderations CreateModeration(ctx context.Context, request *CreateModerationRequest) (*CreateModerationResponse, error) // CreateSearch invokes createSearch operation. // // The search endpoint computes similarity scores between provided query and documents. Documents can // be passed directly to the API if there are no more than 200 of them. // To go beyond the 200 document limit, documents can be processed offline and then used for // efficient retrieval at query time. When `file` is set, the search endpoint searches over all the // documents in the given file and returns up to the `max_rerank` number of documents. These // documents will be returned along with their search scores. // The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go // higher), where a score above 200 usually means the document is semantically similar to the query. // // Deprecated: schema marks this operation as deprecated. // // POST /engines/{engine_id}/search CreateSearch(ctx context.Context, request *CreateSearchRequest, params CreateSearchParams) (*CreateSearchResponse, error) // CreateTranscription invokes createTranscription operation. // // Transcribes audio into the input language. // // POST /audio/transcriptions CreateTranscription(ctx context.Context, request *CreateTranscriptionRequestMultipart) (*CreateTranscriptionResponse, error) // CreateTranslation invokes createTranslation operation. // // Translates audio into into English. // // POST /audio/translations CreateTranslation(ctx context.Context, request *CreateTranslationRequestMultipart) (*CreateTranslationResponse, error) // DeleteFile invokes deleteFile operation. // // Delete a file. // // DELETE /files/{file_id} DeleteFile(ctx context.Context, params DeleteFileParams) (*DeleteFileResponse, error) // DeleteModel invokes 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 invokes downloadFile operation. // // Returns the contents of the specified file. // // GET /files/{file_id}/content DownloadFile(ctx context.Context, params DownloadFileParams) (string, error) // ListEngines invokes listEngines operation. // // Lists the currently available (non-finetuned) models, and provides basic information about each // one such as the owner and availability. // // Deprecated: schema marks this operation as deprecated. // // GET /engines ListEngines(ctx context.Context) (*ListEnginesResponse, error) // ListFiles invokes listFiles operation. // // Returns a list of files that belong to the user's organization. // // GET /files ListFiles(ctx context.Context) (*ListFilesResponse, error) // ListFineTuneEvents invokes 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 invokes listFineTunes operation. // // List your organization's fine-tuning jobs. // // GET /fine-tunes ListFineTunes(ctx context.Context) (*ListFineTunesResponse, 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 ListModels(ctx context.Context) (*ListModelsResponse, error) // RetrieveEngine invokes retrieveEngine operation. // // Retrieves a model instance, providing basic information about it such as the owner and // availability. // // Deprecated: schema marks this operation as deprecated. // // GET /engines/{engine_id} RetrieveEngine(ctx context.Context, params RetrieveEngineParams) (Engine, error) // RetrieveFile invokes retrieveFile operation. // // Returns information about a specific file. // // GET /files/{file_id} RetrieveFile(ctx context.Context, params RetrieveFileParams) (OpenAIFile, 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} RetrieveFineTune(ctx context.Context, params RetrieveFineTuneParams) (FineTune, error) // RetrieveModel invokes 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) }
Invoker invokes operations described by OpenAPI v3 specification.
type Labeler ¶
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶
LabelerFromContext retrieves the Labeler from the provided context, if present.
If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.
func (*Labeler) AttributeSet ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type ListEnginesResponse ¶
Ref: #/components/schemas/ListEnginesResponse
func (*ListEnginesResponse) Decode ¶
func (s *ListEnginesResponse) Decode(d *jx.Decoder) error
Decode decodes ListEnginesResponse from json.
func (*ListEnginesResponse) Encode ¶
func (s *ListEnginesResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ListEnginesResponse) GetData ¶
func (s *ListEnginesResponse) GetData() []Engine
GetData returns the value of Data.
func (*ListEnginesResponse) GetObject ¶
func (s *ListEnginesResponse) GetObject() string
GetObject returns the value of Object.
func (*ListEnginesResponse) MarshalJSON ¶
func (s *ListEnginesResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListEnginesResponse) SetData ¶
func (s *ListEnginesResponse) SetData(val []Engine)
SetData sets the value of Data.
func (*ListEnginesResponse) SetObject ¶
func (s *ListEnginesResponse) SetObject(val string)
SetObject sets the value of Object.
func (*ListEnginesResponse) UnmarshalJSON ¶
func (s *ListEnginesResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ListEnginesResponse) Validate ¶
func (s *ListEnginesResponse) Validate() error
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 OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const ( CancelFineTuneOperation OperationName = "CancelFineTune" CreateAnswerOperation OperationName = "CreateAnswer" CreateChatCompletionOperation OperationName = "CreateChatCompletion" CreateClassificationOperation OperationName = "CreateClassification" CreateCompletionOperation OperationName = "CreateCompletion" CreateEditOperation OperationName = "CreateEdit" CreateEmbeddingOperation OperationName = "CreateEmbedding" CreateFileOperation OperationName = "CreateFile" CreateFineTuneOperation OperationName = "CreateFineTune" CreateImageOperation OperationName = "CreateImage" CreateImageEditOperation OperationName = "CreateImageEdit" CreateImageVariationOperation OperationName = "CreateImageVariation" CreateModerationOperation OperationName = "CreateModeration" CreateSearchOperation OperationName = "CreateSearch" CreateTranscriptionOperation OperationName = "CreateTranscription" CreateTranslationOperation OperationName = "CreateTranslation" DeleteFileOperation OperationName = "DeleteFile" DeleteModelOperation OperationName = "DeleteModel" DownloadFileOperation OperationName = "DownloadFile" ListEnginesOperation OperationName = "ListEngines" ListFilesOperation OperationName = "ListFiles" ListFineTuneEventsOperation OperationName = "ListFineTuneEvents" ListFineTunesOperation OperationName = "ListFineTunes" ListModelsOperation OperationName = "ListModels" RetrieveEngineOperation OperationName = "RetrieveEngine" RetrieveFileOperation OperationName = "RetrieveFile" RetrieveFineTuneOperation OperationName = "RetrieveFineTune" RetrieveModelOperation OperationName = "RetrieveModel" )
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 OptCreateAnswerRequestLogitBias ¶
type OptCreateAnswerRequestLogitBias struct { Value *CreateAnswerRequestLogitBias Set bool }
OptCreateAnswerRequestLogitBias is optional *CreateAnswerRequestLogitBias.
func NewOptCreateAnswerRequestLogitBias ¶
func NewOptCreateAnswerRequestLogitBias(v *CreateAnswerRequestLogitBias) OptCreateAnswerRequestLogitBias
NewOptCreateAnswerRequestLogitBias returns new OptCreateAnswerRequestLogitBias with value set to v.
func (*OptCreateAnswerRequestLogitBias) Decode ¶
func (o *OptCreateAnswerRequestLogitBias) Decode(d *jx.Decoder) error
Decode decodes *CreateAnswerRequestLogitBias from json.
func (OptCreateAnswerRequestLogitBias) Encode ¶
func (o OptCreateAnswerRequestLogitBias) Encode(e *jx.Encoder)
Encode encodes *CreateAnswerRequestLogitBias as json.
func (OptCreateAnswerRequestLogitBias) Get ¶
func (o OptCreateAnswerRequestLogitBias) Get() (v *CreateAnswerRequestLogitBias, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptCreateAnswerRequestLogitBias) IsSet ¶
func (o OptCreateAnswerRequestLogitBias) IsSet() bool
IsSet returns true if OptCreateAnswerRequestLogitBias was set.
func (OptCreateAnswerRequestLogitBias) MarshalJSON ¶
func (s OptCreateAnswerRequestLogitBias) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptCreateAnswerRequestLogitBias) Or ¶
func (o OptCreateAnswerRequestLogitBias) Or(d *CreateAnswerRequestLogitBias) *CreateAnswerRequestLogitBias
Or returns value if set, or given parameter if does not.
func (*OptCreateAnswerRequestLogitBias) Reset ¶
func (o *OptCreateAnswerRequestLogitBias) Reset()
Reset unsets value.
func (*OptCreateAnswerRequestLogitBias) SetTo ¶
func (o *OptCreateAnswerRequestLogitBias) SetTo(v *CreateAnswerRequestLogitBias)
SetTo sets value to v.
func (*OptCreateAnswerRequestLogitBias) UnmarshalJSON ¶
func (s *OptCreateAnswerRequestLogitBias) 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 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 OptCreateClassificationRequestLogitBias ¶
type OptCreateClassificationRequestLogitBias struct { Value *CreateClassificationRequestLogitBias Set bool }
OptCreateClassificationRequestLogitBias is optional *CreateClassificationRequestLogitBias.
func NewOptCreateClassificationRequestLogitBias ¶
func NewOptCreateClassificationRequestLogitBias(v *CreateClassificationRequestLogitBias) OptCreateClassificationRequestLogitBias
NewOptCreateClassificationRequestLogitBias returns new OptCreateClassificationRequestLogitBias with value set to v.
func (*OptCreateClassificationRequestLogitBias) Decode ¶
func (o *OptCreateClassificationRequestLogitBias) Decode(d *jx.Decoder) error
Decode decodes *CreateClassificationRequestLogitBias from json.
func (OptCreateClassificationRequestLogitBias) Encode ¶
func (o OptCreateClassificationRequestLogitBias) Encode(e *jx.Encoder)
Encode encodes *CreateClassificationRequestLogitBias as json.
func (OptCreateClassificationRequestLogitBias) Get ¶
func (o OptCreateClassificationRequestLogitBias) Get() (v *CreateClassificationRequestLogitBias, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptCreateClassificationRequestLogitBias) IsSet ¶
func (o OptCreateClassificationRequestLogitBias) IsSet() bool
IsSet returns true if OptCreateClassificationRequestLogitBias was set.
func (OptCreateClassificationRequestLogitBias) MarshalJSON ¶
func (s OptCreateClassificationRequestLogitBias) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptCreateClassificationRequestLogitBias) Or ¶
func (o OptCreateClassificationRequestLogitBias) Or(d *CreateClassificationRequestLogitBias) *CreateClassificationRequestLogitBias
Or returns value if set, or given parameter if does not.
func (*OptCreateClassificationRequestLogitBias) Reset ¶
func (o *OptCreateClassificationRequestLogitBias) Reset()
Reset unsets value.
func (*OptCreateClassificationRequestLogitBias) SetTo ¶
func (o *OptCreateClassificationRequestLogitBias) SetTo(v *CreateClassificationRequestLogitBias)
SetTo sets value to v.
func (*OptCreateClassificationRequestLogitBias) UnmarshalJSON ¶
func (s *OptCreateClassificationRequestLogitBias) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptCreateCompletionRequestLogitBias ¶
type OptCreateCompletionRequestLogitBias struct { Value *CreateCompletionRequestLogitBias Set bool }
OptCreateCompletionRequestLogitBias is optional *CreateCompletionRequestLogitBias.
func NewOptCreateCompletionRequestLogitBias ¶
func NewOptCreateCompletionRequestLogitBias(v *CreateCompletionRequestLogitBias) OptCreateCompletionRequestLogitBias
NewOptCreateCompletionRequestLogitBias returns new OptCreateCompletionRequestLogitBias with value set to v.
func (*OptCreateCompletionRequestLogitBias) Decode ¶
func (o *OptCreateCompletionRequestLogitBias) Decode(d *jx.Decoder) error
Decode decodes *CreateCompletionRequestLogitBias from json.
func (OptCreateCompletionRequestLogitBias) Encode ¶
func (o OptCreateCompletionRequestLogitBias) Encode(e *jx.Encoder)
Encode encodes *CreateCompletionRequestLogitBias as json.
func (OptCreateCompletionRequestLogitBias) Get ¶
func (o OptCreateCompletionRequestLogitBias) Get() (v *CreateCompletionRequestLogitBias, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptCreateCompletionRequestLogitBias) IsSet ¶
func (o OptCreateCompletionRequestLogitBias) IsSet() bool
IsSet returns true if OptCreateCompletionRequestLogitBias was set.
func (OptCreateCompletionRequestLogitBias) MarshalJSON ¶
func (s OptCreateCompletionRequestLogitBias) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptCreateCompletionRequestLogitBias) Or ¶
func (o OptCreateCompletionRequestLogitBias) Or(d *CreateCompletionRequestLogitBias) *CreateCompletionRequestLogitBias
Or returns value if set, or given parameter if does not.
func (*OptCreateCompletionRequestLogitBias) Reset ¶
func (o *OptCreateCompletionRequestLogitBias) Reset()
Reset unsets value.
func (*OptCreateCompletionRequestLogitBias) SetTo ¶
func (o *OptCreateCompletionRequestLogitBias) SetTo(v *CreateCompletionRequestLogitBias)
SetTo sets value to v.
func (*OptCreateCompletionRequestLogitBias) UnmarshalJSON ¶
func (s *OptCreateCompletionRequestLogitBias) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptCreateCompletionResponseUsage ¶
type OptCreateCompletionResponseUsage struct { Value CreateCompletionResponseUsage Set bool }
OptCreateCompletionResponseUsage is optional CreateCompletionResponseUsage.
func NewOptCreateCompletionResponseUsage ¶
func NewOptCreateCompletionResponseUsage(v CreateCompletionResponseUsage) OptCreateCompletionResponseUsage
NewOptCreateCompletionResponseUsage returns new OptCreateCompletionResponseUsage with value set to v.
func (*OptCreateCompletionResponseUsage) Decode ¶
func (o *OptCreateCompletionResponseUsage) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionResponseUsage from json.
func (OptCreateCompletionResponseUsage) Encode ¶
func (o OptCreateCompletionResponseUsage) Encode(e *jx.Encoder)
Encode encodes CreateCompletionResponseUsage as json.
func (OptCreateCompletionResponseUsage) Get ¶
func (o OptCreateCompletionResponseUsage) Get() (v CreateCompletionResponseUsage, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptCreateCompletionResponseUsage) IsSet ¶
func (o OptCreateCompletionResponseUsage) IsSet() bool
IsSet returns true if OptCreateCompletionResponseUsage was set.
func (OptCreateCompletionResponseUsage) MarshalJSON ¶
func (s OptCreateCompletionResponseUsage) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptCreateCompletionResponseUsage) Or ¶
func (o OptCreateCompletionResponseUsage) Or(d CreateCompletionResponseUsage) CreateCompletionResponseUsage
Or returns value if set, or given parameter if does not.
func (*OptCreateCompletionResponseUsage) Reset ¶
func (o *OptCreateCompletionResponseUsage) Reset()
Reset unsets value.
func (*OptCreateCompletionResponseUsage) SetTo ¶
func (o *OptCreateCompletionResponseUsage) SetTo(v CreateCompletionResponseUsage)
SetTo sets value to v.
func (*OptCreateCompletionResponseUsage) UnmarshalJSON ¶
func (s *OptCreateCompletionResponseUsage) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptFloat64 ¶
OptFloat64 is optional float64.
func NewOptFloat64 ¶
func NewOptFloat64(v float64) OptFloat64
NewOptFloat64 returns new OptFloat64 with value set to v.
func (*OptFloat64) Decode ¶
func (o *OptFloat64) Decode(d *jx.Decoder) error
Decode decodes float64 from json.
func (OptFloat64) Encode ¶
func (o OptFloat64) Encode(e *jx.Encoder)
Encode encodes float64 as json.
func (OptFloat64) Get ¶
func (o OptFloat64) Get() (v float64, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptFloat64) IsSet ¶
func (o OptFloat64) IsSet() bool
IsSet returns true if OptFloat64 was set.
func (OptFloat64) MarshalJSON ¶
func (s OptFloat64) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptFloat64) Or ¶
func (o OptFloat64) Or(d float64) float64
Or returns value if set, or given parameter if does not.
func (*OptFloat64) UnmarshalJSON ¶
func (s *OptFloat64) 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 OptNilAnyArray ¶
OptNilAnyArray is optional nullable []jx.Raw.
func NewOptNilAnyArray ¶
func NewOptNilAnyArray(v []jx.Raw) OptNilAnyArray
NewOptNilAnyArray returns new OptNilAnyArray with value set to v.
func (*OptNilAnyArray) Decode ¶
func (o *OptNilAnyArray) Decode(d *jx.Decoder) error
Decode decodes []jx.Raw from json.
func (OptNilAnyArray) Encode ¶
func (o OptNilAnyArray) Encode(e *jx.Encoder)
Encode encodes []jx.Raw as json.
func (OptNilAnyArray) Get ¶
func (o OptNilAnyArray) Get() (v []jx.Raw, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilAnyArray) IsNull ¶
func (o OptNilAnyArray) IsNull() bool
IsSet returns true if value is Null.
func (OptNilAnyArray) IsSet ¶
func (o OptNilAnyArray) IsSet() bool
IsSet returns true if OptNilAnyArray was set.
func (OptNilAnyArray) MarshalJSON ¶
func (s OptNilAnyArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilAnyArray) Or ¶
func (o OptNilAnyArray) Or(d []jx.Raw) []jx.Raw
Or returns value if set, or given parameter if does not.
func (*OptNilAnyArray) UnmarshalJSON ¶
func (s *OptNilAnyArray) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilBool ¶
OptNilBool is optional nullable bool.
func NewOptNilBool ¶
func NewOptNilBool(v bool) OptNilBool
NewOptNilBool returns new OptNilBool with value set to v.
func (*OptNilBool) Decode ¶
func (o *OptNilBool) Decode(d *jx.Decoder) error
Decode decodes bool from json.
func (OptNilBool) Get ¶
func (o OptNilBool) Get() (v bool, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilBool) 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 OptNilCreateAnswerRequestStop ¶
type OptNilCreateAnswerRequestStop struct { Value CreateAnswerRequestStop Set bool Null bool }
OptNilCreateAnswerRequestStop is optional nullable CreateAnswerRequestStop.
func NewOptNilCreateAnswerRequestStop ¶
func NewOptNilCreateAnswerRequestStop(v CreateAnswerRequestStop) OptNilCreateAnswerRequestStop
NewOptNilCreateAnswerRequestStop returns new OptNilCreateAnswerRequestStop with value set to v.
func (*OptNilCreateAnswerRequestStop) Decode ¶
func (o *OptNilCreateAnswerRequestStop) Decode(d *jx.Decoder) error
Decode decodes CreateAnswerRequestStop from json.
func (OptNilCreateAnswerRequestStop) Encode ¶
func (o OptNilCreateAnswerRequestStop) Encode(e *jx.Encoder)
Encode encodes CreateAnswerRequestStop as json.
func (OptNilCreateAnswerRequestStop) Get ¶
func (o OptNilCreateAnswerRequestStop) Get() (v CreateAnswerRequestStop, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateAnswerRequestStop) IsNull ¶
func (o OptNilCreateAnswerRequestStop) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateAnswerRequestStop) IsSet ¶
func (o OptNilCreateAnswerRequestStop) IsSet() bool
IsSet returns true if OptNilCreateAnswerRequestStop was set.
func (OptNilCreateAnswerRequestStop) MarshalJSON ¶
func (s OptNilCreateAnswerRequestStop) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*OptNilCreateAnswerRequestStop) Reset ¶
func (o *OptNilCreateAnswerRequestStop) Reset()
Reset unsets value.
func (*OptNilCreateAnswerRequestStop) SetTo ¶
func (o *OptNilCreateAnswerRequestStop) SetTo(v CreateAnswerRequestStop)
SetTo sets value to v.
func (*OptNilCreateAnswerRequestStop) SetToNull ¶
func (o *OptNilCreateAnswerRequestStop) SetToNull()
SetNull sets value to null.
func (*OptNilCreateAnswerRequestStop) UnmarshalJSON ¶
func (s *OptNilCreateAnswerRequestStop) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilCreateChatCompletionRequestStop ¶
type OptNilCreateChatCompletionRequestStop struct { Value CreateChatCompletionRequestStop Set bool Null bool }
OptNilCreateChatCompletionRequestStop is optional nullable CreateChatCompletionRequestStop.
func NewOptNilCreateChatCompletionRequestStop ¶
func NewOptNilCreateChatCompletionRequestStop(v CreateChatCompletionRequestStop) OptNilCreateChatCompletionRequestStop
NewOptNilCreateChatCompletionRequestStop returns new OptNilCreateChatCompletionRequestStop with value set to v.
func (*OptNilCreateChatCompletionRequestStop) Decode ¶
func (o *OptNilCreateChatCompletionRequestStop) Decode(d *jx.Decoder) error
Decode decodes CreateChatCompletionRequestStop from json.
func (OptNilCreateChatCompletionRequestStop) Encode ¶
func (o OptNilCreateChatCompletionRequestStop) Encode(e *jx.Encoder)
Encode encodes CreateChatCompletionRequestStop as json.
func (OptNilCreateChatCompletionRequestStop) Get ¶
func (o OptNilCreateChatCompletionRequestStop) Get() (v CreateChatCompletionRequestStop, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateChatCompletionRequestStop) IsNull ¶
func (o OptNilCreateChatCompletionRequestStop) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateChatCompletionRequestStop) IsSet ¶
func (o OptNilCreateChatCompletionRequestStop) IsSet() bool
IsSet returns true if OptNilCreateChatCompletionRequestStop was set.
func (OptNilCreateChatCompletionRequestStop) MarshalJSON ¶
func (s OptNilCreateChatCompletionRequestStop) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilCreateChatCompletionRequestStop) Or ¶
func (o OptNilCreateChatCompletionRequestStop) Or(d CreateChatCompletionRequestStop) CreateChatCompletionRequestStop
Or returns value if set, or given parameter if does not.
func (*OptNilCreateChatCompletionRequestStop) Reset ¶
func (o *OptNilCreateChatCompletionRequestStop) Reset()
Reset unsets value.
func (*OptNilCreateChatCompletionRequestStop) SetTo ¶
func (o *OptNilCreateChatCompletionRequestStop) SetTo(v CreateChatCompletionRequestStop)
SetTo sets value to v.
func (*OptNilCreateChatCompletionRequestStop) SetToNull ¶
func (o *OptNilCreateChatCompletionRequestStop) SetToNull()
SetNull sets value to null.
func (*OptNilCreateChatCompletionRequestStop) UnmarshalJSON ¶
func (s *OptNilCreateChatCompletionRequestStop) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilCreateCompletionRequestPrompt ¶
type OptNilCreateCompletionRequestPrompt struct { Value CreateCompletionRequestPrompt Set bool Null bool }
OptNilCreateCompletionRequestPrompt is optional nullable CreateCompletionRequestPrompt.
func NewOptNilCreateCompletionRequestPrompt ¶
func NewOptNilCreateCompletionRequestPrompt(v CreateCompletionRequestPrompt) OptNilCreateCompletionRequestPrompt
NewOptNilCreateCompletionRequestPrompt returns new OptNilCreateCompletionRequestPrompt with value set to v.
func (*OptNilCreateCompletionRequestPrompt) Decode ¶
func (o *OptNilCreateCompletionRequestPrompt) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionRequestPrompt from json.
func (OptNilCreateCompletionRequestPrompt) Encode ¶
func (o OptNilCreateCompletionRequestPrompt) Encode(e *jx.Encoder)
Encode encodes CreateCompletionRequestPrompt as json.
func (OptNilCreateCompletionRequestPrompt) Get ¶
func (o OptNilCreateCompletionRequestPrompt) Get() (v CreateCompletionRequestPrompt, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateCompletionRequestPrompt) IsNull ¶
func (o OptNilCreateCompletionRequestPrompt) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateCompletionRequestPrompt) IsSet ¶
func (o OptNilCreateCompletionRequestPrompt) IsSet() bool
IsSet returns true if OptNilCreateCompletionRequestPrompt was set.
func (OptNilCreateCompletionRequestPrompt) MarshalJSON ¶
func (s OptNilCreateCompletionRequestPrompt) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilCreateCompletionRequestPrompt) Or ¶
func (o OptNilCreateCompletionRequestPrompt) Or(d CreateCompletionRequestPrompt) CreateCompletionRequestPrompt
Or returns value if set, or given parameter if does not.
func (*OptNilCreateCompletionRequestPrompt) Reset ¶
func (o *OptNilCreateCompletionRequestPrompt) Reset()
Reset unsets value.
func (*OptNilCreateCompletionRequestPrompt) SetTo ¶
func (o *OptNilCreateCompletionRequestPrompt) SetTo(v CreateCompletionRequestPrompt)
SetTo sets value to v.
func (*OptNilCreateCompletionRequestPrompt) SetToNull ¶
func (o *OptNilCreateCompletionRequestPrompt) SetToNull()
SetNull sets value to null.
func (*OptNilCreateCompletionRequestPrompt) UnmarshalJSON ¶
func (s *OptNilCreateCompletionRequestPrompt) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilCreateCompletionRequestStop ¶
type OptNilCreateCompletionRequestStop struct { Value CreateCompletionRequestStop Set bool Null bool }
OptNilCreateCompletionRequestStop is optional nullable CreateCompletionRequestStop.
func NewOptNilCreateCompletionRequestStop ¶
func NewOptNilCreateCompletionRequestStop(v CreateCompletionRequestStop) OptNilCreateCompletionRequestStop
NewOptNilCreateCompletionRequestStop returns new OptNilCreateCompletionRequestStop with value set to v.
func (*OptNilCreateCompletionRequestStop) Decode ¶
func (o *OptNilCreateCompletionRequestStop) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionRequestStop from json.
func (OptNilCreateCompletionRequestStop) Encode ¶
func (o OptNilCreateCompletionRequestStop) Encode(e *jx.Encoder)
Encode encodes CreateCompletionRequestStop as json.
func (OptNilCreateCompletionRequestStop) Get ¶
func (o OptNilCreateCompletionRequestStop) Get() (v CreateCompletionRequestStop, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateCompletionRequestStop) IsNull ¶
func (o OptNilCreateCompletionRequestStop) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateCompletionRequestStop) IsSet ¶
func (o OptNilCreateCompletionRequestStop) IsSet() bool
IsSet returns true if OptNilCreateCompletionRequestStop was set.
func (OptNilCreateCompletionRequestStop) MarshalJSON ¶
func (s OptNilCreateCompletionRequestStop) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilCreateCompletionRequestStop) Or ¶
func (o OptNilCreateCompletionRequestStop) Or(d CreateCompletionRequestStop) CreateCompletionRequestStop
Or returns value if set, or given parameter if does not.
func (*OptNilCreateCompletionRequestStop) Reset ¶
func (o *OptNilCreateCompletionRequestStop) Reset()
Reset unsets value.
func (*OptNilCreateCompletionRequestStop) SetTo ¶
func (o *OptNilCreateCompletionRequestStop) SetTo(v CreateCompletionRequestStop)
SetTo sets value to v.
func (*OptNilCreateCompletionRequestStop) SetToNull ¶
func (o *OptNilCreateCompletionRequestStop) SetToNull()
SetNull sets value to null.
func (*OptNilCreateCompletionRequestStop) UnmarshalJSON ¶
func (s *OptNilCreateCompletionRequestStop) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilCreateCompletionResponseChoicesItemLogprobs ¶
type OptNilCreateCompletionResponseChoicesItemLogprobs struct { Value CreateCompletionResponseChoicesItemLogprobs Set bool Null bool }
OptNilCreateCompletionResponseChoicesItemLogprobs is optional nullable CreateCompletionResponseChoicesItemLogprobs.
func NewOptNilCreateCompletionResponseChoicesItemLogprobs ¶
func NewOptNilCreateCompletionResponseChoicesItemLogprobs(v CreateCompletionResponseChoicesItemLogprobs) OptNilCreateCompletionResponseChoicesItemLogprobs
NewOptNilCreateCompletionResponseChoicesItemLogprobs returns new OptNilCreateCompletionResponseChoicesItemLogprobs with value set to v.
func (*OptNilCreateCompletionResponseChoicesItemLogprobs) Decode ¶
func (o *OptNilCreateCompletionResponseChoicesItemLogprobs) Decode(d *jx.Decoder) error
Decode decodes CreateCompletionResponseChoicesItemLogprobs from json.
func (OptNilCreateCompletionResponseChoicesItemLogprobs) Encode ¶
func (o OptNilCreateCompletionResponseChoicesItemLogprobs) Encode(e *jx.Encoder)
Encode encodes CreateCompletionResponseChoicesItemLogprobs as json.
func (OptNilCreateCompletionResponseChoicesItemLogprobs) Get ¶
func (o OptNilCreateCompletionResponseChoicesItemLogprobs) Get() (v CreateCompletionResponseChoicesItemLogprobs, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateCompletionResponseChoicesItemLogprobs) IsNull ¶
func (o OptNilCreateCompletionResponseChoicesItemLogprobs) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateCompletionResponseChoicesItemLogprobs) IsSet ¶
func (o OptNilCreateCompletionResponseChoicesItemLogprobs) IsSet() bool
IsSet returns true if OptNilCreateCompletionResponseChoicesItemLogprobs was set.
func (OptNilCreateCompletionResponseChoicesItemLogprobs) MarshalJSON ¶
func (s OptNilCreateCompletionResponseChoicesItemLogprobs) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilCreateCompletionResponseChoicesItemLogprobs) Or ¶
func (o OptNilCreateCompletionResponseChoicesItemLogprobs) Or(d CreateCompletionResponseChoicesItemLogprobs) CreateCompletionResponseChoicesItemLogprobs
Or returns value if set, or given parameter if does not.
func (*OptNilCreateCompletionResponseChoicesItemLogprobs) Reset ¶
func (o *OptNilCreateCompletionResponseChoicesItemLogprobs) Reset()
Reset unsets value.
func (*OptNilCreateCompletionResponseChoicesItemLogprobs) SetTo ¶
func (o *OptNilCreateCompletionResponseChoicesItemLogprobs) SetTo(v CreateCompletionResponseChoicesItemLogprobs)
SetTo sets value to v.
func (*OptNilCreateCompletionResponseChoicesItemLogprobs) SetToNull ¶
func (o *OptNilCreateCompletionResponseChoicesItemLogprobs) SetToNull()
SetNull sets value to null.
func (*OptNilCreateCompletionResponseChoicesItemLogprobs) UnmarshalJSON ¶
func (s *OptNilCreateCompletionResponseChoicesItemLogprobs) 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 OptNilCreateImageEditRequestMultipartResponseFormat ¶
type OptNilCreateImageEditRequestMultipartResponseFormat struct { Value CreateImageEditRequestMultipartResponseFormat Set bool Null bool }
OptNilCreateImageEditRequestMultipartResponseFormat is optional nullable CreateImageEditRequestMultipartResponseFormat.
func NewOptNilCreateImageEditRequestMultipartResponseFormat ¶
func NewOptNilCreateImageEditRequestMultipartResponseFormat(v CreateImageEditRequestMultipartResponseFormat) OptNilCreateImageEditRequestMultipartResponseFormat
NewOptNilCreateImageEditRequestMultipartResponseFormat returns new OptNilCreateImageEditRequestMultipartResponseFormat with value set to v.
func (OptNilCreateImageEditRequestMultipartResponseFormat) Get ¶
func (o OptNilCreateImageEditRequestMultipartResponseFormat) Get() (v CreateImageEditRequestMultipartResponseFormat, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateImageEditRequestMultipartResponseFormat) IsNull ¶
func (o OptNilCreateImageEditRequestMultipartResponseFormat) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateImageEditRequestMultipartResponseFormat) IsSet ¶
func (o OptNilCreateImageEditRequestMultipartResponseFormat) IsSet() bool
IsSet returns true if OptNilCreateImageEditRequestMultipartResponseFormat was set.
func (OptNilCreateImageEditRequestMultipartResponseFormat) Or ¶
func (o OptNilCreateImageEditRequestMultipartResponseFormat) Or(d CreateImageEditRequestMultipartResponseFormat) CreateImageEditRequestMultipartResponseFormat
Or returns value if set, or given parameter if does not.
func (*OptNilCreateImageEditRequestMultipartResponseFormat) Reset ¶
func (o *OptNilCreateImageEditRequestMultipartResponseFormat) Reset()
Reset unsets value.
func (*OptNilCreateImageEditRequestMultipartResponseFormat) SetTo ¶
func (o *OptNilCreateImageEditRequestMultipartResponseFormat) SetTo(v CreateImageEditRequestMultipartResponseFormat)
SetTo sets value to v.
func (*OptNilCreateImageEditRequestMultipartResponseFormat) SetToNull ¶
func (o *OptNilCreateImageEditRequestMultipartResponseFormat) SetToNull()
SetNull sets value to null.
type OptNilCreateImageEditRequestMultipartSize ¶
type OptNilCreateImageEditRequestMultipartSize struct { Value CreateImageEditRequestMultipartSize Set bool Null bool }
OptNilCreateImageEditRequestMultipartSize is optional nullable CreateImageEditRequestMultipartSize.
func NewOptNilCreateImageEditRequestMultipartSize ¶
func NewOptNilCreateImageEditRequestMultipartSize(v CreateImageEditRequestMultipartSize) OptNilCreateImageEditRequestMultipartSize
NewOptNilCreateImageEditRequestMultipartSize returns new OptNilCreateImageEditRequestMultipartSize with value set to v.
func (OptNilCreateImageEditRequestMultipartSize) Get ¶
func (o OptNilCreateImageEditRequestMultipartSize) Get() (v CreateImageEditRequestMultipartSize, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateImageEditRequestMultipartSize) IsNull ¶
func (o OptNilCreateImageEditRequestMultipartSize) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateImageEditRequestMultipartSize) IsSet ¶
func (o OptNilCreateImageEditRequestMultipartSize) IsSet() bool
IsSet returns true if OptNilCreateImageEditRequestMultipartSize was set.
func (OptNilCreateImageEditRequestMultipartSize) Or ¶
func (o OptNilCreateImageEditRequestMultipartSize) Or(d CreateImageEditRequestMultipartSize) CreateImageEditRequestMultipartSize
Or returns value if set, or given parameter if does not.
func (*OptNilCreateImageEditRequestMultipartSize) Reset ¶
func (o *OptNilCreateImageEditRequestMultipartSize) Reset()
Reset unsets value.
func (*OptNilCreateImageEditRequestMultipartSize) SetTo ¶
func (o *OptNilCreateImageEditRequestMultipartSize) SetTo(v CreateImageEditRequestMultipartSize)
SetTo sets value to v.
func (*OptNilCreateImageEditRequestMultipartSize) SetToNull ¶
func (o *OptNilCreateImageEditRequestMultipartSize) 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 OptNilCreateImageVariationRequestMultipartResponseFormat ¶
type OptNilCreateImageVariationRequestMultipartResponseFormat struct { Value CreateImageVariationRequestMultipartResponseFormat Set bool Null bool }
OptNilCreateImageVariationRequestMultipartResponseFormat is optional nullable CreateImageVariationRequestMultipartResponseFormat.
func NewOptNilCreateImageVariationRequestMultipartResponseFormat ¶
func NewOptNilCreateImageVariationRequestMultipartResponseFormat(v CreateImageVariationRequestMultipartResponseFormat) OptNilCreateImageVariationRequestMultipartResponseFormat
NewOptNilCreateImageVariationRequestMultipartResponseFormat returns new OptNilCreateImageVariationRequestMultipartResponseFormat with value set to v.
func (OptNilCreateImageVariationRequestMultipartResponseFormat) Get ¶
func (o OptNilCreateImageVariationRequestMultipartResponseFormat) Get() (v CreateImageVariationRequestMultipartResponseFormat, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateImageVariationRequestMultipartResponseFormat) IsNull ¶
func (o OptNilCreateImageVariationRequestMultipartResponseFormat) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateImageVariationRequestMultipartResponseFormat) IsSet ¶
func (o OptNilCreateImageVariationRequestMultipartResponseFormat) IsSet() bool
IsSet returns true if OptNilCreateImageVariationRequestMultipartResponseFormat was set.
func (OptNilCreateImageVariationRequestMultipartResponseFormat) Or ¶
func (o OptNilCreateImageVariationRequestMultipartResponseFormat) Or(d CreateImageVariationRequestMultipartResponseFormat) CreateImageVariationRequestMultipartResponseFormat
Or returns value if set, or given parameter if does not.
func (*OptNilCreateImageVariationRequestMultipartResponseFormat) Reset ¶
func (o *OptNilCreateImageVariationRequestMultipartResponseFormat) Reset()
Reset unsets value.
func (*OptNilCreateImageVariationRequestMultipartResponseFormat) SetTo ¶
func (o *OptNilCreateImageVariationRequestMultipartResponseFormat) SetTo(v CreateImageVariationRequestMultipartResponseFormat)
SetTo sets value to v.
func (*OptNilCreateImageVariationRequestMultipartResponseFormat) SetToNull ¶
func (o *OptNilCreateImageVariationRequestMultipartResponseFormat) SetToNull()
SetNull sets value to null.
type OptNilCreateImageVariationRequestMultipartSize ¶
type OptNilCreateImageVariationRequestMultipartSize struct { Value CreateImageVariationRequestMultipartSize Set bool Null bool }
OptNilCreateImageVariationRequestMultipartSize is optional nullable CreateImageVariationRequestMultipartSize.
func NewOptNilCreateImageVariationRequestMultipartSize ¶
func NewOptNilCreateImageVariationRequestMultipartSize(v CreateImageVariationRequestMultipartSize) OptNilCreateImageVariationRequestMultipartSize
NewOptNilCreateImageVariationRequestMultipartSize returns new OptNilCreateImageVariationRequestMultipartSize with value set to v.
func (OptNilCreateImageVariationRequestMultipartSize) Get ¶
func (o OptNilCreateImageVariationRequestMultipartSize) Get() (v CreateImageVariationRequestMultipartSize, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilCreateImageVariationRequestMultipartSize) IsNull ¶
func (o OptNilCreateImageVariationRequestMultipartSize) IsNull() bool
IsSet returns true if value is Null.
func (OptNilCreateImageVariationRequestMultipartSize) IsSet ¶
func (o OptNilCreateImageVariationRequestMultipartSize) IsSet() bool
IsSet returns true if OptNilCreateImageVariationRequestMultipartSize was set.
func (OptNilCreateImageVariationRequestMultipartSize) Or ¶
func (o OptNilCreateImageVariationRequestMultipartSize) Or(d CreateImageVariationRequestMultipartSize) CreateImageVariationRequestMultipartSize
Or returns value if set, or given parameter if does not.
func (*OptNilCreateImageVariationRequestMultipartSize) Reset ¶
func (o *OptNilCreateImageVariationRequestMultipartSize) Reset()
Reset unsets value.
func (*OptNilCreateImageVariationRequestMultipartSize) SetTo ¶
func (o *OptNilCreateImageVariationRequestMultipartSize) SetTo(v CreateImageVariationRequestMultipartSize)
SetTo sets value to v.
func (*OptNilCreateImageVariationRequestMultipartSize) SetToNull ¶
func (o *OptNilCreateImageVariationRequestMultipartSize) 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 OptNilStringArray ¶
OptNilStringArray is optional nullable []string.
func NewOptNilStringArray ¶
func NewOptNilStringArray(v []string) OptNilStringArray
NewOptNilStringArray returns new OptNilStringArray with value set to v.
func (*OptNilStringArray) Decode ¶
func (o *OptNilStringArray) Decode(d *jx.Decoder) error
Decode decodes []string from json.
func (OptNilStringArray) Encode ¶
func (o OptNilStringArray) Encode(e *jx.Encoder)
Encode encodes []string as json.
func (OptNilStringArray) Get ¶
func (o OptNilStringArray) Get() (v []string, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilStringArray) IsNull ¶
func (o OptNilStringArray) IsNull() bool
IsSet returns true if value is Null.
func (OptNilStringArray) IsSet ¶
func (o OptNilStringArray) IsSet() bool
IsSet returns true if OptNilStringArray was set.
func (OptNilStringArray) MarshalJSON ¶
func (s OptNilStringArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilStringArray) Or ¶
func (o OptNilStringArray) Or(d []string) []string
Or returns value if set, or given parameter if does not.
func (*OptNilStringArray) SetTo ¶
func (o *OptNilStringArray) SetTo(v []string)
SetTo sets value to v.
func (*OptNilStringArray) SetToNull ¶
func (o *OptNilStringArray) SetToNull()
SetNull sets value to null.
func (*OptNilStringArray) UnmarshalJSON ¶
func (s *OptNilStringArray) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilStringArrayArray ¶
OptNilStringArrayArray is optional nullable [][]string.
func NewOptNilStringArrayArray ¶
func NewOptNilStringArrayArray(v [][]string) OptNilStringArrayArray
NewOptNilStringArrayArray returns new OptNilStringArrayArray with value set to v.
func (*OptNilStringArrayArray) Decode ¶
func (o *OptNilStringArrayArray) Decode(d *jx.Decoder) error
Decode decodes [][]string from json.
func (OptNilStringArrayArray) Encode ¶
func (o OptNilStringArrayArray) Encode(e *jx.Encoder)
Encode encodes [][]string as json.
func (OptNilStringArrayArray) Get ¶
func (o OptNilStringArrayArray) Get() (v [][]string, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptNilStringArrayArray) IsNull ¶
func (o OptNilStringArrayArray) IsNull() bool
IsSet returns true if value is Null.
func (OptNilStringArrayArray) IsSet ¶
func (o OptNilStringArrayArray) IsSet() bool
IsSet returns true if OptNilStringArrayArray was set.
func (OptNilStringArrayArray) MarshalJSON ¶
func (s OptNilStringArrayArray) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptNilStringArrayArray) Or ¶
func (o OptNilStringArrayArray) Or(d [][]string) [][]string
Or returns value if set, or given parameter if does not.
func (*OptNilStringArrayArray) SetTo ¶
func (o *OptNilStringArrayArray) SetTo(v [][]string)
SetTo sets value to v.
func (*OptNilStringArrayArray) SetToNull ¶
func (o *OptNilStringArrayArray) SetToNull()
SetNull sets value to null.
func (*OptNilStringArrayArray) UnmarshalJSON ¶
func (s *OptNilStringArrayArray) 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 otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type RetrieveEngineParams ¶
type RetrieveEngineParams struct { // The ID of the engine to use for this request. EngineID string }
RetrieveEngineParams is parameters of retrieveEngine operation.
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) CreateAnswer
deprecated
func (UnimplementedHandler) CreateAnswer(ctx context.Context, req *CreateAnswerRequest) (r *CreateAnswerResponse, _ error)
CreateAnswer implements createAnswer operation.
Answers the specified question using the provided documents and examples. The endpoint first [searches](/docs/api-reference/searches) over provided documents or files to find relevant context. The relevant context is combined with the provided examples and question to create the prompt for [completion](/docs/api-reference/completions).
Deprecated: schema marks this operation as deprecated.
POST /answers
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) CreateClassification
deprecated
func (UnimplementedHandler) CreateClassification(ctx context.Context, req *CreateClassificationRequest) (r *CreateClassificationResponse, _ error)
CreateClassification implements createClassification operation.
Classifies the specified `query` using provided examples. The endpoint first [searches](/docs/api-reference/searches) over the labeled examples to select the ones most relevant for the particular query. Then, the relevant examples are combined with the query to construct a prompt to produce the final label via the [completions](/docs/api-reference/completions) endpoint. Labeled examples can be provided via an uploaded `file`, or explicitly listed in the request using the `examples` parameter for quick tests and small scale use cases.
Deprecated: schema marks this operation as deprecated.
POST /classifications
func (UnimplementedHandler) CreateCompletion ¶
func (UnimplementedHandler) CreateCompletion(ctx context.Context, req *CreateCompletionRequest) (r *CreateCompletionResponse, _ error)
CreateCompletion implements createCompletion operation.
Creates a completion for the provided prompt and parameters.
POST /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) CreateEmbedding ¶
func (UnimplementedHandler) CreateEmbedding(ctx context.Context, req *CreateEmbeddingRequest) (r *CreateEmbeddingResponse, _ error)
CreateEmbedding implements createEmbedding operation.
Creates an embedding vector representing the input text.
POST /embeddings
func (UnimplementedHandler) CreateFile ¶
func (UnimplementedHandler) CreateFile(ctx context.Context, req *CreateFileRequestMultipart) (r OpenAIFile, _ error)
CreateFile implements createFile operation.
Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.
POST /files
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 *CreateImageEditRequestMultipart) (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 *CreateImageVariationRequestMultipart) (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) CreateSearch
deprecated
func (UnimplementedHandler) CreateSearch(ctx context.Context, req *CreateSearchRequest, params CreateSearchParams) (r *CreateSearchResponse, _ error)
CreateSearch implements createSearch operation.
The search endpoint computes similarity scores between provided query and documents. Documents can be passed directly to the API if there are no more than 200 of them. To go beyond the 200 document limit, documents can be processed offline and then used for efficient retrieval at query time. When `file` is set, the search endpoint searches over all the documents in the given file and returns up to the `max_rerank` number of documents. These documents will be returned along with their search scores. The similarity score is a positive score that usually ranges from 0 to 300 (but can sometimes go higher), where a score above 200 usually means the document is semantically similar to the query.
Deprecated: schema marks this operation as deprecated.
POST /engines/{engine_id}/search
func (UnimplementedHandler) CreateTranscription ¶
func (UnimplementedHandler) CreateTranscription(ctx context.Context, req *CreateTranscriptionRequestMultipart) (r *CreateTranscriptionResponse, _ error)
CreateTranscription implements createTranscription operation.
Transcribes audio into the input language.
POST /audio/transcriptions
func (UnimplementedHandler) CreateTranslation ¶
func (UnimplementedHandler) CreateTranslation(ctx context.Context, req *CreateTranslationRequestMultipart) (r *CreateTranslationResponse, _ error)
CreateTranslation implements createTranslation operation.
Translates audio into into English.
POST /audio/translations
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) ListEngines
deprecated
func (UnimplementedHandler) ListEngines(ctx context.Context) (r *ListEnginesResponse, _ error)
ListEngines implements listEngines operation.
Lists the currently available (non-finetuned) models, and provides basic information about each one such as the owner and availability.
Deprecated: schema marks this operation as deprecated.
GET /engines
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) RetrieveEngine
deprecated
func (UnimplementedHandler) RetrieveEngine(ctx context.Context, params RetrieveEngineParams) (r Engine, _ error)
RetrieveEngine implements retrieveEngine operation.
Retrieves a model instance, providing basic information about it such as the owner and availability.
Deprecated: schema marks this operation as deprecated.
GET /engines/{engine_id}
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 ¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_defaults_gen.go
- oas_handlers_gen.go
- oas_json_gen.go
- oas_labeler_gen.go
- oas_middleware_gen.go
- oas_operations_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go