Documentation
¶
Index ¶
- type Annotations
- type AnnotationsType
- type AssistantFileObject
- type AssistantObject
- func (o *AssistantObject) GetCreatedAt() int64
- func (o *AssistantObject) GetDescription() *string
- func (o *AssistantObject) GetFileIds() []string
- func (o *AssistantObject) GetID() string
- func (o *AssistantObject) GetInstructions() *string
- func (o *AssistantObject) GetMetadata() *Metadata
- func (o *AssistantObject) GetModel() string
- func (o *AssistantObject) GetName() *string
- func (o *AssistantObject) GetObject() AssistantObjectObject
- func (o *AssistantObject) GetTools() []Tools
- type AssistantObjectObject
- type AssistantToolsCode
- type AssistantToolsFunction
- type AssistantToolsFunctionType
- type AssistantToolsRetrieval
- type AssistantToolsRetrievalType
- type BatchSize
- type BatchSizeType
- type Categories
- func (o *Categories) GetHarassment() bool
- func (o *Categories) GetHarassmentThreatening() bool
- func (o *Categories) GetHate() bool
- func (o *Categories) GetHateThreatening() bool
- func (o *Categories) GetSelfHarm() bool
- func (o *Categories) GetSelfHarmInstructions() bool
- func (o *Categories) GetSelfHarmIntent() bool
- func (o *Categories) GetSexual() bool
- func (o *Categories) GetSexualMinors() bool
- func (o *Categories) GetViolence() bool
- func (o *Categories) GetViolenceGraphic() bool
- type CategoryScores
- func (o *CategoryScores) GetHarassment() float64
- func (o *CategoryScores) GetHarassmentThreatening() float64
- func (o *CategoryScores) GetHate() float64
- func (o *CategoryScores) GetHateThreatening() float64
- func (o *CategoryScores) GetSelfHarm() float64
- func (o *CategoryScores) GetSelfHarmInstructions() float64
- func (o *CategoryScores) GetSelfHarmIntent() float64
- func (o *CategoryScores) GetSexual() float64
- func (o *CategoryScores) GetSexualMinors() float64
- func (o *CategoryScores) GetViolence() float64
- func (o *CategoryScores) GetViolenceGraphic() float64
- type ChatCompletionFunctionCallOption
- type ChatCompletionFunctions
- type ChatCompletionMessageToolCall
- type ChatCompletionMessageToolCallType
- type ChatCompletionNamedToolChoice
- type ChatCompletionNamedToolChoiceFunction
- type ChatCompletionNamedToolChoiceType
- type ChatCompletionRequestAssistantMessage
- func (o *ChatCompletionRequestAssistantMessage) GetContent() *string
- func (o *ChatCompletionRequestAssistantMessage) GetFunctionCall() *FunctionCall
- func (o *ChatCompletionRequestAssistantMessage) GetName() *string
- func (o *ChatCompletionRequestAssistantMessage) GetRole() Role
- func (o *ChatCompletionRequestAssistantMessage) GetToolCalls() []ChatCompletionMessageToolCall
- type ChatCompletionRequestFunctionMessage
- type ChatCompletionRequestFunctionMessageRole
- type ChatCompletionRequestMessage
- func CreateChatCompletionRequestMessageChatCompletionRequestAssistantMessage(chatCompletionRequestAssistantMessage ChatCompletionRequestAssistantMessage) ChatCompletionRequestMessage
- func CreateChatCompletionRequestMessageChatCompletionRequestFunctionMessage(chatCompletionRequestFunctionMessage ChatCompletionRequestFunctionMessage) ChatCompletionRequestMessage
- func CreateChatCompletionRequestMessageChatCompletionRequestSystemMessage(chatCompletionRequestSystemMessage ChatCompletionRequestSystemMessage) ChatCompletionRequestMessage
- func CreateChatCompletionRequestMessageChatCompletionRequestToolMessage(chatCompletionRequestToolMessage ChatCompletionRequestToolMessage) ChatCompletionRequestMessage
- func CreateChatCompletionRequestMessageChatCompletionRequestUserMessage(chatCompletionRequestUserMessage ChatCompletionRequestUserMessage) ChatCompletionRequestMessage
- type ChatCompletionRequestMessageContentPart
- type ChatCompletionRequestMessageContentPartImage
- type ChatCompletionRequestMessageContentPartImageType
- type ChatCompletionRequestMessageContentPartText
- type ChatCompletionRequestMessageContentPartTextType
- type ChatCompletionRequestMessageContentPartType
- type ChatCompletionRequestMessageType
- type ChatCompletionRequestSystemMessage
- type ChatCompletionRequestSystemMessageRole
- type ChatCompletionRequestToolMessage
- type ChatCompletionRequestToolMessageRole
- type ChatCompletionRequestUserMessage
- type ChatCompletionRequestUserMessageRole
- type ChatCompletionResponseMessage
- func (o *ChatCompletionResponseMessage) GetContent() *string
- func (o *ChatCompletionResponseMessage) GetFunctionCall() *ChatCompletionResponseMessageFunctionCall
- func (o *ChatCompletionResponseMessage) GetRole() ChatCompletionResponseMessageRole
- func (o *ChatCompletionResponseMessage) GetToolCalls() []ChatCompletionMessageToolCall
- type ChatCompletionResponseMessageFunctionCall
- type ChatCompletionResponseMessageRole
- type ChatCompletionTokenLogprob
- type ChatCompletionTool
- type ChatCompletionToolChoiceOption
- type ChatCompletionToolChoiceOptionType
- type ChatCompletionToolType
- type Choices
- type Code
- type CodeInterpreter
- type CompletionUsage
- type Content
- type ContentType
- type CreateAssistantFileRequest
- type CreateAssistantRequest
- func (o *CreateAssistantRequest) GetDescription() *string
- func (o *CreateAssistantRequest) GetFileIds() []string
- func (o *CreateAssistantRequest) GetInstructions() *string
- func (o *CreateAssistantRequest) GetMetadata() *CreateAssistantRequestMetadata
- func (o *CreateAssistantRequest) GetModel() string
- func (o *CreateAssistantRequest) GetName() *string
- func (o *CreateAssistantRequest) GetTools() []CreateAssistantRequestTools
- type CreateAssistantRequestMetadata
- type CreateAssistantRequestTools
- func CreateCreateAssistantRequestToolsAssistantToolsCode(assistantToolsCode AssistantToolsCode) CreateAssistantRequestTools
- func CreateCreateAssistantRequestToolsAssistantToolsFunction(assistantToolsFunction AssistantToolsFunction) CreateAssistantRequestTools
- func CreateCreateAssistantRequestToolsAssistantToolsRetrieval(assistantToolsRetrieval AssistantToolsRetrieval) CreateAssistantRequestTools
- type CreateAssistantRequestToolsType
- type CreateChatCompletionRequest
- func (o *CreateChatCompletionRequest) GetFrequencyPenalty() *float64
- func (o *CreateChatCompletionRequest) GetFunctionCall() *CreateChatCompletionRequestFunctionCall
- func (o *CreateChatCompletionRequest) GetFunctions() []ChatCompletionFunctions
- func (o *CreateChatCompletionRequest) GetLogitBias() map[string]int64
- func (o *CreateChatCompletionRequest) GetLogprobs() *bool
- func (o *CreateChatCompletionRequest) GetMaxTokens() *int64
- func (o *CreateChatCompletionRequest) GetMessages() []ChatCompletionRequestMessage
- func (o *CreateChatCompletionRequest) GetModel() CreateChatCompletionRequestModel
- func (o *CreateChatCompletionRequest) GetN() *int64
- func (o *CreateChatCompletionRequest) GetPresencePenalty() *float64
- func (o *CreateChatCompletionRequest) GetResponseFormat() *ResponseFormat
- func (o *CreateChatCompletionRequest) GetSeed() *int64
- func (o *CreateChatCompletionRequest) GetStop() *Stop
- func (o *CreateChatCompletionRequest) GetStream() *bool
- func (o *CreateChatCompletionRequest) GetTemperature() *float64
- func (o *CreateChatCompletionRequest) GetToolChoice() *ChatCompletionToolChoiceOption
- func (o *CreateChatCompletionRequest) GetTools() []ChatCompletionTool
- func (o *CreateChatCompletionRequest) GetTopLogprobs() *int64
- func (o *CreateChatCompletionRequest) GetTopP() *float64
- func (o *CreateChatCompletionRequest) GetUser() *string
- func (c CreateChatCompletionRequest) MarshalJSON() ([]byte, error)
- func (c *CreateChatCompletionRequest) UnmarshalJSON(data []byte) error
- type CreateChatCompletionRequest1
- type CreateChatCompletionRequestFunctionCall
- func CreateCreateChatCompletionRequestFunctionCallChatCompletionFunctionCallOption(chatCompletionFunctionCallOption ChatCompletionFunctionCallOption) CreateChatCompletionRequestFunctionCall
- func CreateCreateChatCompletionRequestFunctionCallCreateChatCompletionRequest1(createChatCompletionRequest1 CreateChatCompletionRequest1) CreateChatCompletionRequestFunctionCall
- type CreateChatCompletionRequestFunctionCallType
- type CreateChatCompletionRequestModel
- type CreateChatCompletionRequestModelType
- type CreateChatCompletionRequestType
- type CreateChatCompletionResponse
- func (o *CreateChatCompletionResponse) GetChoices() []Choices
- func (o *CreateChatCompletionResponse) GetCreated() int64
- func (o *CreateChatCompletionResponse) GetID() string
- func (o *CreateChatCompletionResponse) GetModel() string
- func (o *CreateChatCompletionResponse) GetObject() CreateChatCompletionResponseObject
- func (o *CreateChatCompletionResponse) GetSystemFingerprint() *string
- func (o *CreateChatCompletionResponse) GetUsage() *CompletionUsage
- type CreateChatCompletionResponseObject
- type CreateCompletionRequest
- func (o *CreateCompletionRequest) GetBestOf() *int64
- func (o *CreateCompletionRequest) GetEcho() *bool
- func (o *CreateCompletionRequest) GetFrequencyPenalty() *float64
- func (o *CreateCompletionRequest) GetLogitBias() map[string]int64
- func (o *CreateCompletionRequest) GetLogprobs() *int64
- func (o *CreateCompletionRequest) GetMaxTokens() *int64
- func (o *CreateCompletionRequest) GetModel() CreateCompletionRequestModel
- func (o *CreateCompletionRequest) GetN() *int64
- func (o *CreateCompletionRequest) GetPresencePenalty() *float64
- func (o *CreateCompletionRequest) GetPrompt() *Prompt
- func (o *CreateCompletionRequest) GetSeed() *int64
- func (o *CreateCompletionRequest) GetStop() *CreateCompletionRequestStop
- func (o *CreateCompletionRequest) GetStream() *bool
- func (o *CreateCompletionRequest) GetSuffix() *string
- func (o *CreateCompletionRequest) GetTemperature() *float64
- func (o *CreateCompletionRequest) GetTopP() *float64
- func (o *CreateCompletionRequest) GetUser() *string
- func (c CreateCompletionRequest) MarshalJSON() ([]byte, error)
- func (c *CreateCompletionRequest) UnmarshalJSON(data []byte) error
- type CreateCompletionRequest2
- type CreateCompletionRequestModel
- type CreateCompletionRequestModelType
- type CreateCompletionRequestStop
- type CreateCompletionRequestStopType
- type CreateCompletionResponse
- func (o *CreateCompletionResponse) GetChoices() []CreateCompletionResponseChoices
- func (o *CreateCompletionResponse) GetCreated() int64
- func (o *CreateCompletionResponse) GetID() string
- func (o *CreateCompletionResponse) GetModel() string
- func (o *CreateCompletionResponse) GetObject() CreateCompletionResponseObject
- func (o *CreateCompletionResponse) GetSystemFingerprint() *string
- func (o *CreateCompletionResponse) GetUsage() *CompletionUsage
- type CreateCompletionResponseChoices
- func (o *CreateCompletionResponseChoices) GetFinishReason() CreateCompletionResponseFinishReason
- func (o *CreateCompletionResponseChoices) GetIndex() int64
- func (o *CreateCompletionResponseChoices) GetLogprobs() *CreateCompletionResponseLogprobs
- func (o *CreateCompletionResponseChoices) GetText() string
- type CreateCompletionResponseFinishReason
- type CreateCompletionResponseLogprobs
- type CreateCompletionResponseObject
- type CreateEmbeddingRequest
- func (o *CreateEmbeddingRequest) GetDimensions() *int64
- func (o *CreateEmbeddingRequest) GetEncodingFormat() *EncodingFormat
- func (o *CreateEmbeddingRequest) GetInput() Input
- func (o *CreateEmbeddingRequest) GetModel() CreateEmbeddingRequestModel
- func (o *CreateEmbeddingRequest) GetUser() *string
- func (c CreateEmbeddingRequest) MarshalJSON() ([]byte, error)
- func (c *CreateEmbeddingRequest) UnmarshalJSON(data []byte) error
- type CreateEmbeddingRequest2
- type CreateEmbeddingRequestModel
- type CreateEmbeddingRequestModelType
- type CreateEmbeddingResponse
- type CreateEmbeddingResponseObject
- type CreateFileRequest
- type CreateFineTuningJobRequest
- func (o *CreateFineTuningJobRequest) GetHyperparameters() *Hyperparameters
- func (o *CreateFineTuningJobRequest) GetModel() CreateFineTuningJobRequestModel
- func (o *CreateFineTuningJobRequest) GetSuffix() *string
- func (o *CreateFineTuningJobRequest) GetTrainingFile() string
- func (o *CreateFineTuningJobRequest) GetValidationFile() *string
- func (c CreateFineTuningJobRequest) MarshalJSON() ([]byte, error)
- func (c *CreateFineTuningJobRequest) UnmarshalJSON(data []byte) error
- type CreateFineTuningJobRequest1
- type CreateFineTuningJobRequest2
- type CreateFineTuningJobRequestModel
- type CreateFineTuningJobRequestModelType
- type CreateFineTuningJobRequestSchemas1
- type CreateFineTuningJobRequestSchemasHyperparameters1
- type CreateImageEditRequest
- func (o *CreateImageEditRequest) GetImage() CreateImageEditRequestImage
- func (o *CreateImageEditRequest) GetMask() *Mask
- func (o *CreateImageEditRequest) GetModel() *CreateImageEditRequestModel
- func (o *CreateImageEditRequest) GetN() *int64
- func (o *CreateImageEditRequest) GetPrompt() string
- func (o *CreateImageEditRequest) GetResponseFormat() *CreateImageEditRequestResponseFormat
- func (o *CreateImageEditRequest) GetSize() *Size
- func (o *CreateImageEditRequest) GetUser() *string
- func (c CreateImageEditRequest) MarshalJSON() ([]byte, error)
- func (c *CreateImageEditRequest) UnmarshalJSON(data []byte) error
- type CreateImageEditRequest2
- type CreateImageEditRequestImage
- type CreateImageEditRequestModel
- type CreateImageEditRequestModelType
- type CreateImageEditRequestResponseFormat
- type CreateImageRequest
- func (o *CreateImageRequest) GetModel() *CreateImageRequestModel
- func (o *CreateImageRequest) GetN() *int64
- func (o *CreateImageRequest) GetPrompt() string
- func (o *CreateImageRequest) GetQuality() *Quality
- func (o *CreateImageRequest) GetResponseFormat() *CreateImageRequestResponseFormat
- func (o *CreateImageRequest) GetSize() *CreateImageRequestSize
- func (o *CreateImageRequest) GetStyle() *Style
- func (o *CreateImageRequest) GetUser() *string
- func (c CreateImageRequest) MarshalJSON() ([]byte, error)
- func (c *CreateImageRequest) UnmarshalJSON(data []byte) error
- type CreateImageRequest2
- type CreateImageRequestModel
- type CreateImageRequestModelType
- type CreateImageRequestResponseFormat
- type CreateImageRequestSize
- type CreateImageVariationRequest
- func (o *CreateImageVariationRequest) GetImage() CreateImageVariationRequestImage
- func (o *CreateImageVariationRequest) GetModel() *CreateImageVariationRequestModel
- func (o *CreateImageVariationRequest) GetN() *int64
- func (o *CreateImageVariationRequest) GetResponseFormat() *CreateImageVariationRequestResponseFormat
- func (o *CreateImageVariationRequest) GetSize() *CreateImageVariationRequestSize
- func (o *CreateImageVariationRequest) GetUser() *string
- func (c CreateImageVariationRequest) MarshalJSON() ([]byte, error)
- func (c *CreateImageVariationRequest) UnmarshalJSON(data []byte) error
- type CreateImageVariationRequest2
- type CreateImageVariationRequestImage
- type CreateImageVariationRequestModel
- type CreateImageVariationRequestModelType
- type CreateImageVariationRequestResponseFormat
- type CreateImageVariationRequestSize
- type CreateMessageRequest
- type CreateMessageRequestMetadata
- type CreateMessageRequestRole
- type CreateModerationRequest
- type CreateModerationRequest2
- type CreateModerationRequestInput
- type CreateModerationRequestInputType
- type CreateModerationRequestModel
- type CreateModerationRequestModelType
- type CreateModerationResponse
- type CreateRunRequest
- func (o *CreateRunRequest) GetAdditionalInstructions() *string
- func (o *CreateRunRequest) GetAssistantID() string
- func (o *CreateRunRequest) GetInstructions() *string
- func (o *CreateRunRequest) GetMetadata() *CreateRunRequestMetadata
- func (o *CreateRunRequest) GetModel() *string
- func (o *CreateRunRequest) GetTools() []CreateRunRequestTools
- type CreateRunRequestMetadata
- type CreateRunRequestTools
- func CreateCreateRunRequestToolsAssistantToolsCode(assistantToolsCode AssistantToolsCode) CreateRunRequestTools
- func CreateCreateRunRequestToolsAssistantToolsFunction(assistantToolsFunction AssistantToolsFunction) CreateRunRequestTools
- func CreateCreateRunRequestToolsAssistantToolsRetrieval(assistantToolsRetrieval AssistantToolsRetrieval) CreateRunRequestTools
- type CreateRunRequestToolsType
- type CreateSpeechRequest
- func (o *CreateSpeechRequest) GetInput() string
- func (o *CreateSpeechRequest) GetModel() CreateSpeechRequestModel
- func (o *CreateSpeechRequest) GetResponseFormat() *CreateSpeechRequestResponseFormat
- func (o *CreateSpeechRequest) GetSpeed() *float64
- func (o *CreateSpeechRequest) GetVoice() Voice
- func (c CreateSpeechRequest) MarshalJSON() ([]byte, error)
- func (c *CreateSpeechRequest) UnmarshalJSON(data []byte) error
- type CreateSpeechRequest2
- type CreateSpeechRequestModel
- type CreateSpeechRequestModelType
- type CreateSpeechRequestResponseFormat
- type CreateThreadAndRunRequest
- func (o *CreateThreadAndRunRequest) GetAssistantID() string
- func (o *CreateThreadAndRunRequest) GetInstructions() *string
- func (o *CreateThreadAndRunRequest) GetMetadata() *CreateThreadAndRunRequestMetadata
- func (o *CreateThreadAndRunRequest) GetModel() *string
- func (o *CreateThreadAndRunRequest) GetThread() *CreateThreadRequest
- func (o *CreateThreadAndRunRequest) GetTools() []CreateThreadAndRunRequestTools
- type CreateThreadAndRunRequestMetadata
- type CreateThreadAndRunRequestTools
- func CreateCreateThreadAndRunRequestToolsAssistantToolsCode(assistantToolsCode AssistantToolsCode) CreateThreadAndRunRequestTools
- func CreateCreateThreadAndRunRequestToolsAssistantToolsFunction(assistantToolsFunction AssistantToolsFunction) CreateThreadAndRunRequestTools
- func CreateCreateThreadAndRunRequestToolsAssistantToolsRetrieval(assistantToolsRetrieval AssistantToolsRetrieval) CreateThreadAndRunRequestTools
- type CreateThreadAndRunRequestToolsType
- type CreateThreadRequest
- type CreateThreadRequestMetadata
- type CreateTranscriptionRequest
- func (o *CreateTranscriptionRequest) GetFile() CreateTranscriptionRequestFile
- func (o *CreateTranscriptionRequest) GetLanguage() *string
- func (o *CreateTranscriptionRequest) GetModel() CreateTranscriptionRequestModel
- func (o *CreateTranscriptionRequest) GetPrompt() *string
- func (o *CreateTranscriptionRequest) GetResponseFormat() *CreateTranscriptionRequestResponseFormat
- func (o *CreateTranscriptionRequest) GetTemperature() *float64
- func (o *CreateTranscriptionRequest) GetTimestampGranularities() []TimestampGranularities
- func (c CreateTranscriptionRequest) MarshalJSON() ([]byte, error)
- func (c *CreateTranscriptionRequest) UnmarshalJSON(data []byte) error
- type CreateTranscriptionRequest2
- type CreateTranscriptionRequestFile
- type CreateTranscriptionRequestModel
- type CreateTranscriptionRequestModelType
- type CreateTranscriptionRequestResponseFormat
- type CreateTranscriptionResponse
- type CreateTranslationRequest
- func (o *CreateTranslationRequest) GetFile() CreateTranslationRequestFile
- func (o *CreateTranslationRequest) GetModel() CreateTranslationRequestModel
- func (o *CreateTranslationRequest) GetPrompt() *string
- func (o *CreateTranslationRequest) GetResponseFormat() *string
- func (o *CreateTranslationRequest) GetTemperature() *float64
- func (c CreateTranslationRequest) MarshalJSON() ([]byte, error)
- func (c *CreateTranslationRequest) UnmarshalJSON(data []byte) error
- type CreateTranslationRequest2
- type CreateTranslationRequestFile
- type CreateTranslationRequestModel
- type CreateTranslationRequestModelType
- type CreateTranslationResponse
- type DeleteAssistantFileResponse
- type DeleteAssistantFileResponseObject
- type DeleteAssistantResponse
- type DeleteAssistantResponseObject
- type DeleteFileResponse
- type DeleteFileResponseObject
- type DeleteModelResponse
- type DeleteThreadResponse
- type DeleteThreadResponseObject
- type Detail
- type Embedding
- type EmbeddingObject
- type EncodingFormat
- type Error
- type File
- type FileCitation
- type FilePath
- type FineTuningJob
- func (o *FineTuningJob) GetCreatedAt() int64
- func (o *FineTuningJob) GetError() *Error
- func (o *FineTuningJob) GetFineTunedModel() *string
- func (o *FineTuningJob) GetFinishedAt() *int64
- func (o *FineTuningJob) GetHyperparameters() FineTuningJobHyperparameters
- func (o *FineTuningJob) GetID() string
- func (o *FineTuningJob) GetModel() string
- func (o *FineTuningJob) GetObject() FineTuningJobObject
- func (o *FineTuningJob) GetOrganizationID() string
- func (o *FineTuningJob) GetResultFiles() []string
- func (o *FineTuningJob) GetStatus() Status
- func (o *FineTuningJob) GetTrainedTokens() *int64
- func (o *FineTuningJob) GetTrainingFile() string
- func (o *FineTuningJob) GetValidationFile() *string
- type FineTuningJob1
- type FineTuningJobEvent
- type FineTuningJobEventObject
- type FineTuningJobHyperparameters
- type FineTuningJobNEpochs
- type FineTuningJobNEpochsType
- type FineTuningJobObject
- type FinishReason
- type Function
- type FunctionCall
- type FunctionObject
- type Hyperparameters
- type Image
- type ImageFile
- type ImageURL
- type ImagesResponse
- type Input
- type InputType
- type LastError
- type LearningRateMultiplier
- type LearningRateMultiplierType
- type Level
- type ListAssistantFilesResponse
- type ListAssistantsResponse
- type ListFilesResponse
- type ListFilesResponseObject
- type ListFineTuningJobEventsResponse
- type ListFineTuningJobEventsResponseObject
- type ListMessageFilesResponse
- type ListMessagesResponse
- type ListModelsResponse
- type ListModelsResponseObject
- type ListPaginatedFineTuningJobsResponse
- type ListPaginatedFineTuningJobsResponseObject
- type ListRunStepsResponse
- type ListRunsResponse
- type Logprobs
- type Mask
- type MessageContentImageFileObject
- type MessageContentImageFileObjectType
- type MessageContentTextAnnotationsFileCitationObject
- func (o *MessageContentTextAnnotationsFileCitationObject) GetEndIndex() int64
- func (o *MessageContentTextAnnotationsFileCitationObject) GetFileCitation() FileCitation
- func (o *MessageContentTextAnnotationsFileCitationObject) GetStartIndex() int64
- func (o *MessageContentTextAnnotationsFileCitationObject) GetText() string
- func (o *MessageContentTextAnnotationsFileCitationObject) GetType() MessageContentTextAnnotationsFileCitationObjectType
- type MessageContentTextAnnotationsFileCitationObjectType
- type MessageContentTextAnnotationsFilePathObject
- func (o *MessageContentTextAnnotationsFilePathObject) GetEndIndex() int64
- func (o *MessageContentTextAnnotationsFilePathObject) GetFilePath() FilePath
- func (o *MessageContentTextAnnotationsFilePathObject) GetStartIndex() int64
- func (o *MessageContentTextAnnotationsFilePathObject) GetText() string
- func (o *MessageContentTextAnnotationsFilePathObject) GetType() MessageContentTextAnnotationsFilePathObjectType
- type MessageContentTextAnnotationsFilePathObjectType
- type MessageContentTextObject
- type MessageContentTextObjectType
- type MessageCreation
- type MessageFileObject
- type MessageFileObjectObject
- type MessageObject
- func (o *MessageObject) GetAssistantID() *string
- func (o *MessageObject) GetContent() []MessageObjectContent
- func (o *MessageObject) GetCreatedAt() int64
- func (o *MessageObject) GetFileIds() []string
- func (o *MessageObject) GetID() string
- func (o *MessageObject) GetMetadata() *MessageObjectMetadata
- func (o *MessageObject) GetObject() MessageObjectObject
- func (o *MessageObject) GetRole() MessageObjectRole
- func (o *MessageObject) GetRunID() *string
- func (o *MessageObject) GetThreadID() string
- type MessageObjectContent
- type MessageObjectContentType
- type MessageObjectMetadata
- type MessageObjectObject
- type MessageObjectRole
- type Metadata
- type Model
- type ModelObject
- type ModifyAssistantRequest
- func (o *ModifyAssistantRequest) GetDescription() *string
- func (o *ModifyAssistantRequest) GetFileIds() []string
- func (o *ModifyAssistantRequest) GetInstructions() *string
- func (o *ModifyAssistantRequest) GetMetadata() *ModifyAssistantRequestMetadata
- func (o *ModifyAssistantRequest) GetModel() *string
- func (o *ModifyAssistantRequest) GetName() *string
- func (o *ModifyAssistantRequest) GetTools() []ModifyAssistantRequestTools
- type ModifyAssistantRequestMetadata
- type ModifyAssistantRequestTools
- func CreateModifyAssistantRequestToolsAssistantToolsCode(assistantToolsCode AssistantToolsCode) ModifyAssistantRequestTools
- func CreateModifyAssistantRequestToolsAssistantToolsFunction(assistantToolsFunction AssistantToolsFunction) ModifyAssistantRequestTools
- func CreateModifyAssistantRequestToolsAssistantToolsRetrieval(assistantToolsRetrieval AssistantToolsRetrieval) ModifyAssistantRequestTools
- type ModifyAssistantRequestToolsType
- type ModifyMessageRequest
- type ModifyMessageRequestMetadata
- type ModifyRunRequest
- type ModifyRunRequestMetadata
- type ModifyThreadRequest
- type ModifyThreadRequestMetadata
- type NEpochs
- type NEpochsType
- type Object
- type One
- type OpenAIFile
- func (o *OpenAIFile) GetBytes() int64
- func (o *OpenAIFile) GetCreatedAt() int64
- func (o *OpenAIFile) GetFilename() string
- func (o *OpenAIFile) GetID() string
- func (o *OpenAIFile) GetObject() OpenAIFileObject
- func (o *OpenAIFile) GetPurpose() OpenAIFilePurpose
- func (o *OpenAIFile) GetStatus() OpenAIFileStatus
- func (o *OpenAIFile) GetStatusDetails() *string
- type OpenAIFileObject
- type OpenAIFilePurpose
- type OpenAIFileStatus
- type Outputs
- type OutputsType
- type Prompt
- type PromptType
- type Purpose
- type Quality
- type RequiredAction
- type ResponseFormat
- type Results
- type Retrieval
- type Role
- type RunCompletionUsage
- type RunObject
- func (o *RunObject) GetAssistantID() string
- func (o *RunObject) GetCancelledAt() *int64
- func (o *RunObject) GetCompletedAt() *int64
- func (o *RunObject) GetCreatedAt() int64
- func (o *RunObject) GetExpiresAt() int64
- func (o *RunObject) GetFailedAt() *int64
- func (o *RunObject) GetFileIds() []string
- func (o *RunObject) GetID() string
- func (o *RunObject) GetInstructions() string
- func (o *RunObject) GetLastError() *LastError
- func (o *RunObject) GetMetadata() *RunObjectMetadata
- func (o *RunObject) GetModel() string
- func (o *RunObject) GetObject() RunObjectObject
- func (o *RunObject) GetRequiredAction() *RequiredAction
- func (o *RunObject) GetStartedAt() *int64
- func (o *RunObject) GetStatus() RunObjectStatus
- func (o *RunObject) GetThreadID() string
- func (o *RunObject) GetTools() []RunObjectTools
- func (o *RunObject) GetUsage() *RunCompletionUsage
- type RunObjectMetadata
- type RunObjectObject
- type RunObjectStatus
- type RunObjectTools
- func CreateRunObjectToolsAssistantToolsCode(assistantToolsCode AssistantToolsCode) RunObjectTools
- func CreateRunObjectToolsAssistantToolsFunction(assistantToolsFunction AssistantToolsFunction) RunObjectTools
- func CreateRunObjectToolsAssistantToolsRetrieval(assistantToolsRetrieval AssistantToolsRetrieval) RunObjectTools
- type RunObjectToolsType
- type RunObjectType
- type RunStepCompletionUsage
- type RunStepDetailsMessageCreationObject
- type RunStepDetailsMessageCreationObjectType
- type RunStepDetailsToolCallsCodeObject
- type RunStepDetailsToolCallsCodeObjectType
- type RunStepDetailsToolCallsCodeOutputImageObject
- type RunStepDetailsToolCallsCodeOutputImageObjectImage
- type RunStepDetailsToolCallsCodeOutputImageObjectType
- type RunStepDetailsToolCallsCodeOutputLogsObject
- type RunStepDetailsToolCallsCodeOutputLogsObjectType
- type RunStepDetailsToolCallsFunctionObject
- type RunStepDetailsToolCallsFunctionObjectFunction
- type RunStepDetailsToolCallsFunctionObjectType
- type RunStepDetailsToolCallsObject
- type RunStepDetailsToolCallsObjectType
- type RunStepDetailsToolCallsRetrievalObject
- type RunStepDetailsToolCallsRetrievalObjectType
- type RunStepObject
- func (o *RunStepObject) GetAssistantID() string
- func (o *RunStepObject) GetCancelledAt() *int64
- func (o *RunStepObject) GetCompletedAt() *int64
- func (o *RunStepObject) GetCreatedAt() int64
- func (o *RunStepObject) GetExpiredAt() *int64
- func (o *RunStepObject) GetFailedAt() *int64
- func (o *RunStepObject) GetID() string
- func (o *RunStepObject) GetLastError() *RunStepObjectLastError
- func (o *RunStepObject) GetMetadata() *RunStepObjectMetadata
- func (o *RunStepObject) GetObject() RunStepObjectObject
- func (o *RunStepObject) GetRunID() string
- func (o *RunStepObject) GetStatus() RunStepObjectStatus
- func (o *RunStepObject) GetStepDetails() StepDetails
- func (o *RunStepObject) GetThreadID() string
- func (o *RunStepObject) GetType() RunStepObjectType
- func (o *RunStepObject) GetUsage() *RunStepCompletionUsage
- type RunStepObjectCode
- type RunStepObjectLastError
- type RunStepObjectMetadata
- type RunStepObjectObject
- type RunStepObjectStatus
- type RunStepObjectType
- type RunToolCallObject
- type RunToolCallObjectFunction
- type RunToolCallObjectType
- type Security
- type Size
- type Status
- type StepDetails
- type StepDetailsType
- type Stop
- type StopType
- type Style
- type SubmitToolOutputs
- type SubmitToolOutputsRunRequest
- type Text
- type ThreadObject
- type ThreadObjectMetadata
- type ThreadObjectObject
- type TimestampGranularities
- type ToolCalls
- func CreateToolCallsRunStepDetailsToolCallsCodeObject(runStepDetailsToolCallsCodeObject RunStepDetailsToolCallsCodeObject) ToolCalls
- func CreateToolCallsRunStepDetailsToolCallsFunctionObject(runStepDetailsToolCallsFunctionObject RunStepDetailsToolCallsFunctionObject) ToolCalls
- func CreateToolCallsRunStepDetailsToolCallsRetrievalObject(runStepDetailsToolCallsRetrievalObject RunStepDetailsToolCallsRetrievalObject) ToolCalls
- type ToolCallsType
- type ToolOutputs
- type Tools
- type ToolsType
- type TopLogprobs
- type Two
- type Type
- type Usage
- type Voice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotations ¶
type Annotations struct { MessageContentTextAnnotationsFileCitationObject *MessageContentTextAnnotationsFileCitationObject MessageContentTextAnnotationsFilePathObject *MessageContentTextAnnotationsFilePathObject Type AnnotationsType }
func CreateAnnotationsMessageContentTextAnnotationsFileCitationObject ¶
func CreateAnnotationsMessageContentTextAnnotationsFileCitationObject(messageContentTextAnnotationsFileCitationObject MessageContentTextAnnotationsFileCitationObject) Annotations
func CreateAnnotationsMessageContentTextAnnotationsFilePathObject ¶
func CreateAnnotationsMessageContentTextAnnotationsFilePathObject(messageContentTextAnnotationsFilePathObject MessageContentTextAnnotationsFilePathObject) Annotations
func (Annotations) MarshalJSON ¶
func (u Annotations) MarshalJSON() ([]byte, error)
func (*Annotations) UnmarshalJSON ¶
func (u *Annotations) UnmarshalJSON(data []byte) error
type AnnotationsType ¶
type AnnotationsType string
const ( AnnotationsTypeMessageContentTextAnnotationsFileCitationObject AnnotationsType = "MessageContentTextAnnotationsFileCitationObject" AnnotationsTypeMessageContentTextAnnotationsFilePathObject AnnotationsType = "MessageContentTextAnnotationsFilePathObject" )
type AssistantFileObject ¶
type AssistantFileObject struct { // The assistant ID that the file is attached to. AssistantID string `json:"assistant_id"` // The Unix timestamp (in seconds) for when the assistant file was created. CreatedAt int64 `json:"created_at"` // The identifier, which can be referenced in API endpoints. ID string `json:"id"` // The object type, which is always `assistant.file`. Object Object `json:"object"` }
AssistantFileObject - A list of [Files](/docs/api-reference/files) attached to an `assistant`.
func (*AssistantFileObject) GetAssistantID ¶
func (o *AssistantFileObject) GetAssistantID() string
func (*AssistantFileObject) GetCreatedAt ¶
func (o *AssistantFileObject) GetCreatedAt() int64
func (*AssistantFileObject) GetID ¶
func (o *AssistantFileObject) GetID() string
func (*AssistantFileObject) GetObject ¶
func (o *AssistantFileObject) GetObject() Object
type AssistantObject ¶
type AssistantObject struct { // The Unix timestamp (in seconds) for when the assistant was created. CreatedAt int64 `json:"created_at"` // The description of the assistant. The maximum length is 512 characters. // Description *string `json:"description"` // A list of [file](/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order. // FileIds []string `json:"file_ids"` // The identifier, which can be referenced in API endpoints. ID string `json:"id"` // The system instructions that the assistant uses. The maximum length is 32768 characters. // Instructions *string `json:"instructions"` // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *Metadata `json:"metadata"` // 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 name of the assistant. The maximum length is 256 characters. // Name *string `json:"name"` // The object type, which is always `assistant`. Object AssistantObjectObject `json:"object"` // A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`. // Tools []Tools `json:"tools"` }
AssistantObject - Represents an `assistant` that can call the model and use tools.
func (*AssistantObject) GetCreatedAt ¶
func (o *AssistantObject) GetCreatedAt() int64
func (*AssistantObject) GetDescription ¶
func (o *AssistantObject) GetDescription() *string
func (*AssistantObject) GetFileIds ¶
func (o *AssistantObject) GetFileIds() []string
func (*AssistantObject) GetID ¶
func (o *AssistantObject) GetID() string
func (*AssistantObject) GetInstructions ¶
func (o *AssistantObject) GetInstructions() *string
func (*AssistantObject) GetMetadata ¶
func (o *AssistantObject) GetMetadata() *Metadata
func (*AssistantObject) GetModel ¶
func (o *AssistantObject) GetModel() string
func (*AssistantObject) GetName ¶
func (o *AssistantObject) GetName() *string
func (*AssistantObject) GetObject ¶
func (o *AssistantObject) GetObject() AssistantObjectObject
func (*AssistantObject) GetTools ¶
func (o *AssistantObject) GetTools() []Tools
type AssistantObjectObject ¶
type AssistantObjectObject string
AssistantObjectObject - The object type, which is always `assistant`.
const (
AssistantObjectObjectAssistant AssistantObjectObject = "assistant"
)
func (AssistantObjectObject) ToPointer ¶
func (e AssistantObjectObject) ToPointer() *AssistantObjectObject
func (*AssistantObjectObject) UnmarshalJSON ¶
func (e *AssistantObjectObject) UnmarshalJSON(data []byte) error
type AssistantToolsCode ¶
type AssistantToolsCode struct { // The type of tool being defined: `code_interpreter` Type Type `json:"type"` }
func (*AssistantToolsCode) GetType ¶
func (o *AssistantToolsCode) GetType() Type
type AssistantToolsFunction ¶
type AssistantToolsFunction struct { Function FunctionObject `json:"function"` // The type of tool being defined: `function` Type AssistantToolsFunctionType `json:"type"` }
func (*AssistantToolsFunction) GetFunction ¶
func (o *AssistantToolsFunction) GetFunction() FunctionObject
func (*AssistantToolsFunction) GetType ¶
func (o *AssistantToolsFunction) GetType() AssistantToolsFunctionType
type AssistantToolsFunctionType ¶
type AssistantToolsFunctionType string
AssistantToolsFunctionType - The type of tool being defined: `function`
const (
AssistantToolsFunctionTypeFunction AssistantToolsFunctionType = "function"
)
func (AssistantToolsFunctionType) ToPointer ¶
func (e AssistantToolsFunctionType) ToPointer() *AssistantToolsFunctionType
func (*AssistantToolsFunctionType) UnmarshalJSON ¶
func (e *AssistantToolsFunctionType) UnmarshalJSON(data []byte) error
type AssistantToolsRetrieval ¶
type AssistantToolsRetrieval struct { // The type of tool being defined: `retrieval` Type AssistantToolsRetrievalType `json:"type"` }
func (*AssistantToolsRetrieval) GetType ¶
func (o *AssistantToolsRetrieval) GetType() AssistantToolsRetrievalType
type AssistantToolsRetrievalType ¶
type AssistantToolsRetrievalType string
AssistantToolsRetrievalType - The type of tool being defined: `retrieval`
const (
AssistantToolsRetrievalTypeRetrieval AssistantToolsRetrievalType = "retrieval"
)
func (AssistantToolsRetrievalType) ToPointer ¶
func (e AssistantToolsRetrievalType) ToPointer() *AssistantToolsRetrievalType
func (*AssistantToolsRetrievalType) UnmarshalJSON ¶
func (e *AssistantToolsRetrievalType) UnmarshalJSON(data []byte) error
type BatchSize ¶
type BatchSize struct { CreateFineTuningJobRequest1 *CreateFineTuningJobRequest1 Integer *int64 Type BatchSizeType }
BatchSize - Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
func CreateBatchSizeCreateFineTuningJobRequest1 ¶
func CreateBatchSizeCreateFineTuningJobRequest1(createFineTuningJobRequest1 CreateFineTuningJobRequest1) BatchSize
func CreateBatchSizeInteger ¶
func (BatchSize) MarshalJSON ¶
func (*BatchSize) UnmarshalJSON ¶
type BatchSizeType ¶
type BatchSizeType string
const ( BatchSizeTypeCreateFineTuningJobRequest1 BatchSizeType = "CreateFineTuningJobRequest_1" BatchSizeTypeInteger BatchSizeType = "integer" )
type Categories ¶
type Categories struct { // Content that expresses, incites, or promotes harassing language towards any target. Harassment bool `json:"harassment"` // Harassment content that also includes violence or serious harm towards any target. HarassmentThreatening bool `json:"harassment/threatening"` // Content that expresses, incites, or promotes hate based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. Hateful content aimed at non-protected groups (e.g., chess players) is harassment. Hate bool `json:"hate"` // Hateful content that also includes violence or serious harm towards the targeted group based on race, gender, ethnicity, religion, nationality, sexual orientation, disability status, or caste. HateThreatening bool `json:"hate/threatening"` // Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders. SelfHarm bool `json:"self-harm"` // Content that encourages performing acts of self-harm, such as suicide, cutting, and eating disorders, or that gives instructions or advice on how to commit such acts. SelfHarmInstructions bool `json:"self-harm/instructions"` // Content where the speaker expresses that they are engaging or intend to engage in acts of self-harm, such as suicide, cutting, and eating disorders. SelfHarmIntent bool `json:"self-harm/intent"` // Content meant to arouse sexual excitement, such as the description of sexual activity, or that promotes sexual services (excluding sex education and wellness). Sexual bool `json:"sexual"` // Sexual content that includes an individual who is under 18 years old. SexualMinors bool `json:"sexual/minors"` // Content that depicts death, violence, or physical injury. Violence bool `json:"violence"` // Content that depicts death, violence, or physical injury in graphic detail. ViolenceGraphic bool `json:"violence/graphic"` }
Categories - A list of the categories, and whether they are flagged or not.
func (*Categories) GetHarassment ¶
func (o *Categories) GetHarassment() bool
func (*Categories) GetHarassmentThreatening ¶
func (o *Categories) GetHarassmentThreatening() bool
func (*Categories) GetHate ¶
func (o *Categories) GetHate() bool
func (*Categories) GetHateThreatening ¶
func (o *Categories) GetHateThreatening() bool
func (*Categories) GetSelfHarm ¶
func (o *Categories) GetSelfHarm() bool
func (*Categories) GetSelfHarmInstructions ¶
func (o *Categories) GetSelfHarmInstructions() bool
func (*Categories) GetSelfHarmIntent ¶
func (o *Categories) GetSelfHarmIntent() bool
func (*Categories) GetSexual ¶
func (o *Categories) GetSexual() bool
func (*Categories) GetSexualMinors ¶
func (o *Categories) GetSexualMinors() bool
func (*Categories) GetViolence ¶
func (o *Categories) GetViolence() bool
func (*Categories) GetViolenceGraphic ¶
func (o *Categories) GetViolenceGraphic() bool
type CategoryScores ¶
type CategoryScores struct { // The score for the category 'harassment'. Harassment float64 `json:"harassment"` // The score for the category 'harassment/threatening'. HarassmentThreatening float64 `json:"harassment/threatening"` // The score for the category 'hate'. Hate float64 `json:"hate"` // The score for the category 'hate/threatening'. HateThreatening float64 `json:"hate/threatening"` // The score for the category 'self-harm'. SelfHarm float64 `json:"self-harm"` // The score for the category 'self-harm/instructions'. SelfHarmInstructions float64 `json:"self-harm/instructions"` // The score for the category 'self-harm/intent'. SelfHarmIntent float64 `json:"self-harm/intent"` // The score for the category 'sexual'. Sexual float64 `json:"sexual"` // The score for the category 'sexual/minors'. SexualMinors float64 `json:"sexual/minors"` // The score for the category 'violence'. Violence float64 `json:"violence"` // The score for the category 'violence/graphic'. ViolenceGraphic float64 `json:"violence/graphic"` }
CategoryScores - A list of the categories along with their scores as predicted by model.
func (*CategoryScores) GetHarassment ¶
func (o *CategoryScores) GetHarassment() float64
func (*CategoryScores) GetHarassmentThreatening ¶
func (o *CategoryScores) GetHarassmentThreatening() float64
func (*CategoryScores) GetHate ¶
func (o *CategoryScores) GetHate() float64
func (*CategoryScores) GetHateThreatening ¶
func (o *CategoryScores) GetHateThreatening() float64
func (*CategoryScores) GetSelfHarm ¶
func (o *CategoryScores) GetSelfHarm() float64
func (*CategoryScores) GetSelfHarmInstructions ¶
func (o *CategoryScores) GetSelfHarmInstructions() float64
func (*CategoryScores) GetSelfHarmIntent ¶
func (o *CategoryScores) GetSelfHarmIntent() float64
func (*CategoryScores) GetSexual ¶
func (o *CategoryScores) GetSexual() float64
func (*CategoryScores) GetSexualMinors ¶
func (o *CategoryScores) GetSexualMinors() float64
func (*CategoryScores) GetViolence ¶
func (o *CategoryScores) GetViolence() float64
func (*CategoryScores) GetViolenceGraphic ¶
func (o *CategoryScores) GetViolenceGraphic() float64
type ChatCompletionFunctionCallOption ¶
type ChatCompletionFunctionCallOption struct { // The name of the function to call. Name string `json:"name"` }
ChatCompletionFunctionCallOption - Specifying a particular function via `{"name": "my_function"}` forces the model to call that function.
func (*ChatCompletionFunctionCallOption) GetName ¶
func (o *ChatCompletionFunctionCallOption) GetName() string
type ChatCompletionFunctions ¶
type ChatCompletionFunctions struct { // A description of what the function does, used by the model to choose when and how to call the function. Description *string `json:"description,omitempty"` // The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. Name string `json:"name"` // The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. // // Omitting `parameters` defines a function with an empty parameter list. Parameters map[string]interface{} `json:"parameters,omitempty"` }
ChatCompletionFunctions
Deprecated type: This will be removed in a future release, please migrate away from it as soon as possible.
func (*ChatCompletionFunctions) GetDescription ¶
func (o *ChatCompletionFunctions) GetDescription() *string
func (*ChatCompletionFunctions) GetName ¶
func (o *ChatCompletionFunctions) GetName() string
func (*ChatCompletionFunctions) GetParameters ¶
func (o *ChatCompletionFunctions) GetParameters() map[string]interface{}
type ChatCompletionMessageToolCall ¶
type ChatCompletionMessageToolCall struct { // The function that the model called. Function Function `json:"function"` // The ID of the tool call. ID string `json:"id"` // The type of the tool. Currently, only `function` is supported. Type ChatCompletionMessageToolCallType `json:"type"` }
func (*ChatCompletionMessageToolCall) GetFunction ¶
func (o *ChatCompletionMessageToolCall) GetFunction() Function
func (*ChatCompletionMessageToolCall) GetID ¶
func (o *ChatCompletionMessageToolCall) GetID() string
func (*ChatCompletionMessageToolCall) GetType ¶
func (o *ChatCompletionMessageToolCall) GetType() ChatCompletionMessageToolCallType
type ChatCompletionMessageToolCallType ¶
type ChatCompletionMessageToolCallType string
ChatCompletionMessageToolCallType - The type of the tool. Currently, only `function` is supported.
const (
ChatCompletionMessageToolCallTypeFunction ChatCompletionMessageToolCallType = "function"
)
func (ChatCompletionMessageToolCallType) ToPointer ¶
func (e ChatCompletionMessageToolCallType) ToPointer() *ChatCompletionMessageToolCallType
func (*ChatCompletionMessageToolCallType) UnmarshalJSON ¶
func (e *ChatCompletionMessageToolCallType) UnmarshalJSON(data []byte) error
type ChatCompletionNamedToolChoice ¶
type ChatCompletionNamedToolChoice struct { Function ChatCompletionNamedToolChoiceFunction `json:"function"` // The type of the tool. Currently, only `function` is supported. Type ChatCompletionNamedToolChoiceType `json:"type"` }
ChatCompletionNamedToolChoice - Specifies a tool the model should use. Use to force the model to call a specific function.
func (*ChatCompletionNamedToolChoice) GetFunction ¶
func (o *ChatCompletionNamedToolChoice) GetFunction() ChatCompletionNamedToolChoiceFunction
func (*ChatCompletionNamedToolChoice) GetType ¶
func (o *ChatCompletionNamedToolChoice) GetType() ChatCompletionNamedToolChoiceType
type ChatCompletionNamedToolChoiceFunction ¶
type ChatCompletionNamedToolChoiceFunction struct { // The name of the function to call. Name string `json:"name"` }
func (*ChatCompletionNamedToolChoiceFunction) GetName ¶
func (o *ChatCompletionNamedToolChoiceFunction) GetName() string
type ChatCompletionNamedToolChoiceType ¶
type ChatCompletionNamedToolChoiceType string
ChatCompletionNamedToolChoiceType - The type of the tool. Currently, only `function` is supported.
const (
ChatCompletionNamedToolChoiceTypeFunction ChatCompletionNamedToolChoiceType = "function"
)
func (ChatCompletionNamedToolChoiceType) ToPointer ¶
func (e ChatCompletionNamedToolChoiceType) ToPointer() *ChatCompletionNamedToolChoiceType
func (*ChatCompletionNamedToolChoiceType) UnmarshalJSON ¶
func (e *ChatCompletionNamedToolChoiceType) UnmarshalJSON(data []byte) error
type ChatCompletionRequestAssistantMessage ¶
type ChatCompletionRequestAssistantMessage struct { // The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified. // Content *string `json:"content,omitempty"` // Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. // // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. FunctionCall *FunctionCall `json:"function_call,omitempty"` // An optional name for the participant. Provides the model information to differentiate between participants of the same role. Name *string `json:"name,omitempty"` // The role of the messages author, in this case `assistant`. Role Role `json:"role"` // The tool calls generated by the model, such as function calls. ToolCalls []ChatCompletionMessageToolCall `json:"tool_calls,omitempty"` }
func (*ChatCompletionRequestAssistantMessage) GetContent ¶
func (o *ChatCompletionRequestAssistantMessage) GetContent() *string
func (*ChatCompletionRequestAssistantMessage) GetFunctionCall ¶
func (o *ChatCompletionRequestAssistantMessage) GetFunctionCall() *FunctionCall
func (*ChatCompletionRequestAssistantMessage) GetName ¶
func (o *ChatCompletionRequestAssistantMessage) GetName() *string
func (*ChatCompletionRequestAssistantMessage) GetRole ¶
func (o *ChatCompletionRequestAssistantMessage) GetRole() Role
func (*ChatCompletionRequestAssistantMessage) GetToolCalls ¶
func (o *ChatCompletionRequestAssistantMessage) GetToolCalls() []ChatCompletionMessageToolCall
type ChatCompletionRequestFunctionMessage ¶
type ChatCompletionRequestFunctionMessage struct { // The contents of the function message. Content *string `json:"content"` // The name of the function to call. Name string `json:"name"` // The role of the messages author, in this case `function`. Role ChatCompletionRequestFunctionMessageRole `json:"role"` }
ChatCompletionRequestFunctionMessage
Deprecated type: This will be removed in a future release, please migrate away from it as soon as possible.
func (*ChatCompletionRequestFunctionMessage) GetContent ¶
func (o *ChatCompletionRequestFunctionMessage) GetContent() *string
func (*ChatCompletionRequestFunctionMessage) GetName ¶
func (o *ChatCompletionRequestFunctionMessage) GetName() string
func (*ChatCompletionRequestFunctionMessage) GetRole ¶
func (o *ChatCompletionRequestFunctionMessage) GetRole() ChatCompletionRequestFunctionMessageRole
type ChatCompletionRequestFunctionMessageRole ¶
type ChatCompletionRequestFunctionMessageRole string
ChatCompletionRequestFunctionMessageRole - The role of the messages author, in this case `function`.
const (
ChatCompletionRequestFunctionMessageRoleFunction ChatCompletionRequestFunctionMessageRole = "function"
)
func (ChatCompletionRequestFunctionMessageRole) ToPointer ¶
func (e ChatCompletionRequestFunctionMessageRole) ToPointer() *ChatCompletionRequestFunctionMessageRole
func (*ChatCompletionRequestFunctionMessageRole) UnmarshalJSON ¶
func (e *ChatCompletionRequestFunctionMessageRole) UnmarshalJSON(data []byte) error
type ChatCompletionRequestMessage ¶
type ChatCompletionRequestMessage struct { ChatCompletionRequestSystemMessage *ChatCompletionRequestSystemMessage ChatCompletionRequestUserMessage *ChatCompletionRequestUserMessage ChatCompletionRequestAssistantMessage *ChatCompletionRequestAssistantMessage ChatCompletionRequestToolMessage *ChatCompletionRequestToolMessage ChatCompletionRequestFunctionMessage *ChatCompletionRequestFunctionMessage Type ChatCompletionRequestMessageType }
func CreateChatCompletionRequestMessageChatCompletionRequestAssistantMessage ¶
func CreateChatCompletionRequestMessageChatCompletionRequestAssistantMessage(chatCompletionRequestAssistantMessage ChatCompletionRequestAssistantMessage) ChatCompletionRequestMessage
func CreateChatCompletionRequestMessageChatCompletionRequestFunctionMessage ¶
func CreateChatCompletionRequestMessageChatCompletionRequestFunctionMessage(chatCompletionRequestFunctionMessage ChatCompletionRequestFunctionMessage) ChatCompletionRequestMessage
func CreateChatCompletionRequestMessageChatCompletionRequestSystemMessage ¶
func CreateChatCompletionRequestMessageChatCompletionRequestSystemMessage(chatCompletionRequestSystemMessage ChatCompletionRequestSystemMessage) ChatCompletionRequestMessage
func CreateChatCompletionRequestMessageChatCompletionRequestToolMessage ¶
func CreateChatCompletionRequestMessageChatCompletionRequestToolMessage(chatCompletionRequestToolMessage ChatCompletionRequestToolMessage) ChatCompletionRequestMessage
func CreateChatCompletionRequestMessageChatCompletionRequestUserMessage ¶
func CreateChatCompletionRequestMessageChatCompletionRequestUserMessage(chatCompletionRequestUserMessage ChatCompletionRequestUserMessage) ChatCompletionRequestMessage
func (ChatCompletionRequestMessage) MarshalJSON ¶
func (u ChatCompletionRequestMessage) MarshalJSON() ([]byte, error)
func (*ChatCompletionRequestMessage) UnmarshalJSON ¶
func (u *ChatCompletionRequestMessage) UnmarshalJSON(data []byte) error
type ChatCompletionRequestMessageContentPart ¶
type ChatCompletionRequestMessageContentPart struct { ChatCompletionRequestMessageContentPartText *ChatCompletionRequestMessageContentPartText ChatCompletionRequestMessageContentPartImage *ChatCompletionRequestMessageContentPartImage Type ChatCompletionRequestMessageContentPartType }
func CreateChatCompletionRequestMessageContentPartChatCompletionRequestMessageContentPartImage ¶
func CreateChatCompletionRequestMessageContentPartChatCompletionRequestMessageContentPartImage(chatCompletionRequestMessageContentPartImage ChatCompletionRequestMessageContentPartImage) ChatCompletionRequestMessageContentPart
func CreateChatCompletionRequestMessageContentPartChatCompletionRequestMessageContentPartText ¶
func CreateChatCompletionRequestMessageContentPartChatCompletionRequestMessageContentPartText(chatCompletionRequestMessageContentPartText ChatCompletionRequestMessageContentPartText) ChatCompletionRequestMessageContentPart
func (ChatCompletionRequestMessageContentPart) MarshalJSON ¶
func (u ChatCompletionRequestMessageContentPart) MarshalJSON() ([]byte, error)
func (*ChatCompletionRequestMessageContentPart) UnmarshalJSON ¶
func (u *ChatCompletionRequestMessageContentPart) UnmarshalJSON(data []byte) error
type ChatCompletionRequestMessageContentPartImage ¶
type ChatCompletionRequestMessageContentPartImage struct { ImageURL ImageURL `json:"image_url"` // The type of the content part. Type ChatCompletionRequestMessageContentPartImageType `json:"type"` }
func (*ChatCompletionRequestMessageContentPartImage) GetImageURL ¶
func (o *ChatCompletionRequestMessageContentPartImage) GetImageURL() ImageURL
type ChatCompletionRequestMessageContentPartImageType ¶
type ChatCompletionRequestMessageContentPartImageType string
ChatCompletionRequestMessageContentPartImageType - The type of the content part.
const (
ChatCompletionRequestMessageContentPartImageTypeImageURL ChatCompletionRequestMessageContentPartImageType = "image_url"
)
func (*ChatCompletionRequestMessageContentPartImageType) UnmarshalJSON ¶
func (e *ChatCompletionRequestMessageContentPartImageType) UnmarshalJSON(data []byte) error
type ChatCompletionRequestMessageContentPartText ¶
type ChatCompletionRequestMessageContentPartText struct { // The text content. Text string `json:"text"` // The type of the content part. Type ChatCompletionRequestMessageContentPartTextType `json:"type"` }
func (*ChatCompletionRequestMessageContentPartText) GetText ¶
func (o *ChatCompletionRequestMessageContentPartText) GetText() string
type ChatCompletionRequestMessageContentPartTextType ¶
type ChatCompletionRequestMessageContentPartTextType string
ChatCompletionRequestMessageContentPartTextType - The type of the content part.
const (
ChatCompletionRequestMessageContentPartTextTypeText ChatCompletionRequestMessageContentPartTextType = "text"
)
func (*ChatCompletionRequestMessageContentPartTextType) UnmarshalJSON ¶
func (e *ChatCompletionRequestMessageContentPartTextType) UnmarshalJSON(data []byte) error
type ChatCompletionRequestMessageContentPartType ¶
type ChatCompletionRequestMessageContentPartType string
const ( ChatCompletionRequestMessageContentPartTypeChatCompletionRequestMessageContentPartText ChatCompletionRequestMessageContentPartType = "ChatCompletionRequestMessageContentPartText" ChatCompletionRequestMessageContentPartTypeChatCompletionRequestMessageContentPartImage ChatCompletionRequestMessageContentPartType = "ChatCompletionRequestMessageContentPartImage" )
type ChatCompletionRequestMessageType ¶
type ChatCompletionRequestMessageType string
const ( ChatCompletionRequestMessageTypeChatCompletionRequestSystemMessage ChatCompletionRequestMessageType = "ChatCompletionRequestSystemMessage" ChatCompletionRequestMessageTypeChatCompletionRequestUserMessage ChatCompletionRequestMessageType = "ChatCompletionRequestUserMessage" ChatCompletionRequestMessageTypeChatCompletionRequestAssistantMessage ChatCompletionRequestMessageType = "ChatCompletionRequestAssistantMessage" ChatCompletionRequestMessageTypeChatCompletionRequestToolMessage ChatCompletionRequestMessageType = "ChatCompletionRequestToolMessage" ChatCompletionRequestMessageTypeChatCompletionRequestFunctionMessage ChatCompletionRequestMessageType = "ChatCompletionRequestFunctionMessage" )
type ChatCompletionRequestSystemMessage ¶
type ChatCompletionRequestSystemMessage struct { // The contents of the system message. Content string `json:"content"` // An optional name for the participant. Provides the model information to differentiate between participants of the same role. Name *string `json:"name,omitempty"` // The role of the messages author, in this case `system`. Role ChatCompletionRequestSystemMessageRole `json:"role"` }
func (*ChatCompletionRequestSystemMessage) GetContent ¶
func (o *ChatCompletionRequestSystemMessage) GetContent() string
func (*ChatCompletionRequestSystemMessage) GetName ¶
func (o *ChatCompletionRequestSystemMessage) GetName() *string
func (*ChatCompletionRequestSystemMessage) GetRole ¶
func (o *ChatCompletionRequestSystemMessage) GetRole() ChatCompletionRequestSystemMessageRole
type ChatCompletionRequestSystemMessageRole ¶
type ChatCompletionRequestSystemMessageRole string
ChatCompletionRequestSystemMessageRole - The role of the messages author, in this case `system`.
const (
ChatCompletionRequestSystemMessageRoleSystem ChatCompletionRequestSystemMessageRole = "system"
)
func (ChatCompletionRequestSystemMessageRole) ToPointer ¶
func (e ChatCompletionRequestSystemMessageRole) ToPointer() *ChatCompletionRequestSystemMessageRole
func (*ChatCompletionRequestSystemMessageRole) UnmarshalJSON ¶
func (e *ChatCompletionRequestSystemMessageRole) UnmarshalJSON(data []byte) error
type ChatCompletionRequestToolMessage ¶
type ChatCompletionRequestToolMessage struct { // The contents of the tool message. Content string `json:"content"` // The role of the messages author, in this case `tool`. Role ChatCompletionRequestToolMessageRole `json:"role"` // Tool call that this message is responding to. ToolCallID string `json:"tool_call_id"` }
func (*ChatCompletionRequestToolMessage) GetContent ¶
func (o *ChatCompletionRequestToolMessage) GetContent() string
func (*ChatCompletionRequestToolMessage) GetRole ¶
func (o *ChatCompletionRequestToolMessage) GetRole() ChatCompletionRequestToolMessageRole
func (*ChatCompletionRequestToolMessage) GetToolCallID ¶
func (o *ChatCompletionRequestToolMessage) GetToolCallID() string
type ChatCompletionRequestToolMessageRole ¶
type ChatCompletionRequestToolMessageRole string
ChatCompletionRequestToolMessageRole - The role of the messages author, in this case `tool`.
const (
ChatCompletionRequestToolMessageRoleTool ChatCompletionRequestToolMessageRole = "tool"
)
func (ChatCompletionRequestToolMessageRole) ToPointer ¶
func (e ChatCompletionRequestToolMessageRole) ToPointer() *ChatCompletionRequestToolMessageRole
func (*ChatCompletionRequestToolMessageRole) UnmarshalJSON ¶
func (e *ChatCompletionRequestToolMessageRole) UnmarshalJSON(data []byte) error
type ChatCompletionRequestUserMessage ¶
type ChatCompletionRequestUserMessage struct { // The contents of the user message. // Content Content `json:"content"` // An optional name for the participant. Provides the model information to differentiate between participants of the same role. Name *string `json:"name,omitempty"` // The role of the messages author, in this case `user`. Role ChatCompletionRequestUserMessageRole `json:"role"` }
func (*ChatCompletionRequestUserMessage) GetContent ¶
func (o *ChatCompletionRequestUserMessage) GetContent() Content
func (*ChatCompletionRequestUserMessage) GetName ¶
func (o *ChatCompletionRequestUserMessage) GetName() *string
func (*ChatCompletionRequestUserMessage) GetRole ¶
func (o *ChatCompletionRequestUserMessage) GetRole() ChatCompletionRequestUserMessageRole
type ChatCompletionRequestUserMessageRole ¶
type ChatCompletionRequestUserMessageRole string
ChatCompletionRequestUserMessageRole - The role of the messages author, in this case `user`.
const (
ChatCompletionRequestUserMessageRoleUser ChatCompletionRequestUserMessageRole = "user"
)
func (ChatCompletionRequestUserMessageRole) ToPointer ¶
func (e ChatCompletionRequestUserMessageRole) ToPointer() *ChatCompletionRequestUserMessageRole
func (*ChatCompletionRequestUserMessageRole) UnmarshalJSON ¶
func (e *ChatCompletionRequestUserMessageRole) UnmarshalJSON(data []byte) error
type ChatCompletionResponseMessage ¶
type ChatCompletionResponseMessage struct { // The contents of the message. Content *string `json:"content"` // Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. // // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. FunctionCall *ChatCompletionResponseMessageFunctionCall `json:"function_call,omitempty"` // The role of the author of this message. Role ChatCompletionResponseMessageRole `json:"role"` // The tool calls generated by the model, such as function calls. ToolCalls []ChatCompletionMessageToolCall `json:"tool_calls,omitempty"` }
ChatCompletionResponseMessage - A chat completion message generated by the model.
func (*ChatCompletionResponseMessage) GetContent ¶
func (o *ChatCompletionResponseMessage) GetContent() *string
func (*ChatCompletionResponseMessage) GetFunctionCall ¶
func (o *ChatCompletionResponseMessage) GetFunctionCall() *ChatCompletionResponseMessageFunctionCall
func (*ChatCompletionResponseMessage) GetRole ¶
func (o *ChatCompletionResponseMessage) GetRole() ChatCompletionResponseMessageRole
func (*ChatCompletionResponseMessage) GetToolCalls ¶
func (o *ChatCompletionResponseMessage) GetToolCalls() []ChatCompletionMessageToolCall
type ChatCompletionResponseMessageFunctionCall ¶
type ChatCompletionResponseMessageFunctionCall struct { // The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. Arguments string `json:"arguments"` // The name of the function to call. Name string `json:"name"` }
ChatCompletionResponseMessageFunctionCall - Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.
Deprecated type: This will be removed in a future release, please migrate away from it as soon as possible.
func (*ChatCompletionResponseMessageFunctionCall) GetArguments ¶
func (o *ChatCompletionResponseMessageFunctionCall) GetArguments() string
func (*ChatCompletionResponseMessageFunctionCall) GetName ¶
func (o *ChatCompletionResponseMessageFunctionCall) GetName() string
type ChatCompletionResponseMessageRole ¶
type ChatCompletionResponseMessageRole string
ChatCompletionResponseMessageRole - The role of the author of this message.
const (
ChatCompletionResponseMessageRoleAssistant ChatCompletionResponseMessageRole = "assistant"
)
func (ChatCompletionResponseMessageRole) ToPointer ¶
func (e ChatCompletionResponseMessageRole) ToPointer() *ChatCompletionResponseMessageRole
func (*ChatCompletionResponseMessageRole) UnmarshalJSON ¶
func (e *ChatCompletionResponseMessageRole) UnmarshalJSON(data []byte) error
type ChatCompletionTokenLogprob ¶
type ChatCompletionTokenLogprob struct { // A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. Bytes []int64 `json:"bytes"` // The log probability of this token. Logprob float64 `json:"logprob"` // The token. Token string `json:"token"` // List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned. TopLogprobs []TopLogprobs `json:"top_logprobs"` }
func (*ChatCompletionTokenLogprob) GetBytes ¶
func (o *ChatCompletionTokenLogprob) GetBytes() []int64
func (*ChatCompletionTokenLogprob) GetLogprob ¶
func (o *ChatCompletionTokenLogprob) GetLogprob() float64
func (*ChatCompletionTokenLogprob) GetToken ¶
func (o *ChatCompletionTokenLogprob) GetToken() string
func (*ChatCompletionTokenLogprob) GetTopLogprobs ¶
func (o *ChatCompletionTokenLogprob) GetTopLogprobs() []TopLogprobs
type ChatCompletionTool ¶
type ChatCompletionTool struct { Function FunctionObject `json:"function"` // The type of the tool. Currently, only `function` is supported. Type ChatCompletionToolType `json:"type"` }
func (*ChatCompletionTool) GetFunction ¶
func (o *ChatCompletionTool) GetFunction() FunctionObject
func (*ChatCompletionTool) GetType ¶
func (o *ChatCompletionTool) GetType() ChatCompletionToolType
type ChatCompletionToolChoiceOption ¶
type ChatCompletionToolChoiceOption struct { One *One ChatCompletionNamedToolChoice *ChatCompletionNamedToolChoice Type ChatCompletionToolChoiceOptionType }
ChatCompletionToolChoiceOption - Controls which (if any) function is called by the model. `none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function. Specifying a particular function via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that function.
`none` is the default when no functions are present. `auto` is the default if functions are present.
func CreateChatCompletionToolChoiceOptionChatCompletionNamedToolChoice ¶
func CreateChatCompletionToolChoiceOptionChatCompletionNamedToolChoice(chatCompletionNamedToolChoice ChatCompletionNamedToolChoice) ChatCompletionToolChoiceOption
func CreateChatCompletionToolChoiceOptionOne ¶
func CreateChatCompletionToolChoiceOptionOne(one One) ChatCompletionToolChoiceOption
func (ChatCompletionToolChoiceOption) MarshalJSON ¶
func (u ChatCompletionToolChoiceOption) MarshalJSON() ([]byte, error)
func (*ChatCompletionToolChoiceOption) UnmarshalJSON ¶
func (u *ChatCompletionToolChoiceOption) UnmarshalJSON(data []byte) error
type ChatCompletionToolChoiceOptionType ¶
type ChatCompletionToolChoiceOptionType string
const ( ChatCompletionToolChoiceOptionTypeOne ChatCompletionToolChoiceOptionType = "1" ChatCompletionToolChoiceOptionTypeChatCompletionNamedToolChoice ChatCompletionToolChoiceOptionType = "ChatCompletionNamedToolChoice" )
type ChatCompletionToolType ¶
type ChatCompletionToolType string
ChatCompletionToolType - The type of the tool. Currently, only `function` is supported.
const (
ChatCompletionToolTypeFunction ChatCompletionToolType = "function"
)
func (ChatCompletionToolType) ToPointer ¶
func (e ChatCompletionToolType) ToPointer() *ChatCompletionToolType
func (*ChatCompletionToolType) UnmarshalJSON ¶
func (e *ChatCompletionToolType) UnmarshalJSON(data []byte) error
type Choices ¶
type Choices struct { // The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, // `length` if the maximum number of tokens specified in the request was reached, // `content_filter` if content was omitted due to a flag from our content filters, // `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function. // FinishReason FinishReason `json:"finish_reason"` // The index of the choice in the list of choices. Index int64 `json:"index"` // Log probability information for the choice. Logprobs *Logprobs `json:"logprobs"` // A chat completion message generated by the model. Message ChatCompletionResponseMessage `json:"message"` }
func (*Choices) GetFinishReason ¶
func (o *Choices) GetFinishReason() FinishReason
func (*Choices) GetLogprobs ¶
func (*Choices) GetMessage ¶
func (o *Choices) GetMessage() ChatCompletionResponseMessage
type Code ¶
type Code string
Code - One of `server_error` or `rate_limit_exceeded`.
func (*Code) UnmarshalJSON ¶
type CodeInterpreter ¶
type CodeInterpreter struct { // The input to the Code Interpreter tool call. Input string `json:"input"` // The outputs from the Code Interpreter tool call. Code Interpreter can output one or more items, including text (`logs`) or images (`image`). Each of these are represented by a different object type. Outputs []Outputs `json:"outputs"` }
CodeInterpreter - The Code Interpreter tool call definition.
func (*CodeInterpreter) GetInput ¶
func (o *CodeInterpreter) GetInput() string
func (*CodeInterpreter) GetOutputs ¶
func (o *CodeInterpreter) GetOutputs() []Outputs
type CompletionUsage ¶
type CompletionUsage struct { // Number of tokens in the generated completion. CompletionTokens int64 `json:"completion_tokens"` // Number of tokens in the prompt. PromptTokens int64 `json:"prompt_tokens"` // Total number of tokens used in the request (prompt + completion). TotalTokens int64 `json:"total_tokens"` }
CompletionUsage - Usage statistics for the completion request.
func (*CompletionUsage) GetCompletionTokens ¶
func (o *CompletionUsage) GetCompletionTokens() int64
func (*CompletionUsage) GetPromptTokens ¶
func (o *CompletionUsage) GetPromptTokens() int64
func (*CompletionUsage) GetTotalTokens ¶
func (o *CompletionUsage) GetTotalTokens() int64
type Content ¶
type Content struct { Str *string ArrayOfChatCompletionRequestMessageContentPart []ChatCompletionRequestMessageContentPart Type ContentType }
Content - The contents of the user message.
func CreateContentArrayOfChatCompletionRequestMessageContentPart ¶
func CreateContentArrayOfChatCompletionRequestMessageContentPart(arrayOfChatCompletionRequestMessageContentPart []ChatCompletionRequestMessageContentPart) Content
func CreateContentStr ¶
func (Content) MarshalJSON ¶
func (*Content) UnmarshalJSON ¶
type ContentType ¶
type ContentType string
const ( ContentTypeStr ContentType = "str" ContentTypeArrayOfChatCompletionRequestMessageContentPart ContentType = "arrayOfChatCompletionRequestMessageContentPart" )
type CreateAssistantFileRequest ¶
type CreateAssistantFileRequest struct { // A [File](/docs/api-reference/files) ID (with `purpose="assistants"`) that the assistant should use. Useful for tools like `retrieval` and `code_interpreter` that can access files. FileID string `json:"file_id"` }
func (*CreateAssistantFileRequest) GetFileID ¶
func (o *CreateAssistantFileRequest) GetFileID() string
type CreateAssistantRequest ¶
type CreateAssistantRequest struct { // The description of the assistant. The maximum length is 512 characters. // Description *string `json:"description,omitempty"` // A list of [file](/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order. // FileIds []string `json:"file_ids,omitempty"` // The system instructions that the assistant uses. The maximum length is 32768 characters. // Instructions *string `json:"instructions,omitempty"` // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *CreateAssistantRequestMetadata `json:"metadata,omitempty"` // 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 name of the assistant. The maximum length is 256 characters. // Name *string `json:"name,omitempty"` // A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`. // Tools []CreateAssistantRequestTools `json:"tools,omitempty"` }
func (*CreateAssistantRequest) GetDescription ¶
func (o *CreateAssistantRequest) GetDescription() *string
func (*CreateAssistantRequest) GetFileIds ¶
func (o *CreateAssistantRequest) GetFileIds() []string
func (*CreateAssistantRequest) GetInstructions ¶
func (o *CreateAssistantRequest) GetInstructions() *string
func (*CreateAssistantRequest) GetMetadata ¶
func (o *CreateAssistantRequest) GetMetadata() *CreateAssistantRequestMetadata
func (*CreateAssistantRequest) GetModel ¶
func (o *CreateAssistantRequest) GetModel() string
func (*CreateAssistantRequest) GetName ¶
func (o *CreateAssistantRequest) GetName() *string
func (*CreateAssistantRequest) GetTools ¶
func (o *CreateAssistantRequest) GetTools() []CreateAssistantRequestTools
type CreateAssistantRequestMetadata ¶
type CreateAssistantRequestMetadata struct { }
CreateAssistantRequestMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type CreateAssistantRequestTools ¶
type CreateAssistantRequestTools struct { AssistantToolsCode *AssistantToolsCode AssistantToolsRetrieval *AssistantToolsRetrieval AssistantToolsFunction *AssistantToolsFunction Type CreateAssistantRequestToolsType }
func CreateCreateAssistantRequestToolsAssistantToolsCode ¶
func CreateCreateAssistantRequestToolsAssistantToolsCode(assistantToolsCode AssistantToolsCode) CreateAssistantRequestTools
func CreateCreateAssistantRequestToolsAssistantToolsFunction ¶
func CreateCreateAssistantRequestToolsAssistantToolsFunction(assistantToolsFunction AssistantToolsFunction) CreateAssistantRequestTools
func CreateCreateAssistantRequestToolsAssistantToolsRetrieval ¶
func CreateCreateAssistantRequestToolsAssistantToolsRetrieval(assistantToolsRetrieval AssistantToolsRetrieval) CreateAssistantRequestTools
func (CreateAssistantRequestTools) MarshalJSON ¶
func (u CreateAssistantRequestTools) MarshalJSON() ([]byte, error)
func (*CreateAssistantRequestTools) UnmarshalJSON ¶
func (u *CreateAssistantRequestTools) UnmarshalJSON(data []byte) error
type CreateAssistantRequestToolsType ¶
type CreateAssistantRequestToolsType string
const ( CreateAssistantRequestToolsTypeAssistantToolsCode CreateAssistantRequestToolsType = "AssistantToolsCode" CreateAssistantRequestToolsTypeAssistantToolsRetrieval CreateAssistantRequestToolsType = "AssistantToolsRetrieval" CreateAssistantRequestToolsTypeAssistantToolsFunction CreateAssistantRequestToolsType = "AssistantToolsFunction" )
type CreateChatCompletionRequest ¶
type CreateChatCompletionRequest struct { // 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/guides/text-generation/parameter-details) // FrequencyPenalty *float64 `default:"0" json:"frequency_penalty"` // Deprecated in favor of `tool_choice`. // // Controls which (if any) function is called by the model. // `none` means the model will not call a function and instead generates a message. // `auto` means the model can pick between generating a message or calling a function. // Specifying a particular function via `{"name": "my_function"}` forces the model to call that function. // // `none` is the default when no functions are present. `auto` is the default if functions are present. // // // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. FunctionCall *CreateChatCompletionRequestFunctionCall `json:"function_call,omitempty"` // Deprecated in favor of `tools`. // // A list of functions the model may generate JSON inputs for. // // // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. Functions []ChatCompletionFunctions `json:"functions,omitempty"` // 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 map[string]int64 `json:"logit_bias,omitempty"` // Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`. This option is currently not available on the `gpt-4-vision-preview` model. Logprobs *bool `default:"false" json:"logprobs"` // The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. // // The total length of input tokens and generated tokens is limited by the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. // MaxTokens *int64 `json:"max_tokens,omitempty"` // A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models). Messages []ChatCompletionRequestMessage `json:"messages"` // ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API. Model CreateChatCompletionRequestModel `json:"model"` // How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs. N *int64 `default:"1" json:"n"` // 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/guides/text-generation/parameter-details) // PresencePenalty *float64 `default:"0" json:"presence_penalty"` // An object specifying the format that the model must output. Compatible with [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`. // // Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON. // // **Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length. // ResponseFormat *ResponseFormat `json:"response_format,omitempty"` // This feature is in Beta. // If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. // Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. // Seed *int64 `json:"seed,omitempty"` // Up to 4 sequences where the API will stop generating further tokens. // Stop *Stop `json:"stop,omitempty"` // 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. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). // Stream *bool `default:"false" json:"stream"` // 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 *float64 `default:"1" json:"temperature"` // Controls which (if any) function is called by the model. // `none` means the model will not call a function and instead generates a message. // `auto` means the model can pick between generating a message or calling a function. // Specifying a particular function via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that function. // // `none` is the default when no functions are present. `auto` is the default if functions are present. // ToolChoice *ChatCompletionToolChoiceOption `json:"tool_choice,omitempty"` // A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. // Tools []ChatCompletionTool `json:"tools,omitempty"` // An integer between 0 and 5 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used. TopLogprobs *int64 `json:"top_logprobs,omitempty"` // 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 *float64 `default:"1" json:"top_p"` // 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 *string `json:"user,omitempty"` }
func (*CreateChatCompletionRequest) GetFrequencyPenalty ¶
func (o *CreateChatCompletionRequest) GetFrequencyPenalty() *float64
func (*CreateChatCompletionRequest) GetFunctionCall ¶
func (o *CreateChatCompletionRequest) GetFunctionCall() *CreateChatCompletionRequestFunctionCall
func (*CreateChatCompletionRequest) GetFunctions ¶
func (o *CreateChatCompletionRequest) GetFunctions() []ChatCompletionFunctions
func (*CreateChatCompletionRequest) GetLogitBias ¶
func (o *CreateChatCompletionRequest) GetLogitBias() map[string]int64
func (*CreateChatCompletionRequest) GetLogprobs ¶
func (o *CreateChatCompletionRequest) GetLogprobs() *bool
func (*CreateChatCompletionRequest) GetMaxTokens ¶
func (o *CreateChatCompletionRequest) GetMaxTokens() *int64
func (*CreateChatCompletionRequest) GetMessages ¶
func (o *CreateChatCompletionRequest) GetMessages() []ChatCompletionRequestMessage
func (*CreateChatCompletionRequest) GetModel ¶
func (o *CreateChatCompletionRequest) GetModel() CreateChatCompletionRequestModel
func (*CreateChatCompletionRequest) GetN ¶
func (o *CreateChatCompletionRequest) GetN() *int64
func (*CreateChatCompletionRequest) GetPresencePenalty ¶
func (o *CreateChatCompletionRequest) GetPresencePenalty() *float64
func (*CreateChatCompletionRequest) GetResponseFormat ¶
func (o *CreateChatCompletionRequest) GetResponseFormat() *ResponseFormat
func (*CreateChatCompletionRequest) GetSeed ¶
func (o *CreateChatCompletionRequest) GetSeed() *int64
func (*CreateChatCompletionRequest) GetStop ¶
func (o *CreateChatCompletionRequest) GetStop() *Stop
func (*CreateChatCompletionRequest) GetStream ¶
func (o *CreateChatCompletionRequest) GetStream() *bool
func (*CreateChatCompletionRequest) GetTemperature ¶
func (o *CreateChatCompletionRequest) GetTemperature() *float64
func (*CreateChatCompletionRequest) GetToolChoice ¶
func (o *CreateChatCompletionRequest) GetToolChoice() *ChatCompletionToolChoiceOption
func (*CreateChatCompletionRequest) GetTools ¶
func (o *CreateChatCompletionRequest) GetTools() []ChatCompletionTool
func (*CreateChatCompletionRequest) GetTopLogprobs ¶
func (o *CreateChatCompletionRequest) GetTopLogprobs() *int64
func (*CreateChatCompletionRequest) GetTopP ¶
func (o *CreateChatCompletionRequest) GetTopP() *float64
func (*CreateChatCompletionRequest) GetUser ¶
func (o *CreateChatCompletionRequest) GetUser() *string
func (CreateChatCompletionRequest) MarshalJSON ¶
func (c CreateChatCompletionRequest) MarshalJSON() ([]byte, error)
func (*CreateChatCompletionRequest) UnmarshalJSON ¶
func (c *CreateChatCompletionRequest) UnmarshalJSON(data []byte) error
type CreateChatCompletionRequest1 ¶
type CreateChatCompletionRequest1 string
CreateChatCompletionRequest1 - `none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.
const ( CreateChatCompletionRequest1None CreateChatCompletionRequest1 = "none" CreateChatCompletionRequest1Auto CreateChatCompletionRequest1 = "auto" )
func (CreateChatCompletionRequest1) ToPointer ¶
func (e CreateChatCompletionRequest1) ToPointer() *CreateChatCompletionRequest1
func (*CreateChatCompletionRequest1) UnmarshalJSON ¶
func (e *CreateChatCompletionRequest1) UnmarshalJSON(data []byte) error
type CreateChatCompletionRequestFunctionCall ¶
type CreateChatCompletionRequestFunctionCall struct { CreateChatCompletionRequest1 *CreateChatCompletionRequest1 ChatCompletionFunctionCallOption *ChatCompletionFunctionCallOption Type CreateChatCompletionRequestFunctionCallType }
CreateChatCompletionRequestFunctionCall - Deprecated in favor of `tool_choice`.
Controls which (if any) function is called by the model. `none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function. Specifying a particular function via `{"name": "my_function"}` forces the model to call that function.
`none` is the default when no functions are present. `auto` is the default if functions are present.
Deprecated type: This will be removed in a future release, please migrate away from it as soon as possible.
func CreateCreateChatCompletionRequestFunctionCallChatCompletionFunctionCallOption ¶
func CreateCreateChatCompletionRequestFunctionCallChatCompletionFunctionCallOption(chatCompletionFunctionCallOption ChatCompletionFunctionCallOption) CreateChatCompletionRequestFunctionCall
func CreateCreateChatCompletionRequestFunctionCallCreateChatCompletionRequest1 ¶
func CreateCreateChatCompletionRequestFunctionCallCreateChatCompletionRequest1(createChatCompletionRequest1 CreateChatCompletionRequest1) CreateChatCompletionRequestFunctionCall
func (CreateChatCompletionRequestFunctionCall) MarshalJSON ¶
func (u CreateChatCompletionRequestFunctionCall) MarshalJSON() ([]byte, error)
func (*CreateChatCompletionRequestFunctionCall) UnmarshalJSON ¶
func (u *CreateChatCompletionRequestFunctionCall) UnmarshalJSON(data []byte) error
type CreateChatCompletionRequestFunctionCallType ¶
type CreateChatCompletionRequestFunctionCallType string
const ( CreateChatCompletionRequestFunctionCallTypeCreateChatCompletionRequest1 CreateChatCompletionRequestFunctionCallType = "CreateChatCompletionRequest_1" CreateChatCompletionRequestFunctionCallTypeChatCompletionFunctionCallOption CreateChatCompletionRequestFunctionCallType = "ChatCompletionFunctionCallOption" )
type CreateChatCompletionRequestModel ¶
type CreateChatCompletionRequestModel struct { Str *string Two *Two Type CreateChatCompletionRequestModelType }
CreateChatCompletionRequestModel - ID of the model to use. See the [model endpoint compatibility](/docs/models/model-endpoint-compatibility) table for details on which models work with the Chat API.
func CreateCreateChatCompletionRequestModelStr ¶
func CreateCreateChatCompletionRequestModelStr(str string) CreateChatCompletionRequestModel
func CreateCreateChatCompletionRequestModelTwo ¶
func CreateCreateChatCompletionRequestModelTwo(two Two) CreateChatCompletionRequestModel
func (CreateChatCompletionRequestModel) MarshalJSON ¶
func (u CreateChatCompletionRequestModel) MarshalJSON() ([]byte, error)
func (*CreateChatCompletionRequestModel) UnmarshalJSON ¶
func (u *CreateChatCompletionRequestModel) UnmarshalJSON(data []byte) error
type CreateChatCompletionRequestModelType ¶
type CreateChatCompletionRequestModelType string
const ( CreateChatCompletionRequestModelTypeStr CreateChatCompletionRequestModelType = "str" CreateChatCompletionRequestModelTypeTwo CreateChatCompletionRequestModelType = "2" )
type CreateChatCompletionRequestType ¶
type CreateChatCompletionRequestType string
CreateChatCompletionRequestType - Must be one of `text` or `json_object`.
const ( CreateChatCompletionRequestTypeText CreateChatCompletionRequestType = "text" CreateChatCompletionRequestTypeJSONObject CreateChatCompletionRequestType = "json_object" )
func (CreateChatCompletionRequestType) ToPointer ¶
func (e CreateChatCompletionRequestType) ToPointer() *CreateChatCompletionRequestType
func (*CreateChatCompletionRequestType) UnmarshalJSON ¶
func (e *CreateChatCompletionRequestType) UnmarshalJSON(data []byte) error
type CreateChatCompletionResponse ¶
type CreateChatCompletionResponse struct { // A list of chat completion choices. Can be more than one if `n` is greater than 1. Choices []Choices `json:"choices"` // The Unix timestamp (in seconds) of when the chat completion was created. Created int64 `json:"created"` // A unique identifier for the chat completion. ID string `json:"id"` // The model used for the chat completion. Model string `json:"model"` // The object type, which is always `chat.completion`. Object CreateChatCompletionResponseObject `json:"object"` // This fingerprint represents the backend configuration that the model runs with. // // Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism. // SystemFingerprint *string `json:"system_fingerprint,omitempty"` // Usage statistics for the completion request. Usage *CompletionUsage `json:"usage,omitempty"` }
CreateChatCompletionResponse - Represents a chat completion response returned by model, based on the provided input.
func (*CreateChatCompletionResponse) GetChoices ¶
func (o *CreateChatCompletionResponse) GetChoices() []Choices
func (*CreateChatCompletionResponse) GetCreated ¶
func (o *CreateChatCompletionResponse) GetCreated() int64
func (*CreateChatCompletionResponse) GetID ¶
func (o *CreateChatCompletionResponse) GetID() string
func (*CreateChatCompletionResponse) GetModel ¶
func (o *CreateChatCompletionResponse) GetModel() string
func (*CreateChatCompletionResponse) GetObject ¶
func (o *CreateChatCompletionResponse) GetObject() CreateChatCompletionResponseObject
func (*CreateChatCompletionResponse) GetSystemFingerprint ¶
func (o *CreateChatCompletionResponse) GetSystemFingerprint() *string
func (*CreateChatCompletionResponse) GetUsage ¶
func (o *CreateChatCompletionResponse) GetUsage() *CompletionUsage
type CreateChatCompletionResponseObject ¶
type CreateChatCompletionResponseObject string
CreateChatCompletionResponseObject - The object type, which is always `chat.completion`.
const (
CreateChatCompletionResponseObjectChatCompletion CreateChatCompletionResponseObject = "chat.completion"
)
func (CreateChatCompletionResponseObject) ToPointer ¶
func (e CreateChatCompletionResponseObject) ToPointer() *CreateChatCompletionResponseObject
func (*CreateChatCompletionResponseObject) UnmarshalJSON ¶
func (e *CreateChatCompletionResponseObject) UnmarshalJSON(data []byte) error
type CreateCompletionRequest ¶
type CreateCompletionRequest struct { // 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 *int64 `default:"1" json:"best_of"` // Echo back the prompt in addition to the completion // Echo *bool `default:"false" json:"echo"` // 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/guides/text-generation/parameter-details) // FrequencyPenalty *float64 `default:"0" 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 GPT tokenizer) to an associated bias value from -100 to 100. You can use this [tokenizer tool](/tokenizer?view=bpe) 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 map[string]int64 `json:"logit_bias,omitempty"` // Include the log probabilities on the `logprobs` most likely output 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. // Logprobs *int64 `default:"null" json:"logprobs"` // The maximum number of [tokens](/tokenizer) that can be generated in the completion. // // The token count of your prompt plus `max_tokens` cannot exceed the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. // MaxTokens *int64 `default:"16" json:"max_tokens"` // 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 CreateCompletionRequestModel `json:"model"` // 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 *int64 `default:"1" json:"n"` // 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/guides/text-generation/parameter-details) // PresencePenalty *float64 `default:"0" json:"presence_penalty"` // 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 *Prompt `json:"prompt"` // If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. // // Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend. // Seed *int64 `json:"seed,omitempty"` // Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. // Stop *CreateCompletionRequestStop `json:"stop,omitempty"` // 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. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions). // Stream *bool `default:"false" json:"stream"` // The suffix that comes after a completion of inserted text. Suffix *string `default:"null" json:"suffix"` // 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 *float64 `default:"1" 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 *float64 `default:"1" json:"top_p"` // 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 *string `json:"user,omitempty"` }
func (*CreateCompletionRequest) GetBestOf ¶
func (o *CreateCompletionRequest) GetBestOf() *int64
func (*CreateCompletionRequest) GetEcho ¶
func (o *CreateCompletionRequest) GetEcho() *bool
func (*CreateCompletionRequest) GetFrequencyPenalty ¶
func (o *CreateCompletionRequest) GetFrequencyPenalty() *float64
func (*CreateCompletionRequest) GetLogitBias ¶
func (o *CreateCompletionRequest) GetLogitBias() map[string]int64
func (*CreateCompletionRequest) GetLogprobs ¶
func (o *CreateCompletionRequest) GetLogprobs() *int64
func (*CreateCompletionRequest) GetMaxTokens ¶
func (o *CreateCompletionRequest) GetMaxTokens() *int64
func (*CreateCompletionRequest) GetModel ¶
func (o *CreateCompletionRequest) GetModel() CreateCompletionRequestModel
func (*CreateCompletionRequest) GetN ¶
func (o *CreateCompletionRequest) GetN() *int64
func (*CreateCompletionRequest) GetPresencePenalty ¶
func (o *CreateCompletionRequest) GetPresencePenalty() *float64
func (*CreateCompletionRequest) GetPrompt ¶
func (o *CreateCompletionRequest) GetPrompt() *Prompt
func (*CreateCompletionRequest) GetSeed ¶
func (o *CreateCompletionRequest) GetSeed() *int64
func (*CreateCompletionRequest) GetStop ¶
func (o *CreateCompletionRequest) GetStop() *CreateCompletionRequestStop
func (*CreateCompletionRequest) GetStream ¶
func (o *CreateCompletionRequest) GetStream() *bool
func (*CreateCompletionRequest) GetSuffix ¶
func (o *CreateCompletionRequest) GetSuffix() *string
func (*CreateCompletionRequest) GetTemperature ¶
func (o *CreateCompletionRequest) GetTemperature() *float64
func (*CreateCompletionRequest) GetTopP ¶
func (o *CreateCompletionRequest) GetTopP() *float64
func (*CreateCompletionRequest) GetUser ¶
func (o *CreateCompletionRequest) GetUser() *string
func (CreateCompletionRequest) MarshalJSON ¶
func (c CreateCompletionRequest) MarshalJSON() ([]byte, error)
func (*CreateCompletionRequest) UnmarshalJSON ¶
func (c *CreateCompletionRequest) UnmarshalJSON(data []byte) error
type CreateCompletionRequest2 ¶
type CreateCompletionRequest2 string
const ( CreateCompletionRequest2Gpt35TurboInstruct CreateCompletionRequest2 = "gpt-3.5-turbo-instruct" CreateCompletionRequest2Davinci002 CreateCompletionRequest2 = "davinci-002" CreateCompletionRequest2Babbage002 CreateCompletionRequest2 = "babbage-002" )
func (CreateCompletionRequest2) ToPointer ¶
func (e CreateCompletionRequest2) ToPointer() *CreateCompletionRequest2
func (*CreateCompletionRequest2) UnmarshalJSON ¶
func (e *CreateCompletionRequest2) UnmarshalJSON(data []byte) error
type CreateCompletionRequestModel ¶
type CreateCompletionRequestModel struct { Str *string CreateCompletionRequest2 *CreateCompletionRequest2 Type CreateCompletionRequestModelType }
CreateCompletionRequestModel - 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.
func CreateCreateCompletionRequestModelCreateCompletionRequest2 ¶
func CreateCreateCompletionRequestModelCreateCompletionRequest2(createCompletionRequest2 CreateCompletionRequest2) CreateCompletionRequestModel
func CreateCreateCompletionRequestModelStr ¶
func CreateCreateCompletionRequestModelStr(str string) CreateCompletionRequestModel
func (CreateCompletionRequestModel) MarshalJSON ¶
func (u CreateCompletionRequestModel) MarshalJSON() ([]byte, error)
func (*CreateCompletionRequestModel) UnmarshalJSON ¶
func (u *CreateCompletionRequestModel) UnmarshalJSON(data []byte) error
type CreateCompletionRequestModelType ¶
type CreateCompletionRequestModelType string
const ( CreateCompletionRequestModelTypeStr CreateCompletionRequestModelType = "str" CreateCompletionRequestModelTypeCreateCompletionRequest2 CreateCompletionRequestModelType = "CreateCompletionRequest_2" )
type CreateCompletionRequestStop ¶
type CreateCompletionRequestStop struct { Str *string ArrayOfstr []string Type CreateCompletionRequestStopType }
CreateCompletionRequestStop - Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
func CreateCreateCompletionRequestStopArrayOfstr ¶
func CreateCreateCompletionRequestStopArrayOfstr(arrayOfstr []string) CreateCompletionRequestStop
func CreateCreateCompletionRequestStopStr ¶
func CreateCreateCompletionRequestStopStr(str string) CreateCompletionRequestStop
func (CreateCompletionRequestStop) MarshalJSON ¶
func (u CreateCompletionRequestStop) MarshalJSON() ([]byte, error)
func (*CreateCompletionRequestStop) UnmarshalJSON ¶
func (u *CreateCompletionRequestStop) UnmarshalJSON(data []byte) error
type CreateCompletionRequestStopType ¶
type CreateCompletionRequestStopType string
const ( CreateCompletionRequestStopTypeStr CreateCompletionRequestStopType = "str" CreateCompletionRequestStopTypeArrayOfstr CreateCompletionRequestStopType = "arrayOfstr" )
type CreateCompletionResponse ¶
type CreateCompletionResponse struct { // The list of completion choices the model generated for the input prompt. Choices []CreateCompletionResponseChoices `json:"choices"` // The Unix timestamp (in seconds) of when the completion was created. Created int64 `json:"created"` // A unique identifier for the completion. ID string `json:"id"` // The model used for completion. Model string `json:"model"` // The object type, which is always "text_completion" Object CreateCompletionResponseObject `json:"object"` // This fingerprint represents the backend configuration that the model runs with. // // Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism. // SystemFingerprint *string `json:"system_fingerprint,omitempty"` // Usage statistics for the completion request. Usage *CompletionUsage `json:"usage,omitempty"` }
CreateCompletionResponse - Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).
func (*CreateCompletionResponse) GetChoices ¶
func (o *CreateCompletionResponse) GetChoices() []CreateCompletionResponseChoices
func (*CreateCompletionResponse) GetCreated ¶
func (o *CreateCompletionResponse) GetCreated() int64
func (*CreateCompletionResponse) GetID ¶
func (o *CreateCompletionResponse) GetID() string
func (*CreateCompletionResponse) GetModel ¶
func (o *CreateCompletionResponse) GetModel() string
func (*CreateCompletionResponse) GetObject ¶
func (o *CreateCompletionResponse) GetObject() CreateCompletionResponseObject
func (*CreateCompletionResponse) GetSystemFingerprint ¶
func (o *CreateCompletionResponse) GetSystemFingerprint() *string
func (*CreateCompletionResponse) GetUsage ¶
func (o *CreateCompletionResponse) GetUsage() *CompletionUsage
type CreateCompletionResponseChoices ¶
type CreateCompletionResponseChoices struct { // The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, // `length` if the maximum number of tokens specified in the request was reached, // or `content_filter` if content was omitted due to a flag from our content filters. // FinishReason CreateCompletionResponseFinishReason `json:"finish_reason"` Index int64 `json:"index"` Logprobs *CreateCompletionResponseLogprobs `json:"logprobs"` Text string `json:"text"` }
func (*CreateCompletionResponseChoices) GetFinishReason ¶
func (o *CreateCompletionResponseChoices) GetFinishReason() CreateCompletionResponseFinishReason
func (*CreateCompletionResponseChoices) GetIndex ¶
func (o *CreateCompletionResponseChoices) GetIndex() int64
func (*CreateCompletionResponseChoices) GetLogprobs ¶
func (o *CreateCompletionResponseChoices) GetLogprobs() *CreateCompletionResponseLogprobs
func (*CreateCompletionResponseChoices) GetText ¶
func (o *CreateCompletionResponseChoices) GetText() string
type CreateCompletionResponseFinishReason ¶
type CreateCompletionResponseFinishReason string
CreateCompletionResponseFinishReason - The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, or `content_filter` if content was omitted due to a flag from our content filters.
const ( CreateCompletionResponseFinishReasonStop CreateCompletionResponseFinishReason = "stop" CreateCompletionResponseFinishReasonLength CreateCompletionResponseFinishReason = "length" CreateCompletionResponseFinishReasonContentFilter CreateCompletionResponseFinishReason = "content_filter" )
func (CreateCompletionResponseFinishReason) ToPointer ¶
func (e CreateCompletionResponseFinishReason) ToPointer() *CreateCompletionResponseFinishReason
func (*CreateCompletionResponseFinishReason) UnmarshalJSON ¶
func (e *CreateCompletionResponseFinishReason) UnmarshalJSON(data []byte) error
type CreateCompletionResponseLogprobs ¶
type CreateCompletionResponseLogprobs struct { TextOffset []int64 `json:"text_offset,omitempty"` TokenLogprobs []float64 `json:"token_logprobs,omitempty"` Tokens []string `json:"tokens,omitempty"` TopLogprobs []map[string]float64 `json:"top_logprobs,omitempty"` }
func (*CreateCompletionResponseLogprobs) GetTextOffset ¶
func (o *CreateCompletionResponseLogprobs) GetTextOffset() []int64
func (*CreateCompletionResponseLogprobs) GetTokenLogprobs ¶
func (o *CreateCompletionResponseLogprobs) GetTokenLogprobs() []float64
func (*CreateCompletionResponseLogprobs) GetTokens ¶
func (o *CreateCompletionResponseLogprobs) GetTokens() []string
func (*CreateCompletionResponseLogprobs) GetTopLogprobs ¶
func (o *CreateCompletionResponseLogprobs) GetTopLogprobs() []map[string]float64
type CreateCompletionResponseObject ¶
type CreateCompletionResponseObject string
CreateCompletionResponseObject - The object type, which is always "text_completion"
const (
CreateCompletionResponseObjectTextCompletion CreateCompletionResponseObject = "text_completion"
)
func (CreateCompletionResponseObject) ToPointer ¶
func (e CreateCompletionResponseObject) ToPointer() *CreateCompletionResponseObject
func (*CreateCompletionResponseObject) UnmarshalJSON ¶
func (e *CreateCompletionResponseObject) UnmarshalJSON(data []byte) error
type CreateEmbeddingRequest ¶
type CreateEmbeddingRequest struct { // The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. // Dimensions *int64 `json:"dimensions,omitempty"` // The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/). EncodingFormat *EncodingFormat `default:"float" json:"encoding_format"` // Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens. // Input Input `json:"input"` // 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 CreateEmbeddingRequestModel `json:"model"` // 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 *string `json:"user,omitempty"` }
func (*CreateEmbeddingRequest) GetDimensions ¶
func (o *CreateEmbeddingRequest) GetDimensions() *int64
func (*CreateEmbeddingRequest) GetEncodingFormat ¶
func (o *CreateEmbeddingRequest) GetEncodingFormat() *EncodingFormat
func (*CreateEmbeddingRequest) GetInput ¶
func (o *CreateEmbeddingRequest) GetInput() Input
func (*CreateEmbeddingRequest) GetModel ¶
func (o *CreateEmbeddingRequest) GetModel() CreateEmbeddingRequestModel
func (*CreateEmbeddingRequest) GetUser ¶
func (o *CreateEmbeddingRequest) GetUser() *string
func (CreateEmbeddingRequest) MarshalJSON ¶
func (c CreateEmbeddingRequest) MarshalJSON() ([]byte, error)
func (*CreateEmbeddingRequest) UnmarshalJSON ¶
func (c *CreateEmbeddingRequest) UnmarshalJSON(data []byte) error
type CreateEmbeddingRequest2 ¶
type CreateEmbeddingRequest2 string
const ( CreateEmbeddingRequest2TextEmbeddingAda002 CreateEmbeddingRequest2 = "text-embedding-ada-002" CreateEmbeddingRequest2TextEmbedding3Small CreateEmbeddingRequest2 = "text-embedding-3-small" CreateEmbeddingRequest2TextEmbedding3Large CreateEmbeddingRequest2 = "text-embedding-3-large" )
func (CreateEmbeddingRequest2) ToPointer ¶
func (e CreateEmbeddingRequest2) ToPointer() *CreateEmbeddingRequest2
func (*CreateEmbeddingRequest2) UnmarshalJSON ¶
func (e *CreateEmbeddingRequest2) UnmarshalJSON(data []byte) error
type CreateEmbeddingRequestModel ¶
type CreateEmbeddingRequestModel struct { Str *string CreateEmbeddingRequest2 *CreateEmbeddingRequest2 Type CreateEmbeddingRequestModelType }
CreateEmbeddingRequestModel - 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.
func CreateCreateEmbeddingRequestModelCreateEmbeddingRequest2 ¶
func CreateCreateEmbeddingRequestModelCreateEmbeddingRequest2(createEmbeddingRequest2 CreateEmbeddingRequest2) CreateEmbeddingRequestModel
func CreateCreateEmbeddingRequestModelStr ¶
func CreateCreateEmbeddingRequestModelStr(str string) CreateEmbeddingRequestModel
func (CreateEmbeddingRequestModel) MarshalJSON ¶
func (u CreateEmbeddingRequestModel) MarshalJSON() ([]byte, error)
func (*CreateEmbeddingRequestModel) UnmarshalJSON ¶
func (u *CreateEmbeddingRequestModel) UnmarshalJSON(data []byte) error
type CreateEmbeddingRequestModelType ¶
type CreateEmbeddingRequestModelType string
const ( CreateEmbeddingRequestModelTypeStr CreateEmbeddingRequestModelType = "str" CreateEmbeddingRequestModelTypeCreateEmbeddingRequest2 CreateEmbeddingRequestModelType = "CreateEmbeddingRequest_2" )
type CreateEmbeddingResponse ¶
type CreateEmbeddingResponse struct { // The list of embeddings generated by the model. Data []Embedding `json:"data"` // The name of the model used to generate the embedding. Model string `json:"model"` // The object type, which is always "list". Object CreateEmbeddingResponseObject `json:"object"` // The usage information for the request. Usage Usage `json:"usage"` }
func (*CreateEmbeddingResponse) GetData ¶
func (o *CreateEmbeddingResponse) GetData() []Embedding
func (*CreateEmbeddingResponse) GetModel ¶
func (o *CreateEmbeddingResponse) GetModel() string
func (*CreateEmbeddingResponse) GetObject ¶
func (o *CreateEmbeddingResponse) GetObject() CreateEmbeddingResponseObject
func (*CreateEmbeddingResponse) GetUsage ¶
func (o *CreateEmbeddingResponse) GetUsage() Usage
type CreateEmbeddingResponseObject ¶
type CreateEmbeddingResponseObject string
CreateEmbeddingResponseObject - The object type, which is always "list".
const (
CreateEmbeddingResponseObjectList CreateEmbeddingResponseObject = "list"
)
func (CreateEmbeddingResponseObject) ToPointer ¶
func (e CreateEmbeddingResponseObject) ToPointer() *CreateEmbeddingResponseObject
func (*CreateEmbeddingResponseObject) UnmarshalJSON ¶
func (e *CreateEmbeddingResponseObject) UnmarshalJSON(data []byte) error
type CreateFileRequest ¶
type CreateFileRequest struct { // The File object (not file name) to be uploaded. // File File `multipartForm:"file"` // The intended purpose of the uploaded file. // // Use "fine-tune" for [Fine-tuning](/docs/api-reference/fine-tuning) and "assistants" for [Assistants](/docs/api-reference/assistants) and [Messages](/docs/api-reference/messages). This allows us to validate the format of the uploaded file is correct for fine-tuning. // Purpose Purpose `multipartForm:"name=purpose"` }
func (*CreateFileRequest) GetFile ¶
func (o *CreateFileRequest) GetFile() File
func (*CreateFileRequest) GetPurpose ¶
func (o *CreateFileRequest) GetPurpose() Purpose
type CreateFineTuningJobRequest ¶
type CreateFineTuningJobRequest struct { // The hyperparameters used for the fine-tuning job. Hyperparameters *Hyperparameters `json:"hyperparameters,omitempty"` // The name of the model to fine-tune. You can select one of the // [supported models](/docs/guides/fine-tuning/what-models-can-be-fine-tuned). // Model CreateFineTuningJobRequestModel `json:"model"` // A string of up to 18 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 `ft:gpt-3.5-turbo:openai:custom-model-name:7p4lURel`. // Suffix *string `default:"null" json:"suffix"` // 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. Additionally, you must upload your file with the purpose `fine-tune`. // // See the [fine-tuning guide](/docs/guides/fine-tuning) 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. // The same data should not be present in both train and validation files. // // Your dataset must be formatted as a JSONL file. You must upload your file with the purpose `fine-tune`. // // See the [fine-tuning guide](/docs/guides/fine-tuning) for more details. // ValidationFile *string `json:"validation_file,omitempty"` }
func (*CreateFineTuningJobRequest) GetHyperparameters ¶
func (o *CreateFineTuningJobRequest) GetHyperparameters() *Hyperparameters
func (*CreateFineTuningJobRequest) GetModel ¶
func (o *CreateFineTuningJobRequest) GetModel() CreateFineTuningJobRequestModel
func (*CreateFineTuningJobRequest) GetSuffix ¶
func (o *CreateFineTuningJobRequest) GetSuffix() *string
func (*CreateFineTuningJobRequest) GetTrainingFile ¶
func (o *CreateFineTuningJobRequest) GetTrainingFile() string
func (*CreateFineTuningJobRequest) GetValidationFile ¶
func (o *CreateFineTuningJobRequest) GetValidationFile() *string
func (CreateFineTuningJobRequest) MarshalJSON ¶
func (c CreateFineTuningJobRequest) MarshalJSON() ([]byte, error)
func (*CreateFineTuningJobRequest) UnmarshalJSON ¶
func (c *CreateFineTuningJobRequest) UnmarshalJSON(data []byte) error
type CreateFineTuningJobRequest1 ¶
type CreateFineTuningJobRequest1 string
const (
CreateFineTuningJobRequest1Auto CreateFineTuningJobRequest1 = "auto"
)
func (CreateFineTuningJobRequest1) ToPointer ¶
func (e CreateFineTuningJobRequest1) ToPointer() *CreateFineTuningJobRequest1
func (*CreateFineTuningJobRequest1) UnmarshalJSON ¶
func (e *CreateFineTuningJobRequest1) UnmarshalJSON(data []byte) error
type CreateFineTuningJobRequest2 ¶
type CreateFineTuningJobRequest2 string
const ( CreateFineTuningJobRequest2Babbage002 CreateFineTuningJobRequest2 = "babbage-002" CreateFineTuningJobRequest2Davinci002 CreateFineTuningJobRequest2 = "davinci-002" CreateFineTuningJobRequest2Gpt35Turbo CreateFineTuningJobRequest2 = "gpt-3.5-turbo" )
func (CreateFineTuningJobRequest2) ToPointer ¶
func (e CreateFineTuningJobRequest2) ToPointer() *CreateFineTuningJobRequest2
func (*CreateFineTuningJobRequest2) UnmarshalJSON ¶
func (e *CreateFineTuningJobRequest2) UnmarshalJSON(data []byte) error
type CreateFineTuningJobRequestModel ¶
type CreateFineTuningJobRequestModel struct { Str *string CreateFineTuningJobRequest2 *CreateFineTuningJobRequest2 Type CreateFineTuningJobRequestModelType }
CreateFineTuningJobRequestModel - The name of the model to fine-tune. You can select one of the [supported models](/docs/guides/fine-tuning/what-models-can-be-fine-tuned).
func CreateCreateFineTuningJobRequestModelCreateFineTuningJobRequest2 ¶
func CreateCreateFineTuningJobRequestModelCreateFineTuningJobRequest2(createFineTuningJobRequest2 CreateFineTuningJobRequest2) CreateFineTuningJobRequestModel
func CreateCreateFineTuningJobRequestModelStr ¶
func CreateCreateFineTuningJobRequestModelStr(str string) CreateFineTuningJobRequestModel
func (CreateFineTuningJobRequestModel) MarshalJSON ¶
func (u CreateFineTuningJobRequestModel) MarshalJSON() ([]byte, error)
func (*CreateFineTuningJobRequestModel) UnmarshalJSON ¶
func (u *CreateFineTuningJobRequestModel) UnmarshalJSON(data []byte) error
type CreateFineTuningJobRequestModelType ¶
type CreateFineTuningJobRequestModelType string
const ( CreateFineTuningJobRequestModelTypeStr CreateFineTuningJobRequestModelType = "str" CreateFineTuningJobRequestModelTypeCreateFineTuningJobRequest2 CreateFineTuningJobRequestModelType = "CreateFineTuningJobRequest_2" )
type CreateFineTuningJobRequestSchemas1 ¶
type CreateFineTuningJobRequestSchemas1 string
const (
CreateFineTuningJobRequestSchemas1Auto CreateFineTuningJobRequestSchemas1 = "auto"
)
func (CreateFineTuningJobRequestSchemas1) ToPointer ¶
func (e CreateFineTuningJobRequestSchemas1) ToPointer() *CreateFineTuningJobRequestSchemas1
func (*CreateFineTuningJobRequestSchemas1) UnmarshalJSON ¶
func (e *CreateFineTuningJobRequestSchemas1) UnmarshalJSON(data []byte) error
type CreateFineTuningJobRequestSchemasHyperparameters1 ¶
type CreateFineTuningJobRequestSchemasHyperparameters1 string
const (
CreateFineTuningJobRequestSchemasHyperparameters1Auto CreateFineTuningJobRequestSchemasHyperparameters1 = "auto"
)
func (*CreateFineTuningJobRequestSchemasHyperparameters1) UnmarshalJSON ¶
func (e *CreateFineTuningJobRequestSchemasHyperparameters1) UnmarshalJSON(data []byte) error
type CreateImageEditRequest ¶
type CreateImageEditRequest struct { // The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask. Image CreateImageEditRequestImage `multipartForm:"file"` // 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 *Mask `multipartForm:"file"` // The model to use for image generation. Only `dall-e-2` is supported at this time. Model *CreateImageEditRequestModel `multipartForm:"name=model"` // The number of images to generate. Must be between 1 and 10. N *int64 `default:"1" multipartForm:"name=n"` // A text description of the desired image(s). The maximum length is 1000 characters. Prompt string `multipartForm:"name=prompt"` // The format in which the generated images are returned. Must be one of `url` or `b64_json`. ResponseFormat *CreateImageEditRequestResponseFormat `default:"url" multipartForm:"name=response_format"` // The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. Size *Size `default:"1024x1024" multipartForm:"name=size"` // 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 *string `multipartForm:"name=user"` }
func (*CreateImageEditRequest) GetImage ¶
func (o *CreateImageEditRequest) GetImage() CreateImageEditRequestImage
func (*CreateImageEditRequest) GetMask ¶
func (o *CreateImageEditRequest) GetMask() *Mask
func (*CreateImageEditRequest) GetModel ¶
func (o *CreateImageEditRequest) GetModel() *CreateImageEditRequestModel
func (*CreateImageEditRequest) GetN ¶
func (o *CreateImageEditRequest) GetN() *int64
func (*CreateImageEditRequest) GetPrompt ¶
func (o *CreateImageEditRequest) GetPrompt() string
func (*CreateImageEditRequest) GetResponseFormat ¶
func (o *CreateImageEditRequest) GetResponseFormat() *CreateImageEditRequestResponseFormat
func (*CreateImageEditRequest) GetSize ¶
func (o *CreateImageEditRequest) GetSize() *Size
func (*CreateImageEditRequest) GetUser ¶
func (o *CreateImageEditRequest) GetUser() *string
func (CreateImageEditRequest) MarshalJSON ¶
func (c CreateImageEditRequest) MarshalJSON() ([]byte, error)
func (*CreateImageEditRequest) UnmarshalJSON ¶
func (c *CreateImageEditRequest) UnmarshalJSON(data []byte) error
type CreateImageEditRequest2 ¶
type CreateImageEditRequest2 string
const (
CreateImageEditRequest2DallE2 CreateImageEditRequest2 = "dall-e-2"
)
func (CreateImageEditRequest2) ToPointer ¶
func (e CreateImageEditRequest2) ToPointer() *CreateImageEditRequest2
func (*CreateImageEditRequest2) UnmarshalJSON ¶
func (e *CreateImageEditRequest2) UnmarshalJSON(data []byte) error
type CreateImageEditRequestImage ¶
type CreateImageEditRequestImage struct { Content []byte `multipartForm:"content"` FileName string `multipartForm:"name=image"` }
func (*CreateImageEditRequestImage) GetContent ¶
func (o *CreateImageEditRequestImage) GetContent() []byte
func (*CreateImageEditRequestImage) GetFileName ¶
func (o *CreateImageEditRequestImage) GetFileName() string
type CreateImageEditRequestModel ¶
type CreateImageEditRequestModel struct { Str *string CreateImageEditRequest2 *CreateImageEditRequest2 Type CreateImageEditRequestModelType }
CreateImageEditRequestModel - The model to use for image generation. Only `dall-e-2` is supported at this time.
func CreateCreateImageEditRequestModelCreateImageEditRequest2 ¶
func CreateCreateImageEditRequestModelCreateImageEditRequest2(createImageEditRequest2 CreateImageEditRequest2) CreateImageEditRequestModel
func CreateCreateImageEditRequestModelStr ¶
func CreateCreateImageEditRequestModelStr(str string) CreateImageEditRequestModel
func (CreateImageEditRequestModel) MarshalJSON ¶
func (u CreateImageEditRequestModel) MarshalJSON() ([]byte, error)
func (*CreateImageEditRequestModel) UnmarshalJSON ¶
func (u *CreateImageEditRequestModel) UnmarshalJSON(data []byte) error
type CreateImageEditRequestModelType ¶
type CreateImageEditRequestModelType string
const ( CreateImageEditRequestModelTypeStr CreateImageEditRequestModelType = "str" CreateImageEditRequestModelTypeCreateImageEditRequest2 CreateImageEditRequestModelType = "CreateImageEditRequest_2" )
type CreateImageEditRequestResponseFormat ¶
type CreateImageEditRequestResponseFormat string
CreateImageEditRequestResponseFormat - The format in which the generated images are returned. Must be one of `url` or `b64_json`.
const ( CreateImageEditRequestResponseFormatURL CreateImageEditRequestResponseFormat = "url" CreateImageEditRequestResponseFormatB64JSON CreateImageEditRequestResponseFormat = "b64_json" )
func (CreateImageEditRequestResponseFormat) ToPointer ¶
func (e CreateImageEditRequestResponseFormat) ToPointer() *CreateImageEditRequestResponseFormat
func (*CreateImageEditRequestResponseFormat) UnmarshalJSON ¶
func (e *CreateImageEditRequestResponseFormat) UnmarshalJSON(data []byte) error
type CreateImageRequest ¶
type CreateImageRequest struct { // The model to use for image generation. Model *CreateImageRequestModel `json:"model,omitempty"` // The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported. N *int64 `default:"1" json:"n"` // A text description of the desired image(s). The maximum length is 1000 characters for `dall-e-2` and 4000 characters for `dall-e-3`. Prompt string `json:"prompt"` // The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`. Quality *Quality `default:"standard" json:"quality"` // The format in which the generated images are returned. Must be one of `url` or `b64_json`. ResponseFormat *CreateImageRequestResponseFormat `default:"url" json:"response_format"` // The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models. Size *CreateImageRequestSize `default:"1024x1024" json:"size"` // The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`. Style *Style `default:"vivid" json:"style"` // 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 *string `json:"user,omitempty"` }
func (*CreateImageRequest) GetModel ¶
func (o *CreateImageRequest) GetModel() *CreateImageRequestModel
func (*CreateImageRequest) GetN ¶
func (o *CreateImageRequest) GetN() *int64
func (*CreateImageRequest) GetPrompt ¶
func (o *CreateImageRequest) GetPrompt() string
func (*CreateImageRequest) GetQuality ¶
func (o *CreateImageRequest) GetQuality() *Quality
func (*CreateImageRequest) GetResponseFormat ¶
func (o *CreateImageRequest) GetResponseFormat() *CreateImageRequestResponseFormat
func (*CreateImageRequest) GetSize ¶
func (o *CreateImageRequest) GetSize() *CreateImageRequestSize
func (*CreateImageRequest) GetStyle ¶
func (o *CreateImageRequest) GetStyle() *Style
func (*CreateImageRequest) GetUser ¶
func (o *CreateImageRequest) GetUser() *string
func (CreateImageRequest) MarshalJSON ¶
func (c CreateImageRequest) MarshalJSON() ([]byte, error)
func (*CreateImageRequest) UnmarshalJSON ¶
func (c *CreateImageRequest) UnmarshalJSON(data []byte) error
type CreateImageRequest2 ¶
type CreateImageRequest2 string
const ( CreateImageRequest2DallE2 CreateImageRequest2 = "dall-e-2" CreateImageRequest2DallE3 CreateImageRequest2 = "dall-e-3" )
func (CreateImageRequest2) ToPointer ¶
func (e CreateImageRequest2) ToPointer() *CreateImageRequest2
func (*CreateImageRequest2) UnmarshalJSON ¶
func (e *CreateImageRequest2) UnmarshalJSON(data []byte) error
type CreateImageRequestModel ¶
type CreateImageRequestModel struct { Str *string CreateImageRequest2 *CreateImageRequest2 Type CreateImageRequestModelType }
CreateImageRequestModel - The model to use for image generation.
func CreateCreateImageRequestModelCreateImageRequest2 ¶
func CreateCreateImageRequestModelCreateImageRequest2(createImageRequest2 CreateImageRequest2) CreateImageRequestModel
func CreateCreateImageRequestModelStr ¶
func CreateCreateImageRequestModelStr(str string) CreateImageRequestModel
func (CreateImageRequestModel) MarshalJSON ¶
func (u CreateImageRequestModel) MarshalJSON() ([]byte, error)
func (*CreateImageRequestModel) UnmarshalJSON ¶
func (u *CreateImageRequestModel) UnmarshalJSON(data []byte) error
type CreateImageRequestModelType ¶
type CreateImageRequestModelType string
const ( CreateImageRequestModelTypeStr CreateImageRequestModelType = "str" CreateImageRequestModelTypeCreateImageRequest2 CreateImageRequestModelType = "CreateImageRequest_2" )
type CreateImageRequestResponseFormat ¶
type CreateImageRequestResponseFormat string
CreateImageRequestResponseFormat - 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) ToPointer ¶
func (e CreateImageRequestResponseFormat) ToPointer() *CreateImageRequestResponseFormat
func (*CreateImageRequestResponseFormat) UnmarshalJSON ¶
func (e *CreateImageRequestResponseFormat) UnmarshalJSON(data []byte) error
type CreateImageRequestSize ¶
type CreateImageRequestSize string
CreateImageRequestSize - The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024` for `dall-e-2`. Must be one of `1024x1024`, `1792x1024`, or `1024x1792` for `dall-e-3` models.
const ( CreateImageRequestSizeTwoHundredAndFiftySixx256 CreateImageRequestSize = "256x256" CreateImageRequestSizeFiveHundredAndTwelvex512 CreateImageRequestSize = "512x512" CreateImageRequestSizeOneThousandAndTwentyFourx1024 CreateImageRequestSize = "1024x1024" CreateImageRequestSizeOneThousandSevenHundredAndNinetyTwox1024 CreateImageRequestSize = "1792x1024" CreateImageRequestSizeOneThousandAndTwentyFourx1792 CreateImageRequestSize = "1024x1792" )
func (CreateImageRequestSize) ToPointer ¶
func (e CreateImageRequestSize) ToPointer() *CreateImageRequestSize
func (*CreateImageRequestSize) UnmarshalJSON ¶
func (e *CreateImageRequestSize) UnmarshalJSON(data []byte) error
type CreateImageVariationRequest ¶
type CreateImageVariationRequest struct { // The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square. Image CreateImageVariationRequestImage `multipartForm:"file"` // The model to use for image generation. Only `dall-e-2` is supported at this time. Model *CreateImageVariationRequestModel `multipartForm:"name=model"` // The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported. N *int64 `default:"1" multipartForm:"name=n"` // The format in which the generated images are returned. Must be one of `url` or `b64_json`. ResponseFormat *CreateImageVariationRequestResponseFormat `default:"url" multipartForm:"name=response_format"` // The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. Size *CreateImageVariationRequestSize `default:"1024x1024" multipartForm:"name=size"` // 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 *string `multipartForm:"name=user"` }
func (*CreateImageVariationRequest) GetImage ¶
func (o *CreateImageVariationRequest) GetImage() CreateImageVariationRequestImage
func (*CreateImageVariationRequest) GetModel ¶
func (o *CreateImageVariationRequest) GetModel() *CreateImageVariationRequestModel
func (*CreateImageVariationRequest) GetN ¶
func (o *CreateImageVariationRequest) GetN() *int64
func (*CreateImageVariationRequest) GetResponseFormat ¶
func (o *CreateImageVariationRequest) GetResponseFormat() *CreateImageVariationRequestResponseFormat
func (*CreateImageVariationRequest) GetSize ¶
func (o *CreateImageVariationRequest) GetSize() *CreateImageVariationRequestSize
func (*CreateImageVariationRequest) GetUser ¶
func (o *CreateImageVariationRequest) GetUser() *string
func (CreateImageVariationRequest) MarshalJSON ¶
func (c CreateImageVariationRequest) MarshalJSON() ([]byte, error)
func (*CreateImageVariationRequest) UnmarshalJSON ¶
func (c *CreateImageVariationRequest) UnmarshalJSON(data []byte) error
type CreateImageVariationRequest2 ¶
type CreateImageVariationRequest2 string
const (
CreateImageVariationRequest2DallE2 CreateImageVariationRequest2 = "dall-e-2"
)
func (CreateImageVariationRequest2) ToPointer ¶
func (e CreateImageVariationRequest2) ToPointer() *CreateImageVariationRequest2
func (*CreateImageVariationRequest2) UnmarshalJSON ¶
func (e *CreateImageVariationRequest2) UnmarshalJSON(data []byte) error
type CreateImageVariationRequestImage ¶
type CreateImageVariationRequestImage struct { Content []byte `multipartForm:"content"` FileName string `multipartForm:"name=image"` }
func (*CreateImageVariationRequestImage) GetContent ¶
func (o *CreateImageVariationRequestImage) GetContent() []byte
func (*CreateImageVariationRequestImage) GetFileName ¶
func (o *CreateImageVariationRequestImage) GetFileName() string
type CreateImageVariationRequestModel ¶
type CreateImageVariationRequestModel struct { Str *string CreateImageVariationRequest2 *CreateImageVariationRequest2 Type CreateImageVariationRequestModelType }
CreateImageVariationRequestModel - The model to use for image generation. Only `dall-e-2` is supported at this time.
func CreateCreateImageVariationRequestModelCreateImageVariationRequest2 ¶
func CreateCreateImageVariationRequestModelCreateImageVariationRequest2(createImageVariationRequest2 CreateImageVariationRequest2) CreateImageVariationRequestModel
func CreateCreateImageVariationRequestModelStr ¶
func CreateCreateImageVariationRequestModelStr(str string) CreateImageVariationRequestModel
func (CreateImageVariationRequestModel) MarshalJSON ¶
func (u CreateImageVariationRequestModel) MarshalJSON() ([]byte, error)
func (*CreateImageVariationRequestModel) UnmarshalJSON ¶
func (u *CreateImageVariationRequestModel) UnmarshalJSON(data []byte) error
type CreateImageVariationRequestModelType ¶
type CreateImageVariationRequestModelType string
const ( CreateImageVariationRequestModelTypeStr CreateImageVariationRequestModelType = "str" CreateImageVariationRequestModelTypeCreateImageVariationRequest2 CreateImageVariationRequestModelType = "CreateImageVariationRequest_2" )
type CreateImageVariationRequestResponseFormat ¶
type CreateImageVariationRequestResponseFormat string
CreateImageVariationRequestResponseFormat - The format in which the generated images are returned. Must be one of `url` or `b64_json`.
const ( CreateImageVariationRequestResponseFormatURL CreateImageVariationRequestResponseFormat = "url" CreateImageVariationRequestResponseFormatB64JSON CreateImageVariationRequestResponseFormat = "b64_json" )
func (CreateImageVariationRequestResponseFormat) ToPointer ¶
func (e CreateImageVariationRequestResponseFormat) ToPointer() *CreateImageVariationRequestResponseFormat
func (*CreateImageVariationRequestResponseFormat) UnmarshalJSON ¶
func (e *CreateImageVariationRequestResponseFormat) UnmarshalJSON(data []byte) error
type CreateImageVariationRequestSize ¶
type CreateImageVariationRequestSize string
CreateImageVariationRequestSize - The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
const ( CreateImageVariationRequestSizeTwoHundredAndFiftySixx256 CreateImageVariationRequestSize = "256x256" CreateImageVariationRequestSizeFiveHundredAndTwelvex512 CreateImageVariationRequestSize = "512x512" CreateImageVariationRequestSizeOneThousandAndTwentyFourx1024 CreateImageVariationRequestSize = "1024x1024" )
func (CreateImageVariationRequestSize) ToPointer ¶
func (e CreateImageVariationRequestSize) ToPointer() *CreateImageVariationRequestSize
func (*CreateImageVariationRequestSize) UnmarshalJSON ¶
func (e *CreateImageVariationRequestSize) UnmarshalJSON(data []byte) error
type CreateMessageRequest ¶
type CreateMessageRequest struct { // The content of the message. Content string `json:"content"` // A list of [File](/docs/api-reference/files) IDs that the message should use. There can be a maximum of 10 files attached to a message. Useful for tools like `retrieval` and `code_interpreter` that can access and use files. FileIds []string `json:"file_ids,omitempty"` // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *CreateMessageRequestMetadata `json:"metadata,omitempty"` // The role of the entity that is creating the message. Currently only `user` is supported. Role CreateMessageRequestRole `json:"role"` }
func (*CreateMessageRequest) GetContent ¶
func (o *CreateMessageRequest) GetContent() string
func (*CreateMessageRequest) GetFileIds ¶
func (o *CreateMessageRequest) GetFileIds() []string
func (*CreateMessageRequest) GetMetadata ¶
func (o *CreateMessageRequest) GetMetadata() *CreateMessageRequestMetadata
func (*CreateMessageRequest) GetRole ¶
func (o *CreateMessageRequest) GetRole() CreateMessageRequestRole
type CreateMessageRequestMetadata ¶
type CreateMessageRequestMetadata struct { }
CreateMessageRequestMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type CreateMessageRequestRole ¶
type CreateMessageRequestRole string
CreateMessageRequestRole - The role of the entity that is creating the message. Currently only `user` is supported.
const (
CreateMessageRequestRoleUser CreateMessageRequestRole = "user"
)
func (CreateMessageRequestRole) ToPointer ¶
func (e CreateMessageRequestRole) ToPointer() *CreateMessageRequestRole
func (*CreateMessageRequestRole) UnmarshalJSON ¶
func (e *CreateMessageRequestRole) UnmarshalJSON(data []byte) 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 *CreateModerationRequestModel `json:"model,omitempty"` }
func (*CreateModerationRequest) GetInput ¶
func (o *CreateModerationRequest) GetInput() CreateModerationRequestInput
func (*CreateModerationRequest) GetModel ¶
func (o *CreateModerationRequest) GetModel() *CreateModerationRequestModel
type CreateModerationRequest2 ¶
type CreateModerationRequest2 string
const ( CreateModerationRequest2TextModerationLatest CreateModerationRequest2 = "text-moderation-latest" CreateModerationRequest2TextModerationStable CreateModerationRequest2 = "text-moderation-stable" )
func (CreateModerationRequest2) ToPointer ¶
func (e CreateModerationRequest2) ToPointer() *CreateModerationRequest2
func (*CreateModerationRequest2) UnmarshalJSON ¶
func (e *CreateModerationRequest2) UnmarshalJSON(data []byte) error
type CreateModerationRequestInput ¶
type CreateModerationRequestInput struct { Str *string ArrayOfstr []string Type CreateModerationRequestInputType }
CreateModerationRequestInput - The input text to classify
func CreateCreateModerationRequestInputArrayOfstr ¶
func CreateCreateModerationRequestInputArrayOfstr(arrayOfstr []string) CreateModerationRequestInput
func CreateCreateModerationRequestInputStr ¶
func CreateCreateModerationRequestInputStr(str string) CreateModerationRequestInput
func (CreateModerationRequestInput) MarshalJSON ¶
func (u CreateModerationRequestInput) MarshalJSON() ([]byte, error)
func (*CreateModerationRequestInput) UnmarshalJSON ¶
func (u *CreateModerationRequestInput) UnmarshalJSON(data []byte) error
type CreateModerationRequestInputType ¶
type CreateModerationRequestInputType string
const ( CreateModerationRequestInputTypeStr CreateModerationRequestInputType = "str" CreateModerationRequestInputTypeArrayOfstr CreateModerationRequestInputType = "arrayOfstr" )
type CreateModerationRequestModel ¶
type CreateModerationRequestModel struct { Str *string CreateModerationRequest2 *CreateModerationRequest2 Type CreateModerationRequestModelType }
CreateModerationRequestModel - 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`.
func CreateCreateModerationRequestModelCreateModerationRequest2 ¶
func CreateCreateModerationRequestModelCreateModerationRequest2(createModerationRequest2 CreateModerationRequest2) CreateModerationRequestModel
func CreateCreateModerationRequestModelStr ¶
func CreateCreateModerationRequestModelStr(str string) CreateModerationRequestModel
func (CreateModerationRequestModel) MarshalJSON ¶
func (u CreateModerationRequestModel) MarshalJSON() ([]byte, error)
func (*CreateModerationRequestModel) UnmarshalJSON ¶
func (u *CreateModerationRequestModel) UnmarshalJSON(data []byte) error
type CreateModerationRequestModelType ¶
type CreateModerationRequestModelType string
const ( CreateModerationRequestModelTypeStr CreateModerationRequestModelType = "str" CreateModerationRequestModelTypeCreateModerationRequest2 CreateModerationRequestModelType = "CreateModerationRequest_2" )
type CreateModerationResponse ¶
type CreateModerationResponse struct { // The unique identifier for the moderation request. ID string `json:"id"` // The model used to generate the moderation results. Model string `json:"model"` // A list of moderation objects. Results []Results `json:"results"` }
CreateModerationResponse - Represents policy compliance report by OpenAI's content moderation model against a given input.
func (*CreateModerationResponse) GetID ¶
func (o *CreateModerationResponse) GetID() string
func (*CreateModerationResponse) GetModel ¶
func (o *CreateModerationResponse) GetModel() string
func (*CreateModerationResponse) GetResults ¶
func (o *CreateModerationResponse) GetResults() []Results
type CreateRunRequest ¶
type CreateRunRequest struct { // Appends additional instructions at the end of the instructions for the run. This is useful for modifying the behavior on a per-run basis without overriding other instructions. AdditionalInstructions *string `json:"additional_instructions,omitempty"` // The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. AssistantID string `json:"assistant_id"` // Overrides the [instructions](/docs/api-reference/assistants/createAssistant) of the assistant. This is useful for modifying the behavior on a per-run basis. Instructions *string `json:"instructions,omitempty"` // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *CreateRunRequestMetadata `json:"metadata,omitempty"` // The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. Model *string `json:"model,omitempty"` // Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. Tools []CreateRunRequestTools `json:"tools,omitempty"` }
func (*CreateRunRequest) GetAdditionalInstructions ¶
func (o *CreateRunRequest) GetAdditionalInstructions() *string
func (*CreateRunRequest) GetAssistantID ¶
func (o *CreateRunRequest) GetAssistantID() string
func (*CreateRunRequest) GetInstructions ¶
func (o *CreateRunRequest) GetInstructions() *string
func (*CreateRunRequest) GetMetadata ¶
func (o *CreateRunRequest) GetMetadata() *CreateRunRequestMetadata
func (*CreateRunRequest) GetModel ¶
func (o *CreateRunRequest) GetModel() *string
func (*CreateRunRequest) GetTools ¶
func (o *CreateRunRequest) GetTools() []CreateRunRequestTools
type CreateRunRequestMetadata ¶
type CreateRunRequestMetadata struct { }
CreateRunRequestMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type CreateRunRequestTools ¶
type CreateRunRequestTools struct { AssistantToolsCode *AssistantToolsCode AssistantToolsRetrieval *AssistantToolsRetrieval AssistantToolsFunction *AssistantToolsFunction Type CreateRunRequestToolsType }
func CreateCreateRunRequestToolsAssistantToolsCode ¶
func CreateCreateRunRequestToolsAssistantToolsCode(assistantToolsCode AssistantToolsCode) CreateRunRequestTools
func CreateCreateRunRequestToolsAssistantToolsFunction ¶
func CreateCreateRunRequestToolsAssistantToolsFunction(assistantToolsFunction AssistantToolsFunction) CreateRunRequestTools
func CreateCreateRunRequestToolsAssistantToolsRetrieval ¶
func CreateCreateRunRequestToolsAssistantToolsRetrieval(assistantToolsRetrieval AssistantToolsRetrieval) CreateRunRequestTools
func (CreateRunRequestTools) MarshalJSON ¶
func (u CreateRunRequestTools) MarshalJSON() ([]byte, error)
func (*CreateRunRequestTools) UnmarshalJSON ¶
func (u *CreateRunRequestTools) UnmarshalJSON(data []byte) error
type CreateRunRequestToolsType ¶
type CreateRunRequestToolsType string
const ( CreateRunRequestToolsTypeAssistantToolsCode CreateRunRequestToolsType = "AssistantToolsCode" CreateRunRequestToolsTypeAssistantToolsRetrieval CreateRunRequestToolsType = "AssistantToolsRetrieval" CreateRunRequestToolsTypeAssistantToolsFunction CreateRunRequestToolsType = "AssistantToolsFunction" )
type CreateSpeechRequest ¶
type CreateSpeechRequest struct { // The text to generate audio for. The maximum length is 4096 characters. Input string `json:"input"` // One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd` // Model CreateSpeechRequestModel `json:"model"` // The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`. ResponseFormat *CreateSpeechRequestResponseFormat `default:"mp3" json:"response_format"` // The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default. Speed *float64 `default:"1" json:"speed"` // The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options). Voice Voice `json:"voice"` }
func (*CreateSpeechRequest) GetInput ¶
func (o *CreateSpeechRequest) GetInput() string
func (*CreateSpeechRequest) GetModel ¶
func (o *CreateSpeechRequest) GetModel() CreateSpeechRequestModel
func (*CreateSpeechRequest) GetResponseFormat ¶
func (o *CreateSpeechRequest) GetResponseFormat() *CreateSpeechRequestResponseFormat
func (*CreateSpeechRequest) GetSpeed ¶
func (o *CreateSpeechRequest) GetSpeed() *float64
func (*CreateSpeechRequest) GetVoice ¶
func (o *CreateSpeechRequest) GetVoice() Voice
func (CreateSpeechRequest) MarshalJSON ¶
func (c CreateSpeechRequest) MarshalJSON() ([]byte, error)
func (*CreateSpeechRequest) UnmarshalJSON ¶
func (c *CreateSpeechRequest) UnmarshalJSON(data []byte) error
type CreateSpeechRequest2 ¶
type CreateSpeechRequest2 string
const ( CreateSpeechRequest2Tts1 CreateSpeechRequest2 = "tts-1" CreateSpeechRequest2Tts1Hd CreateSpeechRequest2 = "tts-1-hd" )
func (CreateSpeechRequest2) ToPointer ¶
func (e CreateSpeechRequest2) ToPointer() *CreateSpeechRequest2
func (*CreateSpeechRequest2) UnmarshalJSON ¶
func (e *CreateSpeechRequest2) UnmarshalJSON(data []byte) error
type CreateSpeechRequestModel ¶
type CreateSpeechRequestModel struct { Str *string CreateSpeechRequest2 *CreateSpeechRequest2 Type CreateSpeechRequestModelType }
CreateSpeechRequestModel - One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`
func CreateCreateSpeechRequestModelCreateSpeechRequest2 ¶
func CreateCreateSpeechRequestModelCreateSpeechRequest2(createSpeechRequest2 CreateSpeechRequest2) CreateSpeechRequestModel
func CreateCreateSpeechRequestModelStr ¶
func CreateCreateSpeechRequestModelStr(str string) CreateSpeechRequestModel
func (CreateSpeechRequestModel) MarshalJSON ¶
func (u CreateSpeechRequestModel) MarshalJSON() ([]byte, error)
func (*CreateSpeechRequestModel) UnmarshalJSON ¶
func (u *CreateSpeechRequestModel) UnmarshalJSON(data []byte) error
type CreateSpeechRequestModelType ¶
type CreateSpeechRequestModelType string
const ( CreateSpeechRequestModelTypeStr CreateSpeechRequestModelType = "str" CreateSpeechRequestModelTypeCreateSpeechRequest2 CreateSpeechRequestModelType = "CreateSpeechRequest_2" )
type CreateSpeechRequestResponseFormat ¶
type CreateSpeechRequestResponseFormat string
CreateSpeechRequestResponseFormat - The format to audio in. Supported formats are `mp3`, `opus`, `aac`, and `flac`.
const ( CreateSpeechRequestResponseFormatMp3 CreateSpeechRequestResponseFormat = "mp3" CreateSpeechRequestResponseFormatOpus CreateSpeechRequestResponseFormat = "opus" CreateSpeechRequestResponseFormatAac CreateSpeechRequestResponseFormat = "aac" CreateSpeechRequestResponseFormatFlac CreateSpeechRequestResponseFormat = "flac" )
func (CreateSpeechRequestResponseFormat) ToPointer ¶
func (e CreateSpeechRequestResponseFormat) ToPointer() *CreateSpeechRequestResponseFormat
func (*CreateSpeechRequestResponseFormat) UnmarshalJSON ¶
func (e *CreateSpeechRequestResponseFormat) UnmarshalJSON(data []byte) error
type CreateThreadAndRunRequest ¶
type CreateThreadAndRunRequest struct { // The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. AssistantID string `json:"assistant_id"` // Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. Instructions *string `json:"instructions,omitempty"` // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *CreateThreadAndRunRequestMetadata `json:"metadata,omitempty"` // The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used. Model *string `json:"model,omitempty"` Thread *CreateThreadRequest `json:"thread,omitempty"` // Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. Tools []CreateThreadAndRunRequestTools `json:"tools,omitempty"` }
func (*CreateThreadAndRunRequest) GetAssistantID ¶
func (o *CreateThreadAndRunRequest) GetAssistantID() string
func (*CreateThreadAndRunRequest) GetInstructions ¶
func (o *CreateThreadAndRunRequest) GetInstructions() *string
func (*CreateThreadAndRunRequest) GetMetadata ¶
func (o *CreateThreadAndRunRequest) GetMetadata() *CreateThreadAndRunRequestMetadata
func (*CreateThreadAndRunRequest) GetModel ¶
func (o *CreateThreadAndRunRequest) GetModel() *string
func (*CreateThreadAndRunRequest) GetThread ¶
func (o *CreateThreadAndRunRequest) GetThread() *CreateThreadRequest
func (*CreateThreadAndRunRequest) GetTools ¶
func (o *CreateThreadAndRunRequest) GetTools() []CreateThreadAndRunRequestTools
type CreateThreadAndRunRequestMetadata ¶
type CreateThreadAndRunRequestMetadata struct { }
CreateThreadAndRunRequestMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type CreateThreadAndRunRequestTools ¶
type CreateThreadAndRunRequestTools struct { AssistantToolsCode *AssistantToolsCode AssistantToolsRetrieval *AssistantToolsRetrieval AssistantToolsFunction *AssistantToolsFunction Type CreateThreadAndRunRequestToolsType }
func CreateCreateThreadAndRunRequestToolsAssistantToolsCode ¶
func CreateCreateThreadAndRunRequestToolsAssistantToolsCode(assistantToolsCode AssistantToolsCode) CreateThreadAndRunRequestTools
func CreateCreateThreadAndRunRequestToolsAssistantToolsFunction ¶
func CreateCreateThreadAndRunRequestToolsAssistantToolsFunction(assistantToolsFunction AssistantToolsFunction) CreateThreadAndRunRequestTools
func CreateCreateThreadAndRunRequestToolsAssistantToolsRetrieval ¶
func CreateCreateThreadAndRunRequestToolsAssistantToolsRetrieval(assistantToolsRetrieval AssistantToolsRetrieval) CreateThreadAndRunRequestTools
func (CreateThreadAndRunRequestTools) MarshalJSON ¶
func (u CreateThreadAndRunRequestTools) MarshalJSON() ([]byte, error)
func (*CreateThreadAndRunRequestTools) UnmarshalJSON ¶
func (u *CreateThreadAndRunRequestTools) UnmarshalJSON(data []byte) error
type CreateThreadAndRunRequestToolsType ¶
type CreateThreadAndRunRequestToolsType string
const ( CreateThreadAndRunRequestToolsTypeAssistantToolsCode CreateThreadAndRunRequestToolsType = "AssistantToolsCode" CreateThreadAndRunRequestToolsTypeAssistantToolsRetrieval CreateThreadAndRunRequestToolsType = "AssistantToolsRetrieval" CreateThreadAndRunRequestToolsTypeAssistantToolsFunction CreateThreadAndRunRequestToolsType = "AssistantToolsFunction" )
type CreateThreadRequest ¶
type CreateThreadRequest struct { // A list of [messages](/docs/api-reference/messages) to start the thread with. Messages []CreateMessageRequest `json:"messages,omitempty"` // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *CreateThreadRequestMetadata `json:"metadata,omitempty"` }
func (*CreateThreadRequest) GetMessages ¶
func (o *CreateThreadRequest) GetMessages() []CreateMessageRequest
func (*CreateThreadRequest) GetMetadata ¶
func (o *CreateThreadRequest) GetMetadata() *CreateThreadRequestMetadata
type CreateThreadRequestMetadata ¶
type CreateThreadRequestMetadata struct { }
CreateThreadRequestMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type CreateTranscriptionRequest ¶
type CreateTranscriptionRequest struct { // The audio file object (not file name) to transcribe, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. // File CreateTranscriptionRequestFile `multipartForm:"file"` // 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 *string `multipartForm:"name=language"` // ID of the model to use. Only `whisper-1` is currently available. // Model CreateTranscriptionRequestModel `multipartForm:"name=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 *string `multipartForm:"name=prompt"` // The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`. // ResponseFormat *CreateTranscriptionRequestResponseFormat `default:"json" multipartForm:"name=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 *float64 `default:"0" multipartForm:"name=temperature"` // The timestamp granularities to populate for this transcription. Any of these options: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency. // TimestampGranularities []TimestampGranularities `multipartForm:"name=timestamp_granularities[]"` }
func (*CreateTranscriptionRequest) GetFile ¶
func (o *CreateTranscriptionRequest) GetFile() CreateTranscriptionRequestFile
func (*CreateTranscriptionRequest) GetLanguage ¶
func (o *CreateTranscriptionRequest) GetLanguage() *string
func (*CreateTranscriptionRequest) GetModel ¶
func (o *CreateTranscriptionRequest) GetModel() CreateTranscriptionRequestModel
func (*CreateTranscriptionRequest) GetPrompt ¶
func (o *CreateTranscriptionRequest) GetPrompt() *string
func (*CreateTranscriptionRequest) GetResponseFormat ¶
func (o *CreateTranscriptionRequest) GetResponseFormat() *CreateTranscriptionRequestResponseFormat
func (*CreateTranscriptionRequest) GetTemperature ¶
func (o *CreateTranscriptionRequest) GetTemperature() *float64
func (*CreateTranscriptionRequest) GetTimestampGranularities ¶
func (o *CreateTranscriptionRequest) GetTimestampGranularities() []TimestampGranularities
func (CreateTranscriptionRequest) MarshalJSON ¶
func (c CreateTranscriptionRequest) MarshalJSON() ([]byte, error)
func (*CreateTranscriptionRequest) UnmarshalJSON ¶
func (c *CreateTranscriptionRequest) UnmarshalJSON(data []byte) error
type CreateTranscriptionRequest2 ¶
type CreateTranscriptionRequest2 string
const (
CreateTranscriptionRequest2Whisper1 CreateTranscriptionRequest2 = "whisper-1"
)
func (CreateTranscriptionRequest2) ToPointer ¶
func (e CreateTranscriptionRequest2) ToPointer() *CreateTranscriptionRequest2
func (*CreateTranscriptionRequest2) UnmarshalJSON ¶
func (e *CreateTranscriptionRequest2) UnmarshalJSON(data []byte) error
type CreateTranscriptionRequestFile ¶
type CreateTranscriptionRequestFile struct { Content []byte `multipartForm:"content"` FileName string `multipartForm:"name=file"` }
func (*CreateTranscriptionRequestFile) GetContent ¶
func (o *CreateTranscriptionRequestFile) GetContent() []byte
func (*CreateTranscriptionRequestFile) GetFileName ¶
func (o *CreateTranscriptionRequestFile) GetFileName() string
type CreateTranscriptionRequestModel ¶
type CreateTranscriptionRequestModel struct { Str *string CreateTranscriptionRequest2 *CreateTranscriptionRequest2 Type CreateTranscriptionRequestModelType }
CreateTranscriptionRequestModel - ID of the model to use. Only `whisper-1` is currently available.
func CreateCreateTranscriptionRequestModelCreateTranscriptionRequest2 ¶
func CreateCreateTranscriptionRequestModelCreateTranscriptionRequest2(createTranscriptionRequest2 CreateTranscriptionRequest2) CreateTranscriptionRequestModel
func CreateCreateTranscriptionRequestModelStr ¶
func CreateCreateTranscriptionRequestModelStr(str string) CreateTranscriptionRequestModel
func (CreateTranscriptionRequestModel) MarshalJSON ¶
func (u CreateTranscriptionRequestModel) MarshalJSON() ([]byte, error)
func (*CreateTranscriptionRequestModel) UnmarshalJSON ¶
func (u *CreateTranscriptionRequestModel) UnmarshalJSON(data []byte) error
type CreateTranscriptionRequestModelType ¶
type CreateTranscriptionRequestModelType string
const ( CreateTranscriptionRequestModelTypeStr CreateTranscriptionRequestModelType = "str" CreateTranscriptionRequestModelTypeCreateTranscriptionRequest2 CreateTranscriptionRequestModelType = "CreateTranscriptionRequest_2" )
type CreateTranscriptionRequestResponseFormat ¶
type CreateTranscriptionRequestResponseFormat string
CreateTranscriptionRequestResponseFormat - The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`.
const ( CreateTranscriptionRequestResponseFormatJSON CreateTranscriptionRequestResponseFormat = "json" CreateTranscriptionRequestResponseFormatText CreateTranscriptionRequestResponseFormat = "text" CreateTranscriptionRequestResponseFormatSrt CreateTranscriptionRequestResponseFormat = "srt" CreateTranscriptionRequestResponseFormatVerboseJSON CreateTranscriptionRequestResponseFormat = "verbose_json" CreateTranscriptionRequestResponseFormatVtt CreateTranscriptionRequestResponseFormat = "vtt" )
func (CreateTranscriptionRequestResponseFormat) ToPointer ¶
func (e CreateTranscriptionRequestResponseFormat) ToPointer() *CreateTranscriptionRequestResponseFormat
func (*CreateTranscriptionRequestResponseFormat) UnmarshalJSON ¶
func (e *CreateTranscriptionRequestResponseFormat) UnmarshalJSON(data []byte) error
type CreateTranscriptionResponse ¶
type CreateTranscriptionResponse struct {
Text string `json:"text"`
}
func (*CreateTranscriptionResponse) GetText ¶
func (o *CreateTranscriptionResponse) GetText() string
type CreateTranslationRequest ¶
type CreateTranslationRequest struct { // The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. // File CreateTranslationRequestFile `multipartForm:"file"` // ID of the model to use. Only `whisper-1` is currently available. // Model CreateTranslationRequestModel `multipartForm:"name=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 *string `multipartForm:"name=prompt"` // The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`. // ResponseFormat *string `default:"json" multipartForm:"name=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 *float64 `default:"0" multipartForm:"name=temperature"` }
func (*CreateTranslationRequest) GetFile ¶
func (o *CreateTranslationRequest) GetFile() CreateTranslationRequestFile
func (*CreateTranslationRequest) GetModel ¶
func (o *CreateTranslationRequest) GetModel() CreateTranslationRequestModel
func (*CreateTranslationRequest) GetPrompt ¶
func (o *CreateTranslationRequest) GetPrompt() *string
func (*CreateTranslationRequest) GetResponseFormat ¶
func (o *CreateTranslationRequest) GetResponseFormat() *string
func (*CreateTranslationRequest) GetTemperature ¶
func (o *CreateTranslationRequest) GetTemperature() *float64
func (CreateTranslationRequest) MarshalJSON ¶
func (c CreateTranslationRequest) MarshalJSON() ([]byte, error)
func (*CreateTranslationRequest) UnmarshalJSON ¶
func (c *CreateTranslationRequest) UnmarshalJSON(data []byte) error
type CreateTranslationRequest2 ¶
type CreateTranslationRequest2 string
const (
CreateTranslationRequest2Whisper1 CreateTranslationRequest2 = "whisper-1"
)
func (CreateTranslationRequest2) ToPointer ¶
func (e CreateTranslationRequest2) ToPointer() *CreateTranslationRequest2
func (*CreateTranslationRequest2) UnmarshalJSON ¶
func (e *CreateTranslationRequest2) UnmarshalJSON(data []byte) error
type CreateTranslationRequestFile ¶
type CreateTranslationRequestFile struct { Content []byte `multipartForm:"content"` FileName string `multipartForm:"name=file"` }
func (*CreateTranslationRequestFile) GetContent ¶
func (o *CreateTranslationRequestFile) GetContent() []byte
func (*CreateTranslationRequestFile) GetFileName ¶
func (o *CreateTranslationRequestFile) GetFileName() string
type CreateTranslationRequestModel ¶
type CreateTranslationRequestModel struct { Str *string CreateTranslationRequest2 *CreateTranslationRequest2 Type CreateTranslationRequestModelType }
CreateTranslationRequestModel - ID of the model to use. Only `whisper-1` is currently available.
func CreateCreateTranslationRequestModelCreateTranslationRequest2 ¶
func CreateCreateTranslationRequestModelCreateTranslationRequest2(createTranslationRequest2 CreateTranslationRequest2) CreateTranslationRequestModel
func CreateCreateTranslationRequestModelStr ¶
func CreateCreateTranslationRequestModelStr(str string) CreateTranslationRequestModel
func (CreateTranslationRequestModel) MarshalJSON ¶
func (u CreateTranslationRequestModel) MarshalJSON() ([]byte, error)
func (*CreateTranslationRequestModel) UnmarshalJSON ¶
func (u *CreateTranslationRequestModel) UnmarshalJSON(data []byte) error
type CreateTranslationRequestModelType ¶
type CreateTranslationRequestModelType string
const ( CreateTranslationRequestModelTypeStr CreateTranslationRequestModelType = "str" CreateTranslationRequestModelTypeCreateTranslationRequest2 CreateTranslationRequestModelType = "CreateTranslationRequest_2" )
type CreateTranslationResponse ¶
type CreateTranslationResponse struct {
Text string `json:"text"`
}
func (*CreateTranslationResponse) GetText ¶
func (o *CreateTranslationResponse) GetText() string
type DeleteAssistantFileResponse ¶
type DeleteAssistantFileResponse struct { Deleted bool `json:"deleted"` ID string `json:"id"` Object DeleteAssistantFileResponseObject `json:"object"` }
DeleteAssistantFileResponse - Deletes the association between the assistant and the file, but does not delete the File(/docs/api-reference/files) object itself.
func (*DeleteAssistantFileResponse) GetDeleted ¶
func (o *DeleteAssistantFileResponse) GetDeleted() bool
func (*DeleteAssistantFileResponse) GetID ¶
func (o *DeleteAssistantFileResponse) GetID() string
func (*DeleteAssistantFileResponse) GetObject ¶
func (o *DeleteAssistantFileResponse) GetObject() DeleteAssistantFileResponseObject
type DeleteAssistantFileResponseObject ¶
type DeleteAssistantFileResponseObject string
const (
DeleteAssistantFileResponseObjectAssistantFileDeleted DeleteAssistantFileResponseObject = "assistant.file.deleted"
)
func (DeleteAssistantFileResponseObject) ToPointer ¶
func (e DeleteAssistantFileResponseObject) ToPointer() *DeleteAssistantFileResponseObject
func (*DeleteAssistantFileResponseObject) UnmarshalJSON ¶
func (e *DeleteAssistantFileResponseObject) UnmarshalJSON(data []byte) error
type DeleteAssistantResponse ¶
type DeleteAssistantResponse struct { Deleted bool `json:"deleted"` ID string `json:"id"` Object DeleteAssistantResponseObject `json:"object"` }
func (*DeleteAssistantResponse) GetDeleted ¶
func (o *DeleteAssistantResponse) GetDeleted() bool
func (*DeleteAssistantResponse) GetID ¶
func (o *DeleteAssistantResponse) GetID() string
func (*DeleteAssistantResponse) GetObject ¶
func (o *DeleteAssistantResponse) GetObject() DeleteAssistantResponseObject
type DeleteAssistantResponseObject ¶
type DeleteAssistantResponseObject string
const (
DeleteAssistantResponseObjectAssistantDeleted DeleteAssistantResponseObject = "assistant.deleted"
)
func (DeleteAssistantResponseObject) ToPointer ¶
func (e DeleteAssistantResponseObject) ToPointer() *DeleteAssistantResponseObject
func (*DeleteAssistantResponseObject) UnmarshalJSON ¶
func (e *DeleteAssistantResponseObject) UnmarshalJSON(data []byte) error
type DeleteFileResponse ¶
type DeleteFileResponse struct { Deleted bool `json:"deleted"` ID string `json:"id"` Object DeleteFileResponseObject `json:"object"` }
func (*DeleteFileResponse) GetDeleted ¶
func (o *DeleteFileResponse) GetDeleted() bool
func (*DeleteFileResponse) GetID ¶
func (o *DeleteFileResponse) GetID() string
func (*DeleteFileResponse) GetObject ¶
func (o *DeleteFileResponse) GetObject() DeleteFileResponseObject
type DeleteFileResponseObject ¶
type DeleteFileResponseObject string
const (
DeleteFileResponseObjectFile DeleteFileResponseObject = "file"
)
func (DeleteFileResponseObject) ToPointer ¶
func (e DeleteFileResponseObject) ToPointer() *DeleteFileResponseObject
func (*DeleteFileResponseObject) UnmarshalJSON ¶
func (e *DeleteFileResponseObject) UnmarshalJSON(data []byte) error
type DeleteModelResponse ¶
type DeleteModelResponse struct { Deleted bool `json:"deleted"` ID string `json:"id"` Object string `json:"object"` }
func (*DeleteModelResponse) GetDeleted ¶
func (o *DeleteModelResponse) GetDeleted() bool
func (*DeleteModelResponse) GetID ¶
func (o *DeleteModelResponse) GetID() string
func (*DeleteModelResponse) GetObject ¶
func (o *DeleteModelResponse) GetObject() string
type DeleteThreadResponse ¶
type DeleteThreadResponse struct { Deleted bool `json:"deleted"` ID string `json:"id"` Object DeleteThreadResponseObject `json:"object"` }
func (*DeleteThreadResponse) GetDeleted ¶
func (o *DeleteThreadResponse) GetDeleted() bool
func (*DeleteThreadResponse) GetID ¶
func (o *DeleteThreadResponse) GetID() string
func (*DeleteThreadResponse) GetObject ¶
func (o *DeleteThreadResponse) GetObject() DeleteThreadResponseObject
type DeleteThreadResponseObject ¶
type DeleteThreadResponseObject string
const (
DeleteThreadResponseObjectThreadDeleted DeleteThreadResponseObject = "thread.deleted"
)
func (DeleteThreadResponseObject) ToPointer ¶
func (e DeleteThreadResponseObject) ToPointer() *DeleteThreadResponseObject
func (*DeleteThreadResponseObject) UnmarshalJSON ¶
func (e *DeleteThreadResponseObject) UnmarshalJSON(data []byte) error
type Detail ¶
type Detail string
Detail - Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding).
func (*Detail) UnmarshalJSON ¶
type Embedding ¶
type Embedding struct { // The embedding vector, which is a list of floats. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings). // Embedding []float64 `json:"embedding"` // The index of the embedding in the list of embeddings. Index int64 `json:"index"` // The object type, which is always "embedding". Object EmbeddingObject `json:"object"` }
Embedding - Represents an embedding vector returned by embedding endpoint.
func (*Embedding) GetEmbedding ¶
func (*Embedding) GetObject ¶
func (o *Embedding) GetObject() EmbeddingObject
type EmbeddingObject ¶
type EmbeddingObject string
EmbeddingObject - The object type, which is always "embedding".
const (
EmbeddingObjectEmbedding EmbeddingObject = "embedding"
)
func (EmbeddingObject) ToPointer ¶
func (e EmbeddingObject) ToPointer() *EmbeddingObject
func (*EmbeddingObject) UnmarshalJSON ¶
func (e *EmbeddingObject) UnmarshalJSON(data []byte) error
type EncodingFormat ¶
type EncodingFormat string
EncodingFormat - The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).
const ( EncodingFormatFloat EncodingFormat = "float" EncodingFormatBase64 EncodingFormat = "base64" )
func (EncodingFormat) ToPointer ¶
func (e EncodingFormat) ToPointer() *EncodingFormat
func (*EncodingFormat) UnmarshalJSON ¶
func (e *EncodingFormat) UnmarshalJSON(data []byte) error
type Error ¶
type Error struct { // A machine-readable error code. Code string `json:"code"` // A human-readable error message. Message string `json:"message"` // The parameter that was invalid, usually `training_file` or `validation_file`. This field will be null if the failure was not parameter-specific. Param *string `json:"param"` }
Error - For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure.
func (*Error) GetMessage ¶
type File ¶
type File struct { Content []byte `multipartForm:"content"` FileName string `multipartForm:"name=file"` }
func (*File) GetContent ¶
func (*File) GetFileName ¶
type FileCitation ¶
type FileCitation struct { // The ID of the specific File the citation is from. FileID string `json:"file_id"` // The specific quote in the file. Quote string `json:"quote"` }
func (*FileCitation) GetFileID ¶
func (o *FileCitation) GetFileID() string
func (*FileCitation) GetQuote ¶
func (o *FileCitation) GetQuote() string
type FilePath ¶
type FilePath struct { // The ID of the file that was generated. FileID string `json:"file_id"` }
type FineTuningJob ¶
type FineTuningJob struct { // The Unix timestamp (in seconds) for when the fine-tuning job was created. CreatedAt int64 `json:"created_at"` // For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure. Error *Error `json:"error"` // The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running. FineTunedModel *string `json:"fine_tuned_model"` // The Unix timestamp (in seconds) for when the fine-tuning job was finished. The value will be null if the fine-tuning job is still running. FinishedAt *int64 `json:"finished_at"` // The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details. Hyperparameters FineTuningJobHyperparameters `json:"hyperparameters"` // The object identifier, which can be referenced in the API endpoints. ID string `json:"id"` // The base model that is being fine-tuned. Model string `json:"model"` // The object type, which is always "fine_tuning.job". Object FineTuningJobObject `json:"object"` // The organization that owns the fine-tuning job. OrganizationID string `json:"organization_id"` // The compiled results file ID(s) for the fine-tuning job. You can retrieve the results with the [Files API](/docs/api-reference/files/retrieve-contents). ResultFiles []string `json:"result_files"` // The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`. Status Status `json:"status"` // The total number of billable tokens processed by this fine-tuning job. The value will be null if the fine-tuning job is still running. TrainedTokens *int64 `json:"trained_tokens"` // The file ID used for training. You can retrieve the training data with the [Files API](/docs/api-reference/files/retrieve-contents). TrainingFile string `json:"training_file"` // The file ID used for validation. You can retrieve the validation results with the [Files API](/docs/api-reference/files/retrieve-contents). ValidationFile *string `json:"validation_file"` }
FineTuningJob - The `fine_tuning.job` object represents a fine-tuning job that has been created through the API.
func (*FineTuningJob) GetCreatedAt ¶
func (o *FineTuningJob) GetCreatedAt() int64
func (*FineTuningJob) GetError ¶
func (o *FineTuningJob) GetError() *Error
func (*FineTuningJob) GetFineTunedModel ¶
func (o *FineTuningJob) GetFineTunedModel() *string
func (*FineTuningJob) GetFinishedAt ¶
func (o *FineTuningJob) GetFinishedAt() *int64
func (*FineTuningJob) GetHyperparameters ¶
func (o *FineTuningJob) GetHyperparameters() FineTuningJobHyperparameters
func (*FineTuningJob) GetID ¶
func (o *FineTuningJob) GetID() string
func (*FineTuningJob) GetModel ¶
func (o *FineTuningJob) GetModel() string
func (*FineTuningJob) GetObject ¶
func (o *FineTuningJob) GetObject() FineTuningJobObject
func (*FineTuningJob) GetOrganizationID ¶
func (o *FineTuningJob) GetOrganizationID() string
func (*FineTuningJob) GetResultFiles ¶
func (o *FineTuningJob) GetResultFiles() []string
func (*FineTuningJob) GetStatus ¶
func (o *FineTuningJob) GetStatus() Status
func (*FineTuningJob) GetTrainedTokens ¶
func (o *FineTuningJob) GetTrainedTokens() *int64
func (*FineTuningJob) GetTrainingFile ¶
func (o *FineTuningJob) GetTrainingFile() string
func (*FineTuningJob) GetValidationFile ¶
func (o *FineTuningJob) GetValidationFile() *string
type FineTuningJob1 ¶
type FineTuningJob1 string
const (
FineTuningJob1Auto FineTuningJob1 = "auto"
)
func (FineTuningJob1) ToPointer ¶
func (e FineTuningJob1) ToPointer() *FineTuningJob1
func (*FineTuningJob1) UnmarshalJSON ¶
func (e *FineTuningJob1) UnmarshalJSON(data []byte) error
type FineTuningJobEvent ¶
type FineTuningJobEvent struct { CreatedAt int64 `json:"created_at"` ID string `json:"id"` Level Level `json:"level"` Message string `json:"message"` Object FineTuningJobEventObject `json:"object"` }
FineTuningJobEvent - Fine-tuning job event object
func (*FineTuningJobEvent) GetCreatedAt ¶
func (o *FineTuningJobEvent) GetCreatedAt() int64
func (*FineTuningJobEvent) GetID ¶
func (o *FineTuningJobEvent) GetID() string
func (*FineTuningJobEvent) GetLevel ¶
func (o *FineTuningJobEvent) GetLevel() Level
func (*FineTuningJobEvent) GetMessage ¶
func (o *FineTuningJobEvent) GetMessage() string
func (*FineTuningJobEvent) GetObject ¶
func (o *FineTuningJobEvent) GetObject() FineTuningJobEventObject
type FineTuningJobEventObject ¶
type FineTuningJobEventObject string
const (
FineTuningJobEventObjectFineTuningJobEvent FineTuningJobEventObject = "fine_tuning.job.event"
)
func (FineTuningJobEventObject) ToPointer ¶
func (e FineTuningJobEventObject) ToPointer() *FineTuningJobEventObject
func (*FineTuningJobEventObject) UnmarshalJSON ¶
func (e *FineTuningJobEventObject) UnmarshalJSON(data []byte) error
type FineTuningJobHyperparameters ¶
type FineTuningJobHyperparameters struct { // The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. // "auto" decides the optimal number of epochs based on the size of the dataset. If setting the number manually, we support any number between 1 and 50 epochs. NEpochs FineTuningJobNEpochs `json:"n_epochs"` }
FineTuningJobHyperparameters - The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details.
func (*FineTuningJobHyperparameters) GetNEpochs ¶
func (o *FineTuningJobHyperparameters) GetNEpochs() FineTuningJobNEpochs
type FineTuningJobNEpochs ¶
type FineTuningJobNEpochs struct { FineTuningJob1 *FineTuningJob1 Integer *int64 Type FineTuningJobNEpochsType }
FineTuningJobNEpochs - The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. "auto" decides the optimal number of epochs based on the size of the dataset. If setting the number manually, we support any number between 1 and 50 epochs.
func CreateFineTuningJobNEpochsFineTuningJob1 ¶
func CreateFineTuningJobNEpochsFineTuningJob1(fineTuningJob1 FineTuningJob1) FineTuningJobNEpochs
func CreateFineTuningJobNEpochsInteger ¶
func CreateFineTuningJobNEpochsInteger(integer int64) FineTuningJobNEpochs
func (FineTuningJobNEpochs) MarshalJSON ¶
func (u FineTuningJobNEpochs) MarshalJSON() ([]byte, error)
func (*FineTuningJobNEpochs) UnmarshalJSON ¶
func (u *FineTuningJobNEpochs) UnmarshalJSON(data []byte) error
type FineTuningJobNEpochsType ¶
type FineTuningJobNEpochsType string
const ( FineTuningJobNEpochsTypeFineTuningJob1 FineTuningJobNEpochsType = "FineTuningJob_1" FineTuningJobNEpochsTypeInteger FineTuningJobNEpochsType = "integer" )
type FineTuningJobObject ¶
type FineTuningJobObject string
FineTuningJobObject - The object type, which is always "fine_tuning.job".
const (
FineTuningJobObjectFineTuningJob FineTuningJobObject = "fine_tuning.job"
)
func (FineTuningJobObject) ToPointer ¶
func (e FineTuningJobObject) ToPointer() *FineTuningJobObject
func (*FineTuningJobObject) UnmarshalJSON ¶
func (e *FineTuningJobObject) UnmarshalJSON(data []byte) error
type FinishReason ¶
type FinishReason string
FinishReason - The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, `content_filter` if content was omitted due to a flag from our content filters, `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.
const ( FinishReasonStop FinishReason = "stop" FinishReasonLength FinishReason = "length" FinishReasonToolCalls FinishReason = "tool_calls" FinishReasonContentFilter FinishReason = "content_filter" FinishReasonFunctionCall FinishReason = "function_call" )
func (FinishReason) ToPointer ¶
func (e FinishReason) ToPointer() *FinishReason
func (*FinishReason) UnmarshalJSON ¶
func (e *FinishReason) UnmarshalJSON(data []byte) error
type Function ¶
type Function struct { // The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. Arguments string `json:"arguments"` // The name of the function to call. Name string `json:"name"` }
Function - The function that the model called.
func (*Function) GetArguments ¶
type FunctionCall ¶
type FunctionCall struct { // The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. Arguments string `json:"arguments"` // The name of the function to call. Name string `json:"name"` }
FunctionCall - Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.
Deprecated type: This will be removed in a future release, please migrate away from it as soon as possible.
func (*FunctionCall) GetArguments ¶
func (o *FunctionCall) GetArguments() string
func (*FunctionCall) GetName ¶
func (o *FunctionCall) GetName() string
type FunctionObject ¶
type FunctionObject struct { // A description of what the function does, used by the model to choose when and how to call the function. Description *string `json:"description,omitempty"` // The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64. Name string `json:"name"` // The parameters the functions accepts, described as a JSON Schema object. See the [guide](/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. // // Omitting `parameters` defines a function with an empty parameter list. Parameters map[string]interface{} `json:"parameters,omitempty"` }
func (*FunctionObject) GetDescription ¶
func (o *FunctionObject) GetDescription() *string
func (*FunctionObject) GetName ¶
func (o *FunctionObject) GetName() string
func (*FunctionObject) GetParameters ¶
func (o *FunctionObject) GetParameters() map[string]interface{}
type Hyperparameters ¶
type Hyperparameters struct { // Number of examples in each batch. A larger batch size means that model parameters // are updated less frequently, but with lower variance. // BatchSize *BatchSize `json:"batch_size,omitempty"` // Scaling factor for the learning rate. A smaller learning rate may be useful to avoid // overfitting. // LearningRateMultiplier *LearningRateMultiplier `json:"learning_rate_multiplier,omitempty"` // The number of epochs to train the model for. An epoch refers to one full cycle // through the training dataset. // NEpochs *NEpochs `json:"n_epochs,omitempty"` }
Hyperparameters - The hyperparameters used for the fine-tuning job.
func (*Hyperparameters) GetBatchSize ¶
func (o *Hyperparameters) GetBatchSize() *BatchSize
func (*Hyperparameters) GetLearningRateMultiplier ¶
func (o *Hyperparameters) GetLearningRateMultiplier() *LearningRateMultiplier
func (*Hyperparameters) GetNEpochs ¶
func (o *Hyperparameters) GetNEpochs() *NEpochs
type Image ¶
type Image struct { // The base64-encoded JSON of the generated image, if `response_format` is `b64_json`. B64JSON *string `json:"b64_json,omitempty"` // The prompt that was used to generate the image, if there was any revision to the prompt. RevisedPrompt *string `json:"revised_prompt,omitempty"` // The URL of the generated image, if `response_format` is `url` (default). URL *string `json:"url,omitempty"` }
Image - Represents the url or the content of an image generated by the OpenAI API.
func (*Image) GetB64JSON ¶
func (*Image) GetRevisedPrompt ¶
type ImageFile ¶
type ImageFile struct { // The [File](/docs/api-reference/files) ID of the image in the message content. FileID string `json:"file_id"` }
type ImageURL ¶
type ImageURL struct { // Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding). Detail *Detail `default:"auto" json:"detail"` // Either a URL of the image or the base64 encoded image data. URL string `json:"url"` }
func (ImageURL) MarshalJSON ¶
func (*ImageURL) UnmarshalJSON ¶
type ImagesResponse ¶
func (*ImagesResponse) GetCreated ¶
func (o *ImagesResponse) GetCreated() int64
func (*ImagesResponse) GetData ¶
func (o *ImagesResponse) GetData() []Image
type Input ¶
type Input struct { Str *string ArrayOfstr []string ArrayOfinteger []int64 ArrayOfarrayOfinteger [][]int64 Type InputType }
Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.
func CreateInputArrayOfstr ¶
func CreateInputStr ¶
func (Input) MarshalJSON ¶
func (*Input) UnmarshalJSON ¶
type LastError ¶
type LastError struct { // One of `server_error` or `rate_limit_exceeded`. Code Code `json:"code"` // A human-readable description of the error. Message string `json:"message"` }
LastError - The last error associated with this run. Will be `null` if there are no errors.
func (*LastError) GetMessage ¶
type LearningRateMultiplier ¶
type LearningRateMultiplier struct { CreateFineTuningJobRequestSchemas1 *CreateFineTuningJobRequestSchemas1 Number *float64 Type LearningRateMultiplierType }
LearningRateMultiplier - Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
func CreateLearningRateMultiplierCreateFineTuningJobRequestSchemas1 ¶
func CreateLearningRateMultiplierCreateFineTuningJobRequestSchemas1(createFineTuningJobRequestSchemas1 CreateFineTuningJobRequestSchemas1) LearningRateMultiplier
func CreateLearningRateMultiplierNumber ¶
func CreateLearningRateMultiplierNumber(number float64) LearningRateMultiplier
func (LearningRateMultiplier) MarshalJSON ¶
func (u LearningRateMultiplier) MarshalJSON() ([]byte, error)
func (*LearningRateMultiplier) UnmarshalJSON ¶
func (u *LearningRateMultiplier) UnmarshalJSON(data []byte) error
type LearningRateMultiplierType ¶
type LearningRateMultiplierType string
const ( LearningRateMultiplierTypeCreateFineTuningJobRequestSchemas1 LearningRateMultiplierType = "CreateFineTuningJobRequest_Schemas_1" LearningRateMultiplierTypeNumber LearningRateMultiplierType = "number" )
type ListAssistantFilesResponse ¶
type ListAssistantFilesResponse struct { Data []AssistantFileObject `json:"data"` FirstID string `json:"first_id"` HasMore bool `json:"has_more"` LastID string `json:"last_id"` Object string `json:"object"` }
func (*ListAssistantFilesResponse) GetData ¶
func (o *ListAssistantFilesResponse) GetData() []AssistantFileObject
func (*ListAssistantFilesResponse) GetFirstID ¶
func (o *ListAssistantFilesResponse) GetFirstID() string
func (*ListAssistantFilesResponse) GetHasMore ¶
func (o *ListAssistantFilesResponse) GetHasMore() bool
func (*ListAssistantFilesResponse) GetLastID ¶
func (o *ListAssistantFilesResponse) GetLastID() string
func (*ListAssistantFilesResponse) GetObject ¶
func (o *ListAssistantFilesResponse) GetObject() string
type ListAssistantsResponse ¶
type ListAssistantsResponse struct { Data []AssistantObject `json:"data"` FirstID string `json:"first_id"` HasMore bool `json:"has_more"` LastID string `json:"last_id"` Object string `json:"object"` }
func (*ListAssistantsResponse) GetData ¶
func (o *ListAssistantsResponse) GetData() []AssistantObject
func (*ListAssistantsResponse) GetFirstID ¶
func (o *ListAssistantsResponse) GetFirstID() string
func (*ListAssistantsResponse) GetHasMore ¶
func (o *ListAssistantsResponse) GetHasMore() bool
func (*ListAssistantsResponse) GetLastID ¶
func (o *ListAssistantsResponse) GetLastID() string
func (*ListAssistantsResponse) GetObject ¶
func (o *ListAssistantsResponse) GetObject() string
type ListFilesResponse ¶
type ListFilesResponse struct { Data []OpenAIFile `json:"data"` Object ListFilesResponseObject `json:"object"` }
func (*ListFilesResponse) GetData ¶
func (o *ListFilesResponse) GetData() []OpenAIFile
func (*ListFilesResponse) GetObject ¶
func (o *ListFilesResponse) GetObject() ListFilesResponseObject
type ListFilesResponseObject ¶
type ListFilesResponseObject string
const (
ListFilesResponseObjectList ListFilesResponseObject = "list"
)
func (ListFilesResponseObject) ToPointer ¶
func (e ListFilesResponseObject) ToPointer() *ListFilesResponseObject
func (*ListFilesResponseObject) UnmarshalJSON ¶
func (e *ListFilesResponseObject) UnmarshalJSON(data []byte) error
type ListFineTuningJobEventsResponse ¶
type ListFineTuningJobEventsResponse struct { Data []FineTuningJobEvent `json:"data"` Object ListFineTuningJobEventsResponseObject `json:"object"` }
func (*ListFineTuningJobEventsResponse) GetData ¶
func (o *ListFineTuningJobEventsResponse) GetData() []FineTuningJobEvent
func (*ListFineTuningJobEventsResponse) GetObject ¶
func (o *ListFineTuningJobEventsResponse) GetObject() ListFineTuningJobEventsResponseObject
type ListFineTuningJobEventsResponseObject ¶
type ListFineTuningJobEventsResponseObject string
const (
ListFineTuningJobEventsResponseObjectList ListFineTuningJobEventsResponseObject = "list"
)
func (ListFineTuningJobEventsResponseObject) ToPointer ¶
func (e ListFineTuningJobEventsResponseObject) ToPointer() *ListFineTuningJobEventsResponseObject
func (*ListFineTuningJobEventsResponseObject) UnmarshalJSON ¶
func (e *ListFineTuningJobEventsResponseObject) UnmarshalJSON(data []byte) error
type ListMessageFilesResponse ¶
type ListMessageFilesResponse struct { Data []MessageFileObject `json:"data"` FirstID string `json:"first_id"` HasMore bool `json:"has_more"` LastID string `json:"last_id"` Object string `json:"object"` }
func (*ListMessageFilesResponse) GetData ¶
func (o *ListMessageFilesResponse) GetData() []MessageFileObject
func (*ListMessageFilesResponse) GetFirstID ¶
func (o *ListMessageFilesResponse) GetFirstID() string
func (*ListMessageFilesResponse) GetHasMore ¶
func (o *ListMessageFilesResponse) GetHasMore() bool
func (*ListMessageFilesResponse) GetLastID ¶
func (o *ListMessageFilesResponse) GetLastID() string
func (*ListMessageFilesResponse) GetObject ¶
func (o *ListMessageFilesResponse) GetObject() string
type ListMessagesResponse ¶
type ListMessagesResponse struct { Data []MessageObject `json:"data"` FirstID string `json:"first_id"` HasMore bool `json:"has_more"` LastID string `json:"last_id"` Object string `json:"object"` }
func (*ListMessagesResponse) GetData ¶
func (o *ListMessagesResponse) GetData() []MessageObject
func (*ListMessagesResponse) GetFirstID ¶
func (o *ListMessagesResponse) GetFirstID() string
func (*ListMessagesResponse) GetHasMore ¶
func (o *ListMessagesResponse) GetHasMore() bool
func (*ListMessagesResponse) GetLastID ¶
func (o *ListMessagesResponse) GetLastID() string
func (*ListMessagesResponse) GetObject ¶
func (o *ListMessagesResponse) GetObject() string
type ListModelsResponse ¶
type ListModelsResponse struct { Data []Model `json:"data"` Object ListModelsResponseObject `json:"object"` }
func (*ListModelsResponse) GetData ¶
func (o *ListModelsResponse) GetData() []Model
func (*ListModelsResponse) GetObject ¶
func (o *ListModelsResponse) GetObject() ListModelsResponseObject
type ListModelsResponseObject ¶
type ListModelsResponseObject string
const (
ListModelsResponseObjectList ListModelsResponseObject = "list"
)
func (ListModelsResponseObject) ToPointer ¶
func (e ListModelsResponseObject) ToPointer() *ListModelsResponseObject
func (*ListModelsResponseObject) UnmarshalJSON ¶
func (e *ListModelsResponseObject) UnmarshalJSON(data []byte) error
type ListPaginatedFineTuningJobsResponse ¶
type ListPaginatedFineTuningJobsResponse struct { Data []FineTuningJob `json:"data"` HasMore bool `json:"has_more"` Object ListPaginatedFineTuningJobsResponseObject `json:"object"` }
func (*ListPaginatedFineTuningJobsResponse) GetData ¶
func (o *ListPaginatedFineTuningJobsResponse) GetData() []FineTuningJob
func (*ListPaginatedFineTuningJobsResponse) GetHasMore ¶
func (o *ListPaginatedFineTuningJobsResponse) GetHasMore() bool
func (*ListPaginatedFineTuningJobsResponse) GetObject ¶
func (o *ListPaginatedFineTuningJobsResponse) GetObject() ListPaginatedFineTuningJobsResponseObject
type ListPaginatedFineTuningJobsResponseObject ¶
type ListPaginatedFineTuningJobsResponseObject string
const (
ListPaginatedFineTuningJobsResponseObjectList ListPaginatedFineTuningJobsResponseObject = "list"
)
func (ListPaginatedFineTuningJobsResponseObject) ToPointer ¶
func (e ListPaginatedFineTuningJobsResponseObject) ToPointer() *ListPaginatedFineTuningJobsResponseObject
func (*ListPaginatedFineTuningJobsResponseObject) UnmarshalJSON ¶
func (e *ListPaginatedFineTuningJobsResponseObject) UnmarshalJSON(data []byte) error
type ListRunStepsResponse ¶
type ListRunStepsResponse struct { Data []RunStepObject `json:"data"` FirstID string `json:"first_id"` HasMore bool `json:"has_more"` LastID string `json:"last_id"` Object string `json:"object"` }
func (*ListRunStepsResponse) GetData ¶
func (o *ListRunStepsResponse) GetData() []RunStepObject
func (*ListRunStepsResponse) GetFirstID ¶
func (o *ListRunStepsResponse) GetFirstID() string
func (*ListRunStepsResponse) GetHasMore ¶
func (o *ListRunStepsResponse) GetHasMore() bool
func (*ListRunStepsResponse) GetLastID ¶
func (o *ListRunStepsResponse) GetLastID() string
func (*ListRunStepsResponse) GetObject ¶
func (o *ListRunStepsResponse) GetObject() string
type ListRunsResponse ¶
type ListRunsResponse struct { Data []RunObject `json:"data"` FirstID string `json:"first_id"` HasMore bool `json:"has_more"` LastID string `json:"last_id"` Object string `json:"object"` }
func (*ListRunsResponse) GetData ¶
func (o *ListRunsResponse) GetData() []RunObject
func (*ListRunsResponse) GetFirstID ¶
func (o *ListRunsResponse) GetFirstID() string
func (*ListRunsResponse) GetHasMore ¶
func (o *ListRunsResponse) GetHasMore() bool
func (*ListRunsResponse) GetLastID ¶
func (o *ListRunsResponse) GetLastID() string
func (*ListRunsResponse) GetObject ¶
func (o *ListRunsResponse) GetObject() string
type Logprobs ¶
type Logprobs struct { // A list of message content tokens with log probability information. Content []ChatCompletionTokenLogprob `json:"content"` }
Logprobs - Log probability information for the choice.
func (*Logprobs) GetContent ¶
func (o *Logprobs) GetContent() []ChatCompletionTokenLogprob
type Mask ¶
type Mask struct { Content []byte `multipartForm:"content"` FileName string `multipartForm:"name=mask"` }
func (*Mask) GetContent ¶
func (*Mask) GetFileName ¶
type MessageContentImageFileObject ¶
type MessageContentImageFileObject struct { ImageFile ImageFile `json:"image_file"` // Always `image_file`. Type MessageContentImageFileObjectType `json:"type"` }
MessageContentImageFileObject - References an image File(/docs/api-reference/files) in the content of a message.
func (*MessageContentImageFileObject) GetImageFile ¶
func (o *MessageContentImageFileObject) GetImageFile() ImageFile
func (*MessageContentImageFileObject) GetType ¶
func (o *MessageContentImageFileObject) GetType() MessageContentImageFileObjectType
type MessageContentImageFileObjectType ¶
type MessageContentImageFileObjectType string
MessageContentImageFileObjectType - Always `image_file`.
const (
MessageContentImageFileObjectTypeImageFile MessageContentImageFileObjectType = "image_file"
)
func (MessageContentImageFileObjectType) ToPointer ¶
func (e MessageContentImageFileObjectType) ToPointer() *MessageContentImageFileObjectType
func (*MessageContentImageFileObjectType) UnmarshalJSON ¶
func (e *MessageContentImageFileObjectType) UnmarshalJSON(data []byte) error
type MessageContentTextAnnotationsFileCitationObject ¶
type MessageContentTextAnnotationsFileCitationObject struct { EndIndex int64 `json:"end_index"` FileCitation FileCitation `json:"file_citation"` StartIndex int64 `json:"start_index"` // The text in the message content that needs to be replaced. Text string `json:"text"` // Always `file_citation`. Type MessageContentTextAnnotationsFileCitationObjectType `json:"type"` }
MessageContentTextAnnotationsFileCitationObject - A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the "retrieval" tool to search files.
func (*MessageContentTextAnnotationsFileCitationObject) GetEndIndex ¶
func (o *MessageContentTextAnnotationsFileCitationObject) GetEndIndex() int64
func (*MessageContentTextAnnotationsFileCitationObject) GetFileCitation ¶
func (o *MessageContentTextAnnotationsFileCitationObject) GetFileCitation() FileCitation
func (*MessageContentTextAnnotationsFileCitationObject) GetStartIndex ¶
func (o *MessageContentTextAnnotationsFileCitationObject) GetStartIndex() int64
func (*MessageContentTextAnnotationsFileCitationObject) GetText ¶
func (o *MessageContentTextAnnotationsFileCitationObject) GetText() string
type MessageContentTextAnnotationsFileCitationObjectType ¶
type MessageContentTextAnnotationsFileCitationObjectType string
MessageContentTextAnnotationsFileCitationObjectType - Always `file_citation`.
const (
MessageContentTextAnnotationsFileCitationObjectTypeFileCitation MessageContentTextAnnotationsFileCitationObjectType = "file_citation"
)
func (*MessageContentTextAnnotationsFileCitationObjectType) UnmarshalJSON ¶
func (e *MessageContentTextAnnotationsFileCitationObjectType) UnmarshalJSON(data []byte) error
type MessageContentTextAnnotationsFilePathObject ¶
type MessageContentTextAnnotationsFilePathObject struct { EndIndex int64 `json:"end_index"` FilePath FilePath `json:"file_path"` StartIndex int64 `json:"start_index"` // The text in the message content that needs to be replaced. Text string `json:"text"` // Always `file_path`. Type MessageContentTextAnnotationsFilePathObjectType `json:"type"` }
MessageContentTextAnnotationsFilePathObject - A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.
func (*MessageContentTextAnnotationsFilePathObject) GetEndIndex ¶
func (o *MessageContentTextAnnotationsFilePathObject) GetEndIndex() int64
func (*MessageContentTextAnnotationsFilePathObject) GetFilePath ¶
func (o *MessageContentTextAnnotationsFilePathObject) GetFilePath() FilePath
func (*MessageContentTextAnnotationsFilePathObject) GetStartIndex ¶
func (o *MessageContentTextAnnotationsFilePathObject) GetStartIndex() int64
func (*MessageContentTextAnnotationsFilePathObject) GetText ¶
func (o *MessageContentTextAnnotationsFilePathObject) GetText() string
type MessageContentTextAnnotationsFilePathObjectType ¶
type MessageContentTextAnnotationsFilePathObjectType string
MessageContentTextAnnotationsFilePathObjectType - Always `file_path`.
const (
MessageContentTextAnnotationsFilePathObjectTypeFilePath MessageContentTextAnnotationsFilePathObjectType = "file_path"
)
func (*MessageContentTextAnnotationsFilePathObjectType) UnmarshalJSON ¶
func (e *MessageContentTextAnnotationsFilePathObjectType) UnmarshalJSON(data []byte) error
type MessageContentTextObject ¶
type MessageContentTextObject struct { Text Text `json:"text"` // Always `text`. Type MessageContentTextObjectType `json:"type"` }
MessageContentTextObject - The text content that is part of a message.
func (*MessageContentTextObject) GetText ¶
func (o *MessageContentTextObject) GetText() Text
func (*MessageContentTextObject) GetType ¶
func (o *MessageContentTextObject) GetType() MessageContentTextObjectType
type MessageContentTextObjectType ¶
type MessageContentTextObjectType string
MessageContentTextObjectType - Always `text`.
const (
MessageContentTextObjectTypeText MessageContentTextObjectType = "text"
)
func (MessageContentTextObjectType) ToPointer ¶
func (e MessageContentTextObjectType) ToPointer() *MessageContentTextObjectType
func (*MessageContentTextObjectType) UnmarshalJSON ¶
func (e *MessageContentTextObjectType) UnmarshalJSON(data []byte) error
type MessageCreation ¶
type MessageCreation struct { // The ID of the message that was created by this run step. MessageID string `json:"message_id"` }
func (*MessageCreation) GetMessageID ¶
func (o *MessageCreation) GetMessageID() string
type MessageFileObject ¶
type MessageFileObject struct { // The Unix timestamp (in seconds) for when the message file was created. CreatedAt int64 `json:"created_at"` // The identifier, which can be referenced in API endpoints. ID string `json:"id"` // The ID of the [message](/docs/api-reference/messages) that the [File](/docs/api-reference/files) is attached to. MessageID string `json:"message_id"` // The object type, which is always `thread.message.file`. Object MessageFileObjectObject `json:"object"` }
MessageFileObject - A list of files attached to a `message`.
func (*MessageFileObject) GetCreatedAt ¶
func (o *MessageFileObject) GetCreatedAt() int64
func (*MessageFileObject) GetID ¶
func (o *MessageFileObject) GetID() string
func (*MessageFileObject) GetMessageID ¶
func (o *MessageFileObject) GetMessageID() string
func (*MessageFileObject) GetObject ¶
func (o *MessageFileObject) GetObject() MessageFileObjectObject
type MessageFileObjectObject ¶
type MessageFileObjectObject string
MessageFileObjectObject - The object type, which is always `thread.message.file`.
const (
MessageFileObjectObjectThreadMessageFile MessageFileObjectObject = "thread.message.file"
)
func (MessageFileObjectObject) ToPointer ¶
func (e MessageFileObjectObject) ToPointer() *MessageFileObjectObject
func (*MessageFileObjectObject) UnmarshalJSON ¶
func (e *MessageFileObjectObject) UnmarshalJSON(data []byte) error
type MessageObject ¶
type MessageObject struct { // If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message. AssistantID *string `json:"assistant_id"` // The content of the message in array of text and/or images. Content []MessageObjectContent `json:"content"` // The Unix timestamp (in seconds) for when the message was created. CreatedAt int64 `json:"created_at"` // A list of [file](/docs/api-reference/files) IDs that the assistant should use. Useful for tools like retrieval and code_interpreter that can access files. A maximum of 10 files can be attached to a message. FileIds []string `json:"file_ids"` // The identifier, which can be referenced in API endpoints. ID string `json:"id"` // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *MessageObjectMetadata `json:"metadata"` // The object type, which is always `thread.message`. Object MessageObjectObject `json:"object"` // The entity that produced the message. One of `user` or `assistant`. Role MessageObjectRole `json:"role"` // If applicable, the ID of the [run](/docs/api-reference/runs) associated with the authoring of this message. RunID *string `json:"run_id"` // The [thread](/docs/api-reference/threads) ID that this message belongs to. ThreadID string `json:"thread_id"` }
MessageObject - Represents a message within a [thread](/docs/api-reference/threads).
func (*MessageObject) GetAssistantID ¶
func (o *MessageObject) GetAssistantID() *string
func (*MessageObject) GetContent ¶
func (o *MessageObject) GetContent() []MessageObjectContent
func (*MessageObject) GetCreatedAt ¶
func (o *MessageObject) GetCreatedAt() int64
func (*MessageObject) GetFileIds ¶
func (o *MessageObject) GetFileIds() []string
func (*MessageObject) GetID ¶
func (o *MessageObject) GetID() string
func (*MessageObject) GetMetadata ¶
func (o *MessageObject) GetMetadata() *MessageObjectMetadata
func (*MessageObject) GetObject ¶
func (o *MessageObject) GetObject() MessageObjectObject
func (*MessageObject) GetRole ¶
func (o *MessageObject) GetRole() MessageObjectRole
func (*MessageObject) GetRunID ¶
func (o *MessageObject) GetRunID() *string
func (*MessageObject) GetThreadID ¶
func (o *MessageObject) GetThreadID() string
type MessageObjectContent ¶
type MessageObjectContent struct { MessageContentImageFileObject *MessageContentImageFileObject MessageContentTextObject *MessageContentTextObject Type MessageObjectContentType }
func CreateMessageObjectContentMessageContentImageFileObject ¶
func CreateMessageObjectContentMessageContentImageFileObject(messageContentImageFileObject MessageContentImageFileObject) MessageObjectContent
func CreateMessageObjectContentMessageContentTextObject ¶
func CreateMessageObjectContentMessageContentTextObject(messageContentTextObject MessageContentTextObject) MessageObjectContent
func (MessageObjectContent) MarshalJSON ¶
func (u MessageObjectContent) MarshalJSON() ([]byte, error)
func (*MessageObjectContent) UnmarshalJSON ¶
func (u *MessageObjectContent) UnmarshalJSON(data []byte) error
type MessageObjectContentType ¶
type MessageObjectContentType string
const ( MessageObjectContentTypeMessageContentImageFileObject MessageObjectContentType = "MessageContentImageFileObject" MessageObjectContentTypeMessageContentTextObject MessageObjectContentType = "MessageContentTextObject" )
type MessageObjectMetadata ¶
type MessageObjectMetadata struct { }
MessageObjectMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type MessageObjectObject ¶
type MessageObjectObject string
MessageObjectObject - The object type, which is always `thread.message`.
const (
MessageObjectObjectThreadMessage MessageObjectObject = "thread.message"
)
func (MessageObjectObject) ToPointer ¶
func (e MessageObjectObject) ToPointer() *MessageObjectObject
func (*MessageObjectObject) UnmarshalJSON ¶
func (e *MessageObjectObject) UnmarshalJSON(data []byte) error
type MessageObjectRole ¶
type MessageObjectRole string
MessageObjectRole - The entity that produced the message. One of `user` or `assistant`.
const ( MessageObjectRoleUser MessageObjectRole = "user" MessageObjectRoleAssistant MessageObjectRole = "assistant" )
func (MessageObjectRole) ToPointer ¶
func (e MessageObjectRole) ToPointer() *MessageObjectRole
func (*MessageObjectRole) UnmarshalJSON ¶
func (e *MessageObjectRole) UnmarshalJSON(data []byte) error
type Metadata ¶
type Metadata struct { }
Metadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type Model ¶
type Model struct { // The Unix timestamp (in seconds) when the model was created. Created int64 `json:"created"` // The model identifier, which can be referenced in the API endpoints. ID string `json:"id"` // The object type, which is always "model". Object ModelObject `json:"object"` // The organization that owns the model. OwnedBy string `json:"owned_by"` }
Model - Describes an OpenAI model offering that can be used with the API.
func (*Model) GetCreated ¶
func (*Model) GetObject ¶
func (o *Model) GetObject() ModelObject
func (*Model) GetOwnedBy ¶
type ModelObject ¶
type ModelObject string
ModelObject - The object type, which is always "model".
const (
ModelObjectModel ModelObject = "model"
)
func (ModelObject) ToPointer ¶
func (e ModelObject) ToPointer() *ModelObject
func (*ModelObject) UnmarshalJSON ¶
func (e *ModelObject) UnmarshalJSON(data []byte) error
type ModifyAssistantRequest ¶
type ModifyAssistantRequest struct { // The description of the assistant. The maximum length is 512 characters. // Description *string `json:"description,omitempty"` // A list of [File](/docs/api-reference/files) IDs attached to this assistant. There can be a maximum of 20 files attached to the assistant. Files are ordered by their creation date in ascending order. If a file was previously attached to the list but does not show up in the list, it will be deleted from the assistant. // FileIds []string `json:"file_ids,omitempty"` // The system instructions that the assistant uses. The maximum length is 32768 characters. // Instructions *string `json:"instructions,omitempty"` // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *ModifyAssistantRequestMetadata `json:"metadata,omitempty"` // 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,omitempty"` // The name of the assistant. The maximum length is 256 characters. // Name *string `json:"name,omitempty"` // A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant. Tools can be of types `code_interpreter`, `retrieval`, or `function`. // Tools []ModifyAssistantRequestTools `json:"tools,omitempty"` }
func (*ModifyAssistantRequest) GetDescription ¶
func (o *ModifyAssistantRequest) GetDescription() *string
func (*ModifyAssistantRequest) GetFileIds ¶
func (o *ModifyAssistantRequest) GetFileIds() []string
func (*ModifyAssistantRequest) GetInstructions ¶
func (o *ModifyAssistantRequest) GetInstructions() *string
func (*ModifyAssistantRequest) GetMetadata ¶
func (o *ModifyAssistantRequest) GetMetadata() *ModifyAssistantRequestMetadata
func (*ModifyAssistantRequest) GetModel ¶
func (o *ModifyAssistantRequest) GetModel() *string
func (*ModifyAssistantRequest) GetName ¶
func (o *ModifyAssistantRequest) GetName() *string
func (*ModifyAssistantRequest) GetTools ¶
func (o *ModifyAssistantRequest) GetTools() []ModifyAssistantRequestTools
type ModifyAssistantRequestMetadata ¶
type ModifyAssistantRequestMetadata struct { }
ModifyAssistantRequestMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type ModifyAssistantRequestTools ¶
type ModifyAssistantRequestTools struct { AssistantToolsCode *AssistantToolsCode AssistantToolsRetrieval *AssistantToolsRetrieval AssistantToolsFunction *AssistantToolsFunction Type ModifyAssistantRequestToolsType }
func CreateModifyAssistantRequestToolsAssistantToolsCode ¶
func CreateModifyAssistantRequestToolsAssistantToolsCode(assistantToolsCode AssistantToolsCode) ModifyAssistantRequestTools
func CreateModifyAssistantRequestToolsAssistantToolsFunction ¶
func CreateModifyAssistantRequestToolsAssistantToolsFunction(assistantToolsFunction AssistantToolsFunction) ModifyAssistantRequestTools
func CreateModifyAssistantRequestToolsAssistantToolsRetrieval ¶
func CreateModifyAssistantRequestToolsAssistantToolsRetrieval(assistantToolsRetrieval AssistantToolsRetrieval) ModifyAssistantRequestTools
func (ModifyAssistantRequestTools) MarshalJSON ¶
func (u ModifyAssistantRequestTools) MarshalJSON() ([]byte, error)
func (*ModifyAssistantRequestTools) UnmarshalJSON ¶
func (u *ModifyAssistantRequestTools) UnmarshalJSON(data []byte) error
type ModifyAssistantRequestToolsType ¶
type ModifyAssistantRequestToolsType string
const ( ModifyAssistantRequestToolsTypeAssistantToolsCode ModifyAssistantRequestToolsType = "AssistantToolsCode" ModifyAssistantRequestToolsTypeAssistantToolsRetrieval ModifyAssistantRequestToolsType = "AssistantToolsRetrieval" ModifyAssistantRequestToolsTypeAssistantToolsFunction ModifyAssistantRequestToolsType = "AssistantToolsFunction" )
type ModifyMessageRequest ¶
type ModifyMessageRequest struct { // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *ModifyMessageRequestMetadata `json:"metadata,omitempty"` }
func (*ModifyMessageRequest) GetMetadata ¶
func (o *ModifyMessageRequest) GetMetadata() *ModifyMessageRequestMetadata
type ModifyMessageRequestMetadata ¶
type ModifyMessageRequestMetadata struct { }
ModifyMessageRequestMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type ModifyRunRequest ¶
type ModifyRunRequest struct { // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *ModifyRunRequestMetadata `json:"metadata,omitempty"` }
func (*ModifyRunRequest) GetMetadata ¶
func (o *ModifyRunRequest) GetMetadata() *ModifyRunRequestMetadata
type ModifyRunRequestMetadata ¶
type ModifyRunRequestMetadata struct { }
ModifyRunRequestMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type ModifyThreadRequest ¶
type ModifyThreadRequest struct { // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *ModifyThreadRequestMetadata `json:"metadata,omitempty"` }
func (*ModifyThreadRequest) GetMetadata ¶
func (o *ModifyThreadRequest) GetMetadata() *ModifyThreadRequestMetadata
type ModifyThreadRequestMetadata ¶
type ModifyThreadRequestMetadata struct { }
ModifyThreadRequestMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type NEpochs ¶
type NEpochs struct { CreateFineTuningJobRequestSchemasHyperparameters1 *CreateFineTuningJobRequestSchemasHyperparameters1 Integer *int64 Type NEpochsType }
NEpochs - The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
func CreateNEpochsCreateFineTuningJobRequestSchemasHyperparameters1 ¶
func CreateNEpochsCreateFineTuningJobRequestSchemasHyperparameters1(createFineTuningJobRequestSchemasHyperparameters1 CreateFineTuningJobRequestSchemasHyperparameters1) NEpochs
func CreateNEpochsInteger ¶
func (NEpochs) MarshalJSON ¶
func (*NEpochs) UnmarshalJSON ¶
type NEpochsType ¶
type NEpochsType string
const ( NEpochsTypeCreateFineTuningJobRequestSchemasHyperparameters1 NEpochsType = "CreateFineTuningJobRequest_Schemas_hyperparameters_1" NEpochsTypeInteger NEpochsType = "integer" )
type Object ¶
type Object string
Object - The object type, which is always `assistant.file`.
const (
ObjectAssistantFile Object = "assistant.file"
)
func (*Object) UnmarshalJSON ¶
type One ¶
type One string
One - `none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.
func (*One) UnmarshalJSON ¶
type OpenAIFile ¶
type OpenAIFile struct { // The size of the file, in bytes. Bytes int64 `json:"bytes"` // The Unix timestamp (in seconds) for when the file was created. CreatedAt int64 `json:"created_at"` // The name of the file. Filename string `json:"filename"` // The file identifier, which can be referenced in the API endpoints. ID string `json:"id"` // The object type, which is always `file`. Object OpenAIFileObject `json:"object"` // The intended purpose of the file. Supported values are `fine-tune`, `fine-tune-results`, `assistants`, and `assistants_output`. Purpose OpenAIFilePurpose `json:"purpose"` // Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`. // // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. Status OpenAIFileStatus `json:"status"` // Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`. // // Deprecated field: This will be removed in a future release, please migrate away from it as soon as possible. StatusDetails *string `json:"status_details,omitempty"` }
OpenAIFile - The `File` object represents a document that has been uploaded to OpenAI.
func (*OpenAIFile) GetBytes ¶
func (o *OpenAIFile) GetBytes() int64
func (*OpenAIFile) GetCreatedAt ¶
func (o *OpenAIFile) GetCreatedAt() int64
func (*OpenAIFile) GetFilename ¶
func (o *OpenAIFile) GetFilename() string
func (*OpenAIFile) GetID ¶
func (o *OpenAIFile) GetID() string
func (*OpenAIFile) GetObject ¶
func (o *OpenAIFile) GetObject() OpenAIFileObject
func (*OpenAIFile) GetPurpose ¶
func (o *OpenAIFile) GetPurpose() OpenAIFilePurpose
func (*OpenAIFile) GetStatus ¶
func (o *OpenAIFile) GetStatus() OpenAIFileStatus
func (*OpenAIFile) GetStatusDetails ¶
func (o *OpenAIFile) GetStatusDetails() *string
type OpenAIFileObject ¶
type OpenAIFileObject string
OpenAIFileObject - The object type, which is always `file`.
const (
OpenAIFileObjectFile OpenAIFileObject = "file"
)
func (OpenAIFileObject) ToPointer ¶
func (e OpenAIFileObject) ToPointer() *OpenAIFileObject
func (*OpenAIFileObject) UnmarshalJSON ¶
func (e *OpenAIFileObject) UnmarshalJSON(data []byte) error
type OpenAIFilePurpose ¶
type OpenAIFilePurpose string
OpenAIFilePurpose - The intended purpose of the file. Supported values are `fine-tune`, `fine-tune-results`, `assistants`, and `assistants_output`.
const ( OpenAIFilePurposeFineTune OpenAIFilePurpose = "fine-tune" OpenAIFilePurposeFineTuneResults OpenAIFilePurpose = "fine-tune-results" OpenAIFilePurposeAssistants OpenAIFilePurpose = "assistants" OpenAIFilePurposeAssistantsOutput OpenAIFilePurpose = "assistants_output" )
func (OpenAIFilePurpose) ToPointer ¶
func (e OpenAIFilePurpose) ToPointer() *OpenAIFilePurpose
func (*OpenAIFilePurpose) UnmarshalJSON ¶
func (e *OpenAIFilePurpose) UnmarshalJSON(data []byte) error
type OpenAIFileStatus ¶
type OpenAIFileStatus string
OpenAIFileStatus - Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.
Deprecated type: This will be removed in a future release, please migrate away from it as soon as possible.
const ( OpenAIFileStatusUploaded OpenAIFileStatus = "uploaded" OpenAIFileStatusProcessed OpenAIFileStatus = "processed" OpenAIFileStatusError OpenAIFileStatus = "error" )
func (OpenAIFileStatus) ToPointer ¶
func (e OpenAIFileStatus) ToPointer() *OpenAIFileStatus
func (*OpenAIFileStatus) UnmarshalJSON ¶
func (e *OpenAIFileStatus) UnmarshalJSON(data []byte) error
type Outputs ¶
type Outputs struct { RunStepDetailsToolCallsCodeOutputLogsObject *RunStepDetailsToolCallsCodeOutputLogsObject RunStepDetailsToolCallsCodeOutputImageObject *RunStepDetailsToolCallsCodeOutputImageObject Type OutputsType }
func CreateOutputsRunStepDetailsToolCallsCodeOutputImageObject ¶
func CreateOutputsRunStepDetailsToolCallsCodeOutputImageObject(runStepDetailsToolCallsCodeOutputImageObject RunStepDetailsToolCallsCodeOutputImageObject) Outputs
func CreateOutputsRunStepDetailsToolCallsCodeOutputLogsObject ¶
func CreateOutputsRunStepDetailsToolCallsCodeOutputLogsObject(runStepDetailsToolCallsCodeOutputLogsObject RunStepDetailsToolCallsCodeOutputLogsObject) Outputs
func (Outputs) MarshalJSON ¶
func (*Outputs) UnmarshalJSON ¶
type OutputsType ¶
type OutputsType string
const ( OutputsTypeRunStepDetailsToolCallsCodeOutputLogsObject OutputsType = "RunStepDetailsToolCallsCodeOutputLogsObject" OutputsTypeRunStepDetailsToolCallsCodeOutputImageObject OutputsType = "RunStepDetailsToolCallsCodeOutputImageObject" )
type Prompt ¶
type Prompt struct { Str *string ArrayOfstr []string ArrayOfinteger []int64 ArrayOfarrayOfinteger [][]int64 Type PromptType }
Prompt - 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.
func CreatePromptArrayOfstr ¶
func CreatePromptStr ¶
func (Prompt) MarshalJSON ¶
func (*Prompt) UnmarshalJSON ¶
type PromptType ¶
type PromptType string
const ( PromptTypeStr PromptType = "str" PromptTypeArrayOfstr PromptType = "arrayOfstr" PromptTypeArrayOfinteger PromptType = "arrayOfinteger" PromptTypeArrayOfarrayOfinteger PromptType = "arrayOfarrayOfinteger" )
type Purpose ¶
type Purpose string
Purpose - The intended purpose of the uploaded file.
Use "fine-tune" for [Fine-tuning](/docs/api-reference/fine-tuning) and "assistants" for [Assistants](/docs/api-reference/assistants) and [Messages](/docs/api-reference/messages). This allows us to validate the format of the uploaded file is correct for fine-tuning.
func (*Purpose) UnmarshalJSON ¶
type Quality ¶
type Quality string
Quality - The quality of the image that will be generated. `hd` creates images with finer details and greater consistency across the image. This param is only supported for `dall-e-3`.
func (*Quality) UnmarshalJSON ¶
type RequiredAction ¶
type RequiredAction struct { // Details on the tool outputs needed for this run to continue. SubmitToolOutputs SubmitToolOutputs `json:"submit_tool_outputs"` // For now, this is always `submit_tool_outputs`. Type RunObjectType `json:"type"` }
RequiredAction - Details on the action required to continue the run. Will be `null` if no action is required.
func (*RequiredAction) GetSubmitToolOutputs ¶
func (o *RequiredAction) GetSubmitToolOutputs() SubmitToolOutputs
func (*RequiredAction) GetType ¶
func (o *RequiredAction) GetType() RunObjectType
type ResponseFormat ¶
type ResponseFormat struct { // Must be one of `text` or `json_object`. Type *CreateChatCompletionRequestType `default:"text" json:"type"` }
ResponseFormat - An object specifying the format that the model must output. Compatible with [GPT-4 Turbo](/docs/models/gpt-4-and-gpt-4-turbo) and all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the message the model generates is valid JSON.
**Important:** when using JSON mode, you **must** also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if `finish_reason="length"`, which indicates the generation exceeded `max_tokens` or the conversation exceeded the max context length.
func (*ResponseFormat) GetType ¶
func (o *ResponseFormat) GetType() *CreateChatCompletionRequestType
func (ResponseFormat) MarshalJSON ¶
func (r ResponseFormat) MarshalJSON() ([]byte, error)
func (*ResponseFormat) UnmarshalJSON ¶
func (r *ResponseFormat) UnmarshalJSON(data []byte) error
type Results ¶
type Results struct { // A list of the categories, and whether they are flagged or not. Categories Categories `json:"categories"` // A list of the categories along with their scores as predicted by model. CategoryScores CategoryScores `json:"category_scores"` // Whether the content violates [OpenAI's usage policies](/policies/usage-policies). Flagged bool `json:"flagged"` }
func (*Results) GetCategories ¶
func (o *Results) GetCategories() Categories
func (*Results) GetCategoryScores ¶
func (o *Results) GetCategoryScores() CategoryScores
func (*Results) GetFlagged ¶
type Retrieval ¶
type Retrieval struct { }
Retrieval - For now, this is always going to be an empty object.
type Role ¶
type Role string
Role - The role of the messages author, in this case `assistant`.
const (
RoleAssistant Role = "assistant"
)
func (*Role) UnmarshalJSON ¶
type RunCompletionUsage ¶
type RunCompletionUsage struct { // Number of completion tokens used over the course of the run. CompletionTokens int64 `json:"completion_tokens"` // Number of prompt tokens used over the course of the run. PromptTokens int64 `json:"prompt_tokens"` // Total number of tokens used (prompt + completion). TotalTokens int64 `json:"total_tokens"` }
RunCompletionUsage - Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).
func (*RunCompletionUsage) GetCompletionTokens ¶
func (o *RunCompletionUsage) GetCompletionTokens() int64
func (*RunCompletionUsage) GetPromptTokens ¶
func (o *RunCompletionUsage) GetPromptTokens() int64
func (*RunCompletionUsage) GetTotalTokens ¶
func (o *RunCompletionUsage) GetTotalTokens() int64
type RunObject ¶
type RunObject struct { // The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run. AssistantID string `json:"assistant_id"` // The Unix timestamp (in seconds) for when the run was cancelled. CancelledAt *int64 `json:"cancelled_at"` // The Unix timestamp (in seconds) for when the run was completed. CompletedAt *int64 `json:"completed_at"` // The Unix timestamp (in seconds) for when the run was created. CreatedAt int64 `json:"created_at"` // The Unix timestamp (in seconds) for when the run will expire. ExpiresAt int64 `json:"expires_at"` // The Unix timestamp (in seconds) for when the run failed. FailedAt *int64 `json:"failed_at"` // The list of [File](/docs/api-reference/files) IDs the [assistant](/docs/api-reference/assistants) used for this run. FileIds []string `json:"file_ids"` // The identifier, which can be referenced in API endpoints. ID string `json:"id"` // The instructions that the [assistant](/docs/api-reference/assistants) used for this run. Instructions string `json:"instructions"` // The last error associated with this run. Will be `null` if there are no errors. LastError *LastError `json:"last_error"` // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *RunObjectMetadata `json:"metadata"` // The model that the [assistant](/docs/api-reference/assistants) used for this run. Model string `json:"model"` // The object type, which is always `thread.run`. Object RunObjectObject `json:"object"` // Details on the action required to continue the run. Will be `null` if no action is required. RequiredAction *RequiredAction `json:"required_action"` // The Unix timestamp (in seconds) for when the run was started. StartedAt *int64 `json:"started_at"` // The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, or `expired`. Status RunObjectStatus `json:"status"` // The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run. ThreadID string `json:"thread_id"` // The list of tools that the [assistant](/docs/api-reference/assistants) used for this run. Tools []RunObjectTools `json:"tools"` // Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.). Usage *RunCompletionUsage `json:"usage"` }
RunObject - Represents an execution run on a [thread](/docs/api-reference/threads).
func (*RunObject) GetAssistantID ¶
func (*RunObject) GetCancelledAt ¶
func (*RunObject) GetCompletedAt ¶
func (*RunObject) GetCreatedAt ¶
func (*RunObject) GetExpiresAt ¶
func (*RunObject) GetFailedAt ¶
func (*RunObject) GetFileIds ¶
func (*RunObject) GetInstructions ¶
func (*RunObject) GetLastError ¶
func (*RunObject) GetMetadata ¶
func (o *RunObject) GetMetadata() *RunObjectMetadata
func (*RunObject) GetObject ¶
func (o *RunObject) GetObject() RunObjectObject
func (*RunObject) GetRequiredAction ¶
func (o *RunObject) GetRequiredAction() *RequiredAction
func (*RunObject) GetStartedAt ¶
func (*RunObject) GetStatus ¶
func (o *RunObject) GetStatus() RunObjectStatus
func (*RunObject) GetThreadID ¶
func (*RunObject) GetTools ¶
func (o *RunObject) GetTools() []RunObjectTools
func (*RunObject) GetUsage ¶
func (o *RunObject) GetUsage() *RunCompletionUsage
type RunObjectMetadata ¶
type RunObjectMetadata struct { }
RunObjectMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type RunObjectObject ¶
type RunObjectObject string
RunObjectObject - The object type, which is always `thread.run`.
const (
RunObjectObjectThreadRun RunObjectObject = "thread.run"
)
func (RunObjectObject) ToPointer ¶
func (e RunObjectObject) ToPointer() *RunObjectObject
func (*RunObjectObject) UnmarshalJSON ¶
func (e *RunObjectObject) UnmarshalJSON(data []byte) error
type RunObjectStatus ¶
type RunObjectStatus string
RunObjectStatus - The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, or `expired`.
const ( RunObjectStatusQueued RunObjectStatus = "queued" RunObjectStatusInProgress RunObjectStatus = "in_progress" RunObjectStatusRequiresAction RunObjectStatus = "requires_action" RunObjectStatusCancelling RunObjectStatus = "cancelling" RunObjectStatusCancelled RunObjectStatus = "cancelled" RunObjectStatusFailed RunObjectStatus = "failed" RunObjectStatusCompleted RunObjectStatus = "completed" RunObjectStatusExpired RunObjectStatus = "expired" )
func (RunObjectStatus) ToPointer ¶
func (e RunObjectStatus) ToPointer() *RunObjectStatus
func (*RunObjectStatus) UnmarshalJSON ¶
func (e *RunObjectStatus) UnmarshalJSON(data []byte) error
type RunObjectTools ¶
type RunObjectTools struct { AssistantToolsCode *AssistantToolsCode AssistantToolsRetrieval *AssistantToolsRetrieval AssistantToolsFunction *AssistantToolsFunction Type RunObjectToolsType }
func CreateRunObjectToolsAssistantToolsCode ¶
func CreateRunObjectToolsAssistantToolsCode(assistantToolsCode AssistantToolsCode) RunObjectTools
func CreateRunObjectToolsAssistantToolsFunction ¶
func CreateRunObjectToolsAssistantToolsFunction(assistantToolsFunction AssistantToolsFunction) RunObjectTools
func CreateRunObjectToolsAssistantToolsRetrieval ¶
func CreateRunObjectToolsAssistantToolsRetrieval(assistantToolsRetrieval AssistantToolsRetrieval) RunObjectTools
func (RunObjectTools) MarshalJSON ¶
func (u RunObjectTools) MarshalJSON() ([]byte, error)
func (*RunObjectTools) UnmarshalJSON ¶
func (u *RunObjectTools) UnmarshalJSON(data []byte) error
type RunObjectToolsType ¶
type RunObjectToolsType string
const ( RunObjectToolsTypeAssistantToolsCode RunObjectToolsType = "AssistantToolsCode" RunObjectToolsTypeAssistantToolsRetrieval RunObjectToolsType = "AssistantToolsRetrieval" RunObjectToolsTypeAssistantToolsFunction RunObjectToolsType = "AssistantToolsFunction" )
type RunObjectType ¶
type RunObjectType string
RunObjectType - For now, this is always `submit_tool_outputs`.
const (
RunObjectTypeSubmitToolOutputs RunObjectType = "submit_tool_outputs"
)
func (RunObjectType) ToPointer ¶
func (e RunObjectType) ToPointer() *RunObjectType
func (*RunObjectType) UnmarshalJSON ¶
func (e *RunObjectType) UnmarshalJSON(data []byte) error
type RunStepCompletionUsage ¶
type RunStepCompletionUsage struct { // Number of completion tokens used over the course of the run step. CompletionTokens int64 `json:"completion_tokens"` // Number of prompt tokens used over the course of the run step. PromptTokens int64 `json:"prompt_tokens"` // Total number of tokens used (prompt + completion). TotalTokens int64 `json:"total_tokens"` }
RunStepCompletionUsage - Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.
func (*RunStepCompletionUsage) GetCompletionTokens ¶
func (o *RunStepCompletionUsage) GetCompletionTokens() int64
func (*RunStepCompletionUsage) GetPromptTokens ¶
func (o *RunStepCompletionUsage) GetPromptTokens() int64
func (*RunStepCompletionUsage) GetTotalTokens ¶
func (o *RunStepCompletionUsage) GetTotalTokens() int64
type RunStepDetailsMessageCreationObject ¶
type RunStepDetailsMessageCreationObject struct { MessageCreation MessageCreation `json:"message_creation"` // Always `message_creation`. Type RunStepDetailsMessageCreationObjectType `json:"type"` }
RunStepDetailsMessageCreationObject - Details of the message creation by the run step.
func (*RunStepDetailsMessageCreationObject) GetMessageCreation ¶
func (o *RunStepDetailsMessageCreationObject) GetMessageCreation() MessageCreation
func (*RunStepDetailsMessageCreationObject) GetType ¶
func (o *RunStepDetailsMessageCreationObject) GetType() RunStepDetailsMessageCreationObjectType
type RunStepDetailsMessageCreationObjectType ¶
type RunStepDetailsMessageCreationObjectType string
RunStepDetailsMessageCreationObjectType - Always `message_creation`.
const (
RunStepDetailsMessageCreationObjectTypeMessageCreation RunStepDetailsMessageCreationObjectType = "message_creation"
)
func (RunStepDetailsMessageCreationObjectType) ToPointer ¶
func (e RunStepDetailsMessageCreationObjectType) ToPointer() *RunStepDetailsMessageCreationObjectType
func (*RunStepDetailsMessageCreationObjectType) UnmarshalJSON ¶
func (e *RunStepDetailsMessageCreationObjectType) UnmarshalJSON(data []byte) error
type RunStepDetailsToolCallsCodeObject ¶
type RunStepDetailsToolCallsCodeObject struct { // The Code Interpreter tool call definition. CodeInterpreter CodeInterpreter `json:"code_interpreter"` // The ID of the tool call. ID string `json:"id"` // The type of tool call. This is always going to be `code_interpreter` for this type of tool call. Type RunStepDetailsToolCallsCodeObjectType `json:"type"` }
RunStepDetailsToolCallsCodeObject - Details of the Code Interpreter tool call the run step was involved in.
func (*RunStepDetailsToolCallsCodeObject) GetCodeInterpreter ¶
func (o *RunStepDetailsToolCallsCodeObject) GetCodeInterpreter() CodeInterpreter
func (*RunStepDetailsToolCallsCodeObject) GetID ¶
func (o *RunStepDetailsToolCallsCodeObject) GetID() string
func (*RunStepDetailsToolCallsCodeObject) GetType ¶
func (o *RunStepDetailsToolCallsCodeObject) GetType() RunStepDetailsToolCallsCodeObjectType
type RunStepDetailsToolCallsCodeObjectType ¶
type RunStepDetailsToolCallsCodeObjectType string
RunStepDetailsToolCallsCodeObjectType - The type of tool call. This is always going to be `code_interpreter` for this type of tool call.
const (
RunStepDetailsToolCallsCodeObjectTypeCodeInterpreter RunStepDetailsToolCallsCodeObjectType = "code_interpreter"
)
func (RunStepDetailsToolCallsCodeObjectType) ToPointer ¶
func (e RunStepDetailsToolCallsCodeObjectType) ToPointer() *RunStepDetailsToolCallsCodeObjectType
func (*RunStepDetailsToolCallsCodeObjectType) UnmarshalJSON ¶
func (e *RunStepDetailsToolCallsCodeObjectType) UnmarshalJSON(data []byte) error
type RunStepDetailsToolCallsCodeOutputImageObject ¶
type RunStepDetailsToolCallsCodeOutputImageObject struct { Image RunStepDetailsToolCallsCodeOutputImageObjectImage `json:"image"` // Always `image`. Type RunStepDetailsToolCallsCodeOutputImageObjectType `json:"type"` }
type RunStepDetailsToolCallsCodeOutputImageObjectImage ¶
type RunStepDetailsToolCallsCodeOutputImageObjectImage struct { // The [file](/docs/api-reference/files) ID of the image. FileID string `json:"file_id"` }
func (*RunStepDetailsToolCallsCodeOutputImageObjectImage) GetFileID ¶
func (o *RunStepDetailsToolCallsCodeOutputImageObjectImage) GetFileID() string
type RunStepDetailsToolCallsCodeOutputImageObjectType ¶
type RunStepDetailsToolCallsCodeOutputImageObjectType string
RunStepDetailsToolCallsCodeOutputImageObjectType - Always `image`.
const (
RunStepDetailsToolCallsCodeOutputImageObjectTypeImage RunStepDetailsToolCallsCodeOutputImageObjectType = "image"
)
func (*RunStepDetailsToolCallsCodeOutputImageObjectType) UnmarshalJSON ¶
func (e *RunStepDetailsToolCallsCodeOutputImageObjectType) UnmarshalJSON(data []byte) error
type RunStepDetailsToolCallsCodeOutputLogsObject ¶
type RunStepDetailsToolCallsCodeOutputLogsObject struct { // The text output from the Code Interpreter tool call. Logs string `json:"logs"` // Always `logs`. Type RunStepDetailsToolCallsCodeOutputLogsObjectType `json:"type"` }
RunStepDetailsToolCallsCodeOutputLogsObject - Text output from the Code Interpreter tool call as part of a run step.
func (*RunStepDetailsToolCallsCodeOutputLogsObject) GetLogs ¶
func (o *RunStepDetailsToolCallsCodeOutputLogsObject) GetLogs() string
type RunStepDetailsToolCallsCodeOutputLogsObjectType ¶
type RunStepDetailsToolCallsCodeOutputLogsObjectType string
RunStepDetailsToolCallsCodeOutputLogsObjectType - Always `logs`.
const (
RunStepDetailsToolCallsCodeOutputLogsObjectTypeLogs RunStepDetailsToolCallsCodeOutputLogsObjectType = "logs"
)
func (*RunStepDetailsToolCallsCodeOutputLogsObjectType) UnmarshalJSON ¶
func (e *RunStepDetailsToolCallsCodeOutputLogsObjectType) UnmarshalJSON(data []byte) error
type RunStepDetailsToolCallsFunctionObject ¶
type RunStepDetailsToolCallsFunctionObject struct { // The definition of the function that was called. Function RunStepDetailsToolCallsFunctionObjectFunction `json:"function"` // The ID of the tool call object. ID string `json:"id"` // The type of tool call. This is always going to be `function` for this type of tool call. Type RunStepDetailsToolCallsFunctionObjectType `json:"type"` }
func (*RunStepDetailsToolCallsFunctionObject) GetFunction ¶
func (o *RunStepDetailsToolCallsFunctionObject) GetFunction() RunStepDetailsToolCallsFunctionObjectFunction
func (*RunStepDetailsToolCallsFunctionObject) GetID ¶
func (o *RunStepDetailsToolCallsFunctionObject) GetID() string
func (*RunStepDetailsToolCallsFunctionObject) GetType ¶
func (o *RunStepDetailsToolCallsFunctionObject) GetType() RunStepDetailsToolCallsFunctionObjectType
type RunStepDetailsToolCallsFunctionObjectFunction ¶
type RunStepDetailsToolCallsFunctionObjectFunction struct { // The arguments passed to the function. Arguments string `json:"arguments"` // The name of the function. Name string `json:"name"` // The output of the function. This will be `null` if the outputs have not been [submitted](/docs/api-reference/runs/submitToolOutputs) yet. Output *string `json:"output"` }
RunStepDetailsToolCallsFunctionObjectFunction - The definition of the function that was called.
func (*RunStepDetailsToolCallsFunctionObjectFunction) GetArguments ¶
func (o *RunStepDetailsToolCallsFunctionObjectFunction) GetArguments() string
func (*RunStepDetailsToolCallsFunctionObjectFunction) GetName ¶
func (o *RunStepDetailsToolCallsFunctionObjectFunction) GetName() string
func (*RunStepDetailsToolCallsFunctionObjectFunction) GetOutput ¶
func (o *RunStepDetailsToolCallsFunctionObjectFunction) GetOutput() *string
type RunStepDetailsToolCallsFunctionObjectType ¶
type RunStepDetailsToolCallsFunctionObjectType string
RunStepDetailsToolCallsFunctionObjectType - The type of tool call. This is always going to be `function` for this type of tool call.
const (
RunStepDetailsToolCallsFunctionObjectTypeFunction RunStepDetailsToolCallsFunctionObjectType = "function"
)
func (RunStepDetailsToolCallsFunctionObjectType) ToPointer ¶
func (e RunStepDetailsToolCallsFunctionObjectType) ToPointer() *RunStepDetailsToolCallsFunctionObjectType
func (*RunStepDetailsToolCallsFunctionObjectType) UnmarshalJSON ¶
func (e *RunStepDetailsToolCallsFunctionObjectType) UnmarshalJSON(data []byte) error
type RunStepDetailsToolCallsObject ¶
type RunStepDetailsToolCallsObject struct { // An array of tool calls the run step was involved in. These can be associated with one of three types of tools: `code_interpreter`, `retrieval`, or `function`. // ToolCalls []ToolCalls `json:"tool_calls"` // Always `tool_calls`. Type RunStepDetailsToolCallsObjectType `json:"type"` }
RunStepDetailsToolCallsObject - Details of the tool call.
func (*RunStepDetailsToolCallsObject) GetToolCalls ¶
func (o *RunStepDetailsToolCallsObject) GetToolCalls() []ToolCalls
func (*RunStepDetailsToolCallsObject) GetType ¶
func (o *RunStepDetailsToolCallsObject) GetType() RunStepDetailsToolCallsObjectType
type RunStepDetailsToolCallsObjectType ¶
type RunStepDetailsToolCallsObjectType string
RunStepDetailsToolCallsObjectType - Always `tool_calls`.
const (
RunStepDetailsToolCallsObjectTypeToolCalls RunStepDetailsToolCallsObjectType = "tool_calls"
)
func (RunStepDetailsToolCallsObjectType) ToPointer ¶
func (e RunStepDetailsToolCallsObjectType) ToPointer() *RunStepDetailsToolCallsObjectType
func (*RunStepDetailsToolCallsObjectType) UnmarshalJSON ¶
func (e *RunStepDetailsToolCallsObjectType) UnmarshalJSON(data []byte) error
type RunStepDetailsToolCallsRetrievalObject ¶
type RunStepDetailsToolCallsRetrievalObject struct { // The ID of the tool call object. ID string `json:"id"` // For now, this is always going to be an empty object. Retrieval Retrieval `json:"retrieval"` // The type of tool call. This is always going to be `retrieval` for this type of tool call. Type RunStepDetailsToolCallsRetrievalObjectType `json:"type"` }
func (*RunStepDetailsToolCallsRetrievalObject) GetID ¶
func (o *RunStepDetailsToolCallsRetrievalObject) GetID() string
func (*RunStepDetailsToolCallsRetrievalObject) GetRetrieval ¶
func (o *RunStepDetailsToolCallsRetrievalObject) GetRetrieval() Retrieval
func (*RunStepDetailsToolCallsRetrievalObject) GetType ¶
func (o *RunStepDetailsToolCallsRetrievalObject) GetType() RunStepDetailsToolCallsRetrievalObjectType
type RunStepDetailsToolCallsRetrievalObjectType ¶
type RunStepDetailsToolCallsRetrievalObjectType string
RunStepDetailsToolCallsRetrievalObjectType - The type of tool call. This is always going to be `retrieval` for this type of tool call.
const (
RunStepDetailsToolCallsRetrievalObjectTypeRetrieval RunStepDetailsToolCallsRetrievalObjectType = "retrieval"
)
func (RunStepDetailsToolCallsRetrievalObjectType) ToPointer ¶
func (e RunStepDetailsToolCallsRetrievalObjectType) ToPointer() *RunStepDetailsToolCallsRetrievalObjectType
func (*RunStepDetailsToolCallsRetrievalObjectType) UnmarshalJSON ¶
func (e *RunStepDetailsToolCallsRetrievalObjectType) UnmarshalJSON(data []byte) error
type RunStepObject ¶
type RunStepObject struct { // The ID of the [assistant](/docs/api-reference/assistants) associated with the run step. AssistantID string `json:"assistant_id"` // The Unix timestamp (in seconds) for when the run step was cancelled. CancelledAt *int64 `json:"cancelled_at"` // The Unix timestamp (in seconds) for when the run step completed. CompletedAt *int64 `json:"completed_at"` // The Unix timestamp (in seconds) for when the run step was created. CreatedAt int64 `json:"created_at"` // The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired. ExpiredAt *int64 `json:"expired_at"` // The Unix timestamp (in seconds) for when the run step failed. FailedAt *int64 `json:"failed_at"` // The identifier of the run step, which can be referenced in API endpoints. ID string `json:"id"` // The last error associated with this run step. Will be `null` if there are no errors. LastError *RunStepObjectLastError `json:"last_error"` // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *RunStepObjectMetadata `json:"metadata"` // The object type, which is always `thread.run.step`. Object RunStepObjectObject `json:"object"` // The ID of the [run](/docs/api-reference/runs) that this run step is a part of. RunID string `json:"run_id"` // The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`. Status RunStepObjectStatus `json:"status"` // The details of the run step. StepDetails StepDetails `json:"step_details"` // The ID of the [thread](/docs/api-reference/threads) that was run. ThreadID string `json:"thread_id"` // The type of run step, which can be either `message_creation` or `tool_calls`. Type RunStepObjectType `json:"type"` // Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`. Usage *RunStepCompletionUsage `json:"usage"` }
RunStepObject - Represents a step in execution of a run.
func (*RunStepObject) GetAssistantID ¶
func (o *RunStepObject) GetAssistantID() string
func (*RunStepObject) GetCancelledAt ¶
func (o *RunStepObject) GetCancelledAt() *int64
func (*RunStepObject) GetCompletedAt ¶
func (o *RunStepObject) GetCompletedAt() *int64
func (*RunStepObject) GetCreatedAt ¶
func (o *RunStepObject) GetCreatedAt() int64
func (*RunStepObject) GetExpiredAt ¶
func (o *RunStepObject) GetExpiredAt() *int64
func (*RunStepObject) GetFailedAt ¶
func (o *RunStepObject) GetFailedAt() *int64
func (*RunStepObject) GetID ¶
func (o *RunStepObject) GetID() string
func (*RunStepObject) GetLastError ¶
func (o *RunStepObject) GetLastError() *RunStepObjectLastError
func (*RunStepObject) GetMetadata ¶
func (o *RunStepObject) GetMetadata() *RunStepObjectMetadata
func (*RunStepObject) GetObject ¶
func (o *RunStepObject) GetObject() RunStepObjectObject
func (*RunStepObject) GetRunID ¶
func (o *RunStepObject) GetRunID() string
func (*RunStepObject) GetStatus ¶
func (o *RunStepObject) GetStatus() RunStepObjectStatus
func (*RunStepObject) GetStepDetails ¶
func (o *RunStepObject) GetStepDetails() StepDetails
func (*RunStepObject) GetThreadID ¶
func (o *RunStepObject) GetThreadID() string
func (*RunStepObject) GetType ¶
func (o *RunStepObject) GetType() RunStepObjectType
func (*RunStepObject) GetUsage ¶
func (o *RunStepObject) GetUsage() *RunStepCompletionUsage
type RunStepObjectCode ¶
type RunStepObjectCode string
RunStepObjectCode - One of `server_error` or `rate_limit_exceeded`.
const ( RunStepObjectCodeServerError RunStepObjectCode = "server_error" RunStepObjectCodeRateLimitExceeded RunStepObjectCode = "rate_limit_exceeded" )
func (RunStepObjectCode) ToPointer ¶
func (e RunStepObjectCode) ToPointer() *RunStepObjectCode
func (*RunStepObjectCode) UnmarshalJSON ¶
func (e *RunStepObjectCode) UnmarshalJSON(data []byte) error
type RunStepObjectLastError ¶
type RunStepObjectLastError struct { // One of `server_error` or `rate_limit_exceeded`. Code RunStepObjectCode `json:"code"` // A human-readable description of the error. Message string `json:"message"` }
RunStepObjectLastError - The last error associated with this run step. Will be `null` if there are no errors.
func (*RunStepObjectLastError) GetCode ¶
func (o *RunStepObjectLastError) GetCode() RunStepObjectCode
func (*RunStepObjectLastError) GetMessage ¶
func (o *RunStepObjectLastError) GetMessage() string
type RunStepObjectMetadata ¶
type RunStepObjectMetadata struct { }
RunStepObjectMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type RunStepObjectObject ¶
type RunStepObjectObject string
RunStepObjectObject - The object type, which is always `thread.run.step`.
const (
RunStepObjectObjectThreadRunStep RunStepObjectObject = "thread.run.step"
)
func (RunStepObjectObject) ToPointer ¶
func (e RunStepObjectObject) ToPointer() *RunStepObjectObject
func (*RunStepObjectObject) UnmarshalJSON ¶
func (e *RunStepObjectObject) UnmarshalJSON(data []byte) error
type RunStepObjectStatus ¶
type RunStepObjectStatus string
RunStepObjectStatus - The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.
const ( RunStepObjectStatusInProgress RunStepObjectStatus = "in_progress" RunStepObjectStatusCancelled RunStepObjectStatus = "cancelled" RunStepObjectStatusFailed RunStepObjectStatus = "failed" RunStepObjectStatusCompleted RunStepObjectStatus = "completed" RunStepObjectStatusExpired RunStepObjectStatus = "expired" )
func (RunStepObjectStatus) ToPointer ¶
func (e RunStepObjectStatus) ToPointer() *RunStepObjectStatus
func (*RunStepObjectStatus) UnmarshalJSON ¶
func (e *RunStepObjectStatus) UnmarshalJSON(data []byte) error
type RunStepObjectType ¶
type RunStepObjectType string
RunStepObjectType - The type of run step, which can be either `message_creation` or `tool_calls`.
const ( RunStepObjectTypeMessageCreation RunStepObjectType = "message_creation" RunStepObjectTypeToolCalls RunStepObjectType = "tool_calls" )
func (RunStepObjectType) ToPointer ¶
func (e RunStepObjectType) ToPointer() *RunStepObjectType
func (*RunStepObjectType) UnmarshalJSON ¶
func (e *RunStepObjectType) UnmarshalJSON(data []byte) error
type RunToolCallObject ¶
type RunToolCallObject struct { // The function definition. Function RunToolCallObjectFunction `json:"function"` // The ID of the tool call. This ID must be referenced when you submit the tool outputs in using the [Submit tool outputs to run](/docs/api-reference/runs/submitToolOutputs) endpoint. ID string `json:"id"` // The type of tool call the output is required for. For now, this is always `function`. Type RunToolCallObjectType `json:"type"` }
RunToolCallObject - Tool call objects
func (*RunToolCallObject) GetFunction ¶
func (o *RunToolCallObject) GetFunction() RunToolCallObjectFunction
func (*RunToolCallObject) GetID ¶
func (o *RunToolCallObject) GetID() string
func (*RunToolCallObject) GetType ¶
func (o *RunToolCallObject) GetType() RunToolCallObjectType
type RunToolCallObjectFunction ¶
type RunToolCallObjectFunction struct { // The arguments that the model expects you to pass to the function. Arguments string `json:"arguments"` // The name of the function. Name string `json:"name"` }
RunToolCallObjectFunction - The function definition.
func (*RunToolCallObjectFunction) GetArguments ¶
func (o *RunToolCallObjectFunction) GetArguments() string
func (*RunToolCallObjectFunction) GetName ¶
func (o *RunToolCallObjectFunction) GetName() string
type RunToolCallObjectType ¶
type RunToolCallObjectType string
RunToolCallObjectType - The type of tool call the output is required for. For now, this is always `function`.
const (
RunToolCallObjectTypeFunction RunToolCallObjectType = "function"
)
func (RunToolCallObjectType) ToPointer ¶
func (e RunToolCallObjectType) ToPointer() *RunToolCallObjectType
func (*RunToolCallObjectType) UnmarshalJSON ¶
func (e *RunToolCallObjectType) UnmarshalJSON(data []byte) error
type Security ¶
type Security struct {
APIKeyAuth string `security:"scheme,type=http,subtype=bearer,name=Authorization"`
}
func (*Security) GetAPIKeyAuth ¶
type Size ¶
type Size string
Size - The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
func (*Size) UnmarshalJSON ¶
type Status ¶
type Status string
Status - The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.
func (*Status) UnmarshalJSON ¶
type StepDetails ¶
type StepDetails struct { RunStepDetailsMessageCreationObject *RunStepDetailsMessageCreationObject RunStepDetailsToolCallsObject *RunStepDetailsToolCallsObject Type StepDetailsType }
StepDetails - The details of the run step.
func CreateStepDetailsRunStepDetailsMessageCreationObject ¶
func CreateStepDetailsRunStepDetailsMessageCreationObject(runStepDetailsMessageCreationObject RunStepDetailsMessageCreationObject) StepDetails
func CreateStepDetailsRunStepDetailsToolCallsObject ¶
func CreateStepDetailsRunStepDetailsToolCallsObject(runStepDetailsToolCallsObject RunStepDetailsToolCallsObject) StepDetails
func (StepDetails) MarshalJSON ¶
func (u StepDetails) MarshalJSON() ([]byte, error)
func (*StepDetails) UnmarshalJSON ¶
func (u *StepDetails) UnmarshalJSON(data []byte) error
type StepDetailsType ¶
type StepDetailsType string
const ( StepDetailsTypeRunStepDetailsMessageCreationObject StepDetailsType = "RunStepDetailsMessageCreationObject" StepDetailsTypeRunStepDetailsToolCallsObject StepDetailsType = "RunStepDetailsToolCallsObject" )
type Stop ¶
Stop - Up to 4 sequences where the API will stop generating further tokens.
func CreateStopArrayOfstr ¶
func CreateStopStr ¶
func (Stop) MarshalJSON ¶
func (*Stop) UnmarshalJSON ¶
type Style ¶
type Style string
Style - The style of the generated images. Must be one of `vivid` or `natural`. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images. This param is only supported for `dall-e-3`.
func (*Style) UnmarshalJSON ¶
type SubmitToolOutputs ¶
type SubmitToolOutputs struct { // A list of the relevant tool calls. ToolCalls []RunToolCallObject `json:"tool_calls"` }
SubmitToolOutputs - Details on the tool outputs needed for this run to continue.
func (*SubmitToolOutputs) GetToolCalls ¶
func (o *SubmitToolOutputs) GetToolCalls() []RunToolCallObject
type SubmitToolOutputsRunRequest ¶
type SubmitToolOutputsRunRequest struct { // A list of tools for which the outputs are being submitted. ToolOutputs []ToolOutputs `json:"tool_outputs"` }
func (*SubmitToolOutputsRunRequest) GetToolOutputs ¶
func (o *SubmitToolOutputsRunRequest) GetToolOutputs() []ToolOutputs
type Text ¶
type Text struct { Annotations []Annotations `json:"annotations"` // The data that makes up the text. Value string `json:"value"` }
func (*Text) GetAnnotations ¶
func (o *Text) GetAnnotations() []Annotations
type ThreadObject ¶
type ThreadObject struct { // The Unix timestamp (in seconds) for when the thread was created. CreatedAt int64 `json:"created_at"` // The identifier, which can be referenced in API endpoints. ID string `json:"id"` // Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long. // Metadata *ThreadObjectMetadata `json:"metadata"` // The object type, which is always `thread`. Object ThreadObjectObject `json:"object"` }
ThreadObject - Represents a thread that contains [messages](/docs/api-reference/messages).
func (*ThreadObject) GetCreatedAt ¶
func (o *ThreadObject) GetCreatedAt() int64
func (*ThreadObject) GetID ¶
func (o *ThreadObject) GetID() string
func (*ThreadObject) GetMetadata ¶
func (o *ThreadObject) GetMetadata() *ThreadObjectMetadata
func (*ThreadObject) GetObject ¶
func (o *ThreadObject) GetObject() ThreadObjectObject
type ThreadObjectMetadata ¶
type ThreadObjectMetadata struct { }
ThreadObjectMetadata - Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
type ThreadObjectObject ¶
type ThreadObjectObject string
ThreadObjectObject - The object type, which is always `thread`.
const (
ThreadObjectObjectThread ThreadObjectObject = "thread"
)
func (ThreadObjectObject) ToPointer ¶
func (e ThreadObjectObject) ToPointer() *ThreadObjectObject
func (*ThreadObjectObject) UnmarshalJSON ¶
func (e *ThreadObjectObject) UnmarshalJSON(data []byte) error
type TimestampGranularities ¶
type TimestampGranularities string
const ( TimestampGranularitiesWord TimestampGranularities = "word" TimestampGranularitiesSegment TimestampGranularities = "segment" )
func (TimestampGranularities) ToPointer ¶
func (e TimestampGranularities) ToPointer() *TimestampGranularities
func (*TimestampGranularities) UnmarshalJSON ¶
func (e *TimestampGranularities) UnmarshalJSON(data []byte) error
type ToolCalls ¶
type ToolCalls struct { RunStepDetailsToolCallsCodeObject *RunStepDetailsToolCallsCodeObject RunStepDetailsToolCallsRetrievalObject *RunStepDetailsToolCallsRetrievalObject RunStepDetailsToolCallsFunctionObject *RunStepDetailsToolCallsFunctionObject Type ToolCallsType }
func CreateToolCallsRunStepDetailsToolCallsCodeObject ¶
func CreateToolCallsRunStepDetailsToolCallsCodeObject(runStepDetailsToolCallsCodeObject RunStepDetailsToolCallsCodeObject) ToolCalls
func CreateToolCallsRunStepDetailsToolCallsFunctionObject ¶
func CreateToolCallsRunStepDetailsToolCallsFunctionObject(runStepDetailsToolCallsFunctionObject RunStepDetailsToolCallsFunctionObject) ToolCalls
func CreateToolCallsRunStepDetailsToolCallsRetrievalObject ¶
func CreateToolCallsRunStepDetailsToolCallsRetrievalObject(runStepDetailsToolCallsRetrievalObject RunStepDetailsToolCallsRetrievalObject) ToolCalls
func (ToolCalls) MarshalJSON ¶
func (*ToolCalls) UnmarshalJSON ¶
type ToolCallsType ¶
type ToolCallsType string
const ( ToolCallsTypeRunStepDetailsToolCallsCodeObject ToolCallsType = "RunStepDetailsToolCallsCodeObject" ToolCallsTypeRunStepDetailsToolCallsRetrievalObject ToolCallsType = "RunStepDetailsToolCallsRetrievalObject" ToolCallsTypeRunStepDetailsToolCallsFunctionObject ToolCallsType = "RunStepDetailsToolCallsFunctionObject" )
type ToolOutputs ¶
type ToolOutputs struct { // The output of the tool call to be submitted to continue the run. Output *string `json:"output,omitempty"` // The ID of the tool call in the `required_action` object within the run object the output is being submitted for. ToolCallID *string `json:"tool_call_id,omitempty"` }
func (*ToolOutputs) GetOutput ¶
func (o *ToolOutputs) GetOutput() *string
func (*ToolOutputs) GetToolCallID ¶
func (o *ToolOutputs) GetToolCallID() *string
type Tools ¶
type Tools struct { AssistantToolsCode *AssistantToolsCode AssistantToolsRetrieval *AssistantToolsRetrieval AssistantToolsFunction *AssistantToolsFunction Type ToolsType }
func CreateToolsAssistantToolsCode ¶
func CreateToolsAssistantToolsCode(assistantToolsCode AssistantToolsCode) Tools
func CreateToolsAssistantToolsFunction ¶
func CreateToolsAssistantToolsFunction(assistantToolsFunction AssistantToolsFunction) Tools
func CreateToolsAssistantToolsRetrieval ¶
func CreateToolsAssistantToolsRetrieval(assistantToolsRetrieval AssistantToolsRetrieval) Tools
func (Tools) MarshalJSON ¶
func (*Tools) UnmarshalJSON ¶
type TopLogprobs ¶
type TopLogprobs struct { // A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token. Bytes []int64 `json:"bytes"` // The log probability of this token. Logprob float64 `json:"logprob"` // The token. Token string `json:"token"` }
func (*TopLogprobs) GetBytes ¶
func (o *TopLogprobs) GetBytes() []int64
func (*TopLogprobs) GetLogprob ¶
func (o *TopLogprobs) GetLogprob() float64
func (*TopLogprobs) GetToken ¶
func (o *TopLogprobs) GetToken() string
type Two ¶
type Two string
const ( TwoGpt40125Preview Two = "gpt-4-0125-preview" TwoGpt4TurboPreview Two = "gpt-4-turbo-preview" TwoGpt41106Preview Two = "gpt-4-1106-preview" TwoGpt4VisionPreview Two = "gpt-4-vision-preview" TwoGpt4 Two = "gpt-4" TwoGpt40314 Two = "gpt-4-0314" TwoGpt40613 Two = "gpt-4-0613" TwoGpt432k Two = "gpt-4-32k" TwoGpt432k0314 Two = "gpt-4-32k-0314" TwoGpt432k0613 Two = "gpt-4-32k-0613" TwoGpt35Turbo Two = "gpt-3.5-turbo" TwoGpt35Turbo16k Two = "gpt-3.5-turbo-16k" TwoGpt35Turbo0301 Two = "gpt-3.5-turbo-0301" TwoGpt35Turbo0613 Two = "gpt-3.5-turbo-0613" TwoGpt35Turbo1106 Two = "gpt-3.5-turbo-1106" TwoGpt35Turbo0125 Two = "gpt-3.5-turbo-0125" TwoGpt35Turbo16k0613 Two = "gpt-3.5-turbo-16k-0613" )
func (*Two) UnmarshalJSON ¶
type Type ¶
type Type string
Type - The type of tool being defined: `code_interpreter`
const (
TypeCodeInterpreter Type = "code_interpreter"
)
func (*Type) UnmarshalJSON ¶
type Usage ¶
type Usage struct { // The number of tokens used by the prompt. PromptTokens int64 `json:"prompt_tokens"` // The total number of tokens used by the request. TotalTokens int64 `json:"total_tokens"` }
Usage - The usage information for the request.
func (*Usage) GetPromptTokens ¶
func (*Usage) GetTotalTokens ¶
type Voice ¶
type Voice string
Voice - The voice to use when generating the audio. Supported voices are `alloy`, `echo`, `fable`, `onyx`, `nova`, and `shimmer`. Previews of the voices are available in the [Text to speech guide](/docs/guides/text-to-speech/voice-options).
func (*Voice) UnmarshalJSON ¶
Source Files
¶
- assistantfileobject.go
- assistantobject.go
- assistanttoolscode.go
- assistanttoolsfunction.go
- assistanttoolsretrieval.go
- chatcompletionfunctioncalloption.go
- chatcompletionfunctions.go
- chatcompletionmessagetoolcall.go
- chatcompletionnamedtoolchoice.go
- chatcompletionrequestassistantmessage.go
- chatcompletionrequestfunctionmessage.go
- chatcompletionrequestmessage.go
- chatcompletionrequestmessagecontentpart.go
- chatcompletionrequestmessagecontentpartimage.go
- chatcompletionrequestmessagecontentparttext.go
- chatcompletionrequestsystemmessage.go
- chatcompletionrequesttoolmessage.go
- chatcompletionrequestusermessage.go
- chatcompletionresponsemessage.go
- chatcompletiontokenlogprob.go
- chatcompletiontool.go
- chatcompletiontoolchoiceoption.go
- completionusage.go
- createassistantfilerequest.go
- createassistantrequest.go
- createchatcompletionrequest.go
- createchatcompletionresponse.go
- createcompletionrequest.go
- createcompletionresponse.go
- createembeddingrequest.go
- createembeddingresponse.go
- createfilerequest.go
- createfinetuningjobrequest.go
- createimageeditrequest.go
- createimagerequest.go
- createimagevariationrequest.go
- createmessagerequest.go
- createmoderationrequest.go
- createmoderationresponse.go
- createrunrequest.go
- createspeechrequest.go
- createthreadandrunrequest.go
- createthreadrequest.go
- createtranscriptionrequest.go
- createtranscriptionresponse.go
- createtranslationrequest.go
- createtranslationresponse.go
- deleteassistantfileresponse.go
- deleteassistantresponse.go
- deletefileresponse.go
- deletemodelresponse.go
- deletethreadresponse.go
- embedding.go
- finetuningjob.go
- finetuningjobevent.go
- functionobject.go
- image.go
- imagesresponse.go
- listassistantfilesresponse.go
- listassistantsresponse.go
- listfilesresponse.go
- listfinetuningjobeventsresponse.go
- listmessagefilesresponse.go
- listmessagesresponse.go
- listmodelsresponse.go
- listpaginatedfinetuningjobsresponse.go
- listrunsresponse.go
- listrunstepsresponse.go
- messagecontentimagefileobject.go
- messagecontenttextannotationsfilecitationobject.go
- messagecontenttextannotationsfilepathobject.go
- messagecontenttextobject.go
- messagefileobject.go
- messageobject.go
- model.go
- modifyassistantrequest.go
- modifymessagerequest.go
- modifyrunrequest.go
- modifythreadrequest.go
- openaifile.go
- runcompletionusage.go
- runobject.go
- runstepcompletionusage.go
- runstepdetailsmessagecreationobject.go
- runstepdetailstoolcallscodeobject.go
- runstepdetailstoolcallscodeoutputimageobject.go
- runstepdetailstoolcallscodeoutputlogsobject.go
- runstepdetailstoolcallsfunctionobject.go
- runstepdetailstoolcallsobject.go
- runstepdetailstoolcallsretrievalobject.go
- runstepobject.go
- runtoolcallobject.go
- security.go
- submittooloutputsrunrequest.go
- threadobject.go