Documentation ¶
Overview ¶
Package openai provides primitives to interact with the openapi HTTP API.
Code generated by unknown module path version unknown version DO NOT EDIT.
Package openai provides primitives to interact with the openapi HTTP API.
Code generated by unknown module path version unknown version DO NOT EDIT.
Index ¶
- Constants
- func GetSwagger() (swagger *openapi3.T, err error)
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, m *http.ServeMux) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, m *http.ServeMux, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- type AssistantFileObject
- type AssistantFileObjectObject
- type AssistantObject
- type AssistantObjectObject
- type AssistantObject_Tools_Item
- func (t AssistantObject_Tools_Item) AsAssistantToolsCode() (AssistantToolsCode, error)
- func (t AssistantObject_Tools_Item) AsAssistantToolsFunction() (AssistantToolsFunction, error)
- func (t AssistantObject_Tools_Item) AsAssistantToolsRetrieval() (AssistantToolsRetrieval, error)
- func (t AssistantObject_Tools_Item) AsXAssistantToolsGPTScript() (XAssistantToolsGPTScript, error)
- func (t *AssistantObject_Tools_Item) FromAssistantToolsCode(v AssistantToolsCode) error
- func (t *AssistantObject_Tools_Item) FromAssistantToolsFunction(v AssistantToolsFunction) error
- func (t *AssistantObject_Tools_Item) FromAssistantToolsRetrieval(v AssistantToolsRetrieval) error
- func (t *AssistantObject_Tools_Item) FromXAssistantToolsGPTScript(v XAssistantToolsGPTScript) error
- func (t AssistantObject_Tools_Item) MarshalJSON() ([]byte, error)
- func (t *AssistantObject_Tools_Item) MergeAssistantToolsCode(v AssistantToolsCode) error
- func (t *AssistantObject_Tools_Item) MergeAssistantToolsFunction(v AssistantToolsFunction) error
- func (t *AssistantObject_Tools_Item) MergeAssistantToolsRetrieval(v AssistantToolsRetrieval) error
- func (t *AssistantObject_Tools_Item) MergeXAssistantToolsGPTScript(v XAssistantToolsGPTScript) error
- func (t *AssistantObject_Tools_Item) UnmarshalJSON(b []byte) error
- type AssistantStreamEvent
- func (t AssistantStreamEvent) AsDoneEvent() (DoneEvent, error)
- func (t AssistantStreamEvent) AsErrorEvent() (ErrorEvent, error)
- func (t AssistantStreamEvent) AsMessageStreamEvent() (MessageStreamEvent, error)
- func (t AssistantStreamEvent) AsRunStepStreamEvent() (RunStepStreamEvent, error)
- func (t AssistantStreamEvent) AsRunStreamEvent() (RunStreamEvent, error)
- func (t AssistantStreamEvent) AsThreadStreamEvent() (ThreadStreamEvent, error)
- func (t *AssistantStreamEvent) FromDoneEvent(v DoneEvent) error
- func (t *AssistantStreamEvent) FromErrorEvent(v ErrorEvent) error
- func (t *AssistantStreamEvent) FromMessageStreamEvent(v MessageStreamEvent) error
- func (t *AssistantStreamEvent) FromRunStepStreamEvent(v RunStepStreamEvent) error
- func (t *AssistantStreamEvent) FromRunStreamEvent(v RunStreamEvent) error
- func (t *AssistantStreamEvent) FromThreadStreamEvent(v ThreadStreamEvent) error
- func (t AssistantStreamEvent) MarshalJSON() ([]byte, error)
- func (t *AssistantStreamEvent) MergeDoneEvent(v DoneEvent) error
- func (t *AssistantStreamEvent) MergeErrorEvent(v ErrorEvent) error
- func (t *AssistantStreamEvent) MergeMessageStreamEvent(v MessageStreamEvent) error
- func (t *AssistantStreamEvent) MergeRunStepStreamEvent(v RunStepStreamEvent) error
- func (t *AssistantStreamEvent) MergeRunStreamEvent(v RunStreamEvent) error
- func (t *AssistantStreamEvent) MergeThreadStreamEvent(v ThreadStreamEvent) error
- func (t *AssistantStreamEvent) UnmarshalJSON(b []byte) error
- type AssistantToolsCode
- type AssistantToolsCodeType
- type AssistantToolsFunction
- type AssistantToolsFunctionType
- type AssistantToolsRetrieval
- type AssistantToolsRetrievalType
- type ChatCompletionFunctionCallOption
- type ChatCompletionFunctions
- type ChatCompletionMessageToolCall
- type ChatCompletionMessageToolCallChunk
- type ChatCompletionMessageToolCallChunkType
- type ChatCompletionMessageToolCallType
- type ChatCompletionMessageToolCalls
- type ChatCompletionNamedToolChoice
- type ChatCompletionNamedToolChoiceType
- type ChatCompletionRequestAssistantMessage
- type ChatCompletionRequestAssistantMessageRole
- type ChatCompletionRequestFunctionMessage
- type ChatCompletionRequestFunctionMessageRole
- type ChatCompletionRequestMessage
- func (t ChatCompletionRequestMessage) AsChatCompletionRequestAssistantMessage() (ChatCompletionRequestAssistantMessage, error)
- func (t ChatCompletionRequestMessage) AsChatCompletionRequestFunctionMessage() (ChatCompletionRequestFunctionMessage, error)
- func (t ChatCompletionRequestMessage) AsChatCompletionRequestSystemMessage() (ChatCompletionRequestSystemMessage, error)
- func (t ChatCompletionRequestMessage) AsChatCompletionRequestToolMessage() (ChatCompletionRequestToolMessage, error)
- func (t ChatCompletionRequestMessage) AsChatCompletionRequestUserMessage() (ChatCompletionRequestUserMessage, error)
- func (t *ChatCompletionRequestMessage) FromChatCompletionRequestAssistantMessage(v ChatCompletionRequestAssistantMessage) error
- func (t *ChatCompletionRequestMessage) FromChatCompletionRequestFunctionMessage(v ChatCompletionRequestFunctionMessage) error
- func (t *ChatCompletionRequestMessage) FromChatCompletionRequestSystemMessage(v ChatCompletionRequestSystemMessage) error
- func (t *ChatCompletionRequestMessage) FromChatCompletionRequestToolMessage(v ChatCompletionRequestToolMessage) error
- func (t *ChatCompletionRequestMessage) FromChatCompletionRequestUserMessage(v ChatCompletionRequestUserMessage) error
- func (t ChatCompletionRequestMessage) MarshalJSON() ([]byte, error)
- func (t *ChatCompletionRequestMessage) MergeChatCompletionRequestAssistantMessage(v ChatCompletionRequestAssistantMessage) error
- func (t *ChatCompletionRequestMessage) MergeChatCompletionRequestFunctionMessage(v ChatCompletionRequestFunctionMessage) error
- func (t *ChatCompletionRequestMessage) MergeChatCompletionRequestSystemMessage(v ChatCompletionRequestSystemMessage) error
- func (t *ChatCompletionRequestMessage) MergeChatCompletionRequestToolMessage(v ChatCompletionRequestToolMessage) error
- func (t *ChatCompletionRequestMessage) MergeChatCompletionRequestUserMessage(v ChatCompletionRequestUserMessage) error
- func (t *ChatCompletionRequestMessage) UnmarshalJSON(b []byte) error
- type ChatCompletionRequestMessageContentPart
- func (t ChatCompletionRequestMessageContentPart) AsChatCompletionRequestMessageContentPartImage() (ChatCompletionRequestMessageContentPartImage, error)
- func (t ChatCompletionRequestMessageContentPart) AsChatCompletionRequestMessageContentPartText() (ChatCompletionRequestMessageContentPartText, error)
- func (t *ChatCompletionRequestMessageContentPart) FromChatCompletionRequestMessageContentPartImage(v ChatCompletionRequestMessageContentPartImage) error
- func (t *ChatCompletionRequestMessageContentPart) FromChatCompletionRequestMessageContentPartText(v ChatCompletionRequestMessageContentPartText) error
- func (t ChatCompletionRequestMessageContentPart) MarshalJSON() ([]byte, error)
- func (t *ChatCompletionRequestMessageContentPart) MergeChatCompletionRequestMessageContentPartImage(v ChatCompletionRequestMessageContentPartImage) error
- func (t *ChatCompletionRequestMessageContentPart) MergeChatCompletionRequestMessageContentPartText(v ChatCompletionRequestMessageContentPartText) error
- func (t *ChatCompletionRequestMessageContentPart) UnmarshalJSON(b []byte) error
- type ChatCompletionRequestMessageContentPartImage
- type ChatCompletionRequestMessageContentPartImageImageUrlDetail
- type ChatCompletionRequestMessageContentPartImageType
- type ChatCompletionRequestMessageContentPartText
- type ChatCompletionRequestMessageContentPartTextType
- type ChatCompletionRequestSystemMessage
- type ChatCompletionRequestSystemMessageRole
- type ChatCompletionRequestToolMessage
- type ChatCompletionRequestToolMessageRole
- type ChatCompletionRequestUserMessage
- type ChatCompletionRequestUserMessageContent0
- type ChatCompletionRequestUserMessageContent1
- type ChatCompletionRequestUserMessageRole
- type ChatCompletionRequestUserMessage_Content
- func (t ChatCompletionRequestUserMessage_Content) AsChatCompletionRequestUserMessageContent0() (ChatCompletionRequestUserMessageContent0, error)
- func (t ChatCompletionRequestUserMessage_Content) AsChatCompletionRequestUserMessageContent1() (ChatCompletionRequestUserMessageContent1, error)
- func (t *ChatCompletionRequestUserMessage_Content) FromChatCompletionRequestUserMessageContent0(v ChatCompletionRequestUserMessageContent0) error
- func (t *ChatCompletionRequestUserMessage_Content) FromChatCompletionRequestUserMessageContent1(v ChatCompletionRequestUserMessageContent1) error
- func (t ChatCompletionRequestUserMessage_Content) MarshalJSON() ([]byte, error)
- func (t *ChatCompletionRequestUserMessage_Content) MergeChatCompletionRequestUserMessageContent0(v ChatCompletionRequestUserMessageContent0) error
- func (t *ChatCompletionRequestUserMessage_Content) MergeChatCompletionRequestUserMessageContent1(v ChatCompletionRequestUserMessageContent1) error
- func (t *ChatCompletionRequestUserMessage_Content) UnmarshalJSON(b []byte) error
- type ChatCompletionResponseMessage
- type ChatCompletionResponseMessageRole
- type ChatCompletionRole
- type ChatCompletionStreamResponseDelta
- type ChatCompletionStreamResponseDeltaRole
- type ChatCompletionTokenLogprob
- type ChatCompletionTool
- type ChatCompletionToolChoiceOption
- func (t ChatCompletionToolChoiceOption) AsChatCompletionNamedToolChoice() (ChatCompletionNamedToolChoice, error)
- func (t ChatCompletionToolChoiceOption) AsChatCompletionToolChoiceOption0() (ChatCompletionToolChoiceOption0, error)
- func (t *ChatCompletionToolChoiceOption) FromChatCompletionNamedToolChoice(v ChatCompletionNamedToolChoice) error
- func (t *ChatCompletionToolChoiceOption) FromChatCompletionToolChoiceOption0(v ChatCompletionToolChoiceOption0) error
- func (t ChatCompletionToolChoiceOption) MarshalJSON() ([]byte, error)
- func (t *ChatCompletionToolChoiceOption) MergeChatCompletionNamedToolChoice(v ChatCompletionNamedToolChoice) error
- func (t *ChatCompletionToolChoiceOption) MergeChatCompletionToolChoiceOption0(v ChatCompletionToolChoiceOption0) error
- func (t *ChatCompletionToolChoiceOption) UnmarshalJSON(b []byte) error
- type ChatCompletionToolChoiceOption0
- type ChatCompletionToolType
- type CompletionUsage
- type CreateAssistantFileJSONRequestBody
- type CreateAssistantFileRequest
- type CreateAssistantJSONRequestBody
- type CreateAssistantRequest
- type CreateAssistantRequestModel0
- type CreateAssistantRequest_Model
- func (t CreateAssistantRequest_Model) AsCreateAssistantRequestModel0() (CreateAssistantRequestModel0, error)
- func (t *CreateAssistantRequest_Model) FromCreateAssistantRequestModel0(v CreateAssistantRequestModel0) error
- func (t CreateAssistantRequest_Model) MarshalJSON() ([]byte, error)
- func (t *CreateAssistantRequest_Model) MergeCreateAssistantRequestModel0(v CreateAssistantRequestModel0) error
- func (t *CreateAssistantRequest_Model) UnmarshalJSON(b []byte) error
- type CreateAssistantRequest_Tools_Item
- func (t CreateAssistantRequest_Tools_Item) AsAssistantToolsCode() (AssistantToolsCode, error)
- func (t CreateAssistantRequest_Tools_Item) AsAssistantToolsFunction() (AssistantToolsFunction, error)
- func (t CreateAssistantRequest_Tools_Item) AsAssistantToolsRetrieval() (AssistantToolsRetrieval, error)
- func (t CreateAssistantRequest_Tools_Item) AsXAssistantToolsGPTScript() (XAssistantToolsGPTScript, error)
- func (t *CreateAssistantRequest_Tools_Item) FromAssistantToolsCode(v AssistantToolsCode) error
- func (t *CreateAssistantRequest_Tools_Item) FromAssistantToolsFunction(v AssistantToolsFunction) error
- func (t *CreateAssistantRequest_Tools_Item) FromAssistantToolsRetrieval(v AssistantToolsRetrieval) error
- func (t *CreateAssistantRequest_Tools_Item) FromXAssistantToolsGPTScript(v XAssistantToolsGPTScript) error
- func (t CreateAssistantRequest_Tools_Item) MarshalJSON() ([]byte, error)
- func (t *CreateAssistantRequest_Tools_Item) MergeAssistantToolsCode(v AssistantToolsCode) error
- func (t *CreateAssistantRequest_Tools_Item) MergeAssistantToolsFunction(v AssistantToolsFunction) error
- func (t *CreateAssistantRequest_Tools_Item) MergeAssistantToolsRetrieval(v AssistantToolsRetrieval) error
- func (t *CreateAssistantRequest_Tools_Item) MergeXAssistantToolsGPTScript(v XAssistantToolsGPTScript) error
- func (t *CreateAssistantRequest_Tools_Item) UnmarshalJSON(b []byte) error
- type CreateChatCompletionFunctionResponse
- type CreateChatCompletionFunctionResponseChoicesFinishReason
- type CreateChatCompletionFunctionResponseObject
- type CreateChatCompletionImageResponse
- type CreateChatCompletionJSONRequestBody
- type CreateChatCompletionRequest
- type CreateChatCompletionRequestFunctionCall0
- type CreateChatCompletionRequestModel0
- type CreateChatCompletionRequestModel1
- type CreateChatCompletionRequestResponseFormatType
- type CreateChatCompletionRequestStop0
- type CreateChatCompletionRequestStop1
- type CreateChatCompletionRequest_FunctionCall
- func (t CreateChatCompletionRequest_FunctionCall) AsChatCompletionFunctionCallOption() (ChatCompletionFunctionCallOption, error)
- func (t CreateChatCompletionRequest_FunctionCall) AsCreateChatCompletionRequestFunctionCall0() (CreateChatCompletionRequestFunctionCall0, error)
- func (t *CreateChatCompletionRequest_FunctionCall) FromChatCompletionFunctionCallOption(v ChatCompletionFunctionCallOption) error
- func (t *CreateChatCompletionRequest_FunctionCall) FromCreateChatCompletionRequestFunctionCall0(v CreateChatCompletionRequestFunctionCall0) error
- func (t CreateChatCompletionRequest_FunctionCall) MarshalJSON() ([]byte, error)
- func (t *CreateChatCompletionRequest_FunctionCall) MergeChatCompletionFunctionCallOption(v ChatCompletionFunctionCallOption) error
- func (t *CreateChatCompletionRequest_FunctionCall) MergeCreateChatCompletionRequestFunctionCall0(v CreateChatCompletionRequestFunctionCall0) error
- func (t *CreateChatCompletionRequest_FunctionCall) UnmarshalJSON(b []byte) error
- type CreateChatCompletionRequest_Model
- func (t CreateChatCompletionRequest_Model) AsCreateChatCompletionRequestModel0() (CreateChatCompletionRequestModel0, error)
- func (t CreateChatCompletionRequest_Model) AsCreateChatCompletionRequestModel1() (CreateChatCompletionRequestModel1, error)
- func (t *CreateChatCompletionRequest_Model) FromCreateChatCompletionRequestModel0(v CreateChatCompletionRequestModel0) error
- func (t *CreateChatCompletionRequest_Model) FromCreateChatCompletionRequestModel1(v CreateChatCompletionRequestModel1) error
- func (t CreateChatCompletionRequest_Model) MarshalJSON() ([]byte, error)
- func (t *CreateChatCompletionRequest_Model) MergeCreateChatCompletionRequestModel0(v CreateChatCompletionRequestModel0) error
- func (t *CreateChatCompletionRequest_Model) MergeCreateChatCompletionRequestModel1(v CreateChatCompletionRequestModel1) error
- func (t *CreateChatCompletionRequest_Model) UnmarshalJSON(b []byte) error
- type CreateChatCompletionRequest_Stop
- func (t CreateChatCompletionRequest_Stop) AsCreateChatCompletionRequestStop0() (CreateChatCompletionRequestStop0, error)
- func (t CreateChatCompletionRequest_Stop) AsCreateChatCompletionRequestStop1() (CreateChatCompletionRequestStop1, error)
- func (t *CreateChatCompletionRequest_Stop) FromCreateChatCompletionRequestStop0(v CreateChatCompletionRequestStop0) error
- func (t *CreateChatCompletionRequest_Stop) FromCreateChatCompletionRequestStop1(v CreateChatCompletionRequestStop1) error
- func (t CreateChatCompletionRequest_Stop) MarshalJSON() ([]byte, error)
- func (t *CreateChatCompletionRequest_Stop) MergeCreateChatCompletionRequestStop0(v CreateChatCompletionRequestStop0) error
- func (t *CreateChatCompletionRequest_Stop) MergeCreateChatCompletionRequestStop1(v CreateChatCompletionRequestStop1) error
- func (t *CreateChatCompletionRequest_Stop) UnmarshalJSON(b []byte) error
- type CreateChatCompletionResponse
- type CreateChatCompletionResponseChoicesFinishReason
- type CreateChatCompletionResponseObject
- type CreateChatCompletionStreamResponse
- type CreateChatCompletionStreamResponseChoicesFinishReason
- type CreateChatCompletionStreamResponseObject
- type CreateCompletionJSONRequestBody
- type CreateCompletionRequest
- type CreateCompletionRequestModel0
- type CreateCompletionRequestModel1
- type CreateCompletionRequestPrompt0
- type CreateCompletionRequestPrompt1
- type CreateCompletionRequestPrompt2
- type CreateCompletionRequestPrompt3
- type CreateCompletionRequestStop0
- type CreateCompletionRequestStop1
- type CreateCompletionRequest_Model
- func (t CreateCompletionRequest_Model) AsCreateCompletionRequestModel0() (CreateCompletionRequestModel0, error)
- func (t CreateCompletionRequest_Model) AsCreateCompletionRequestModel1() (CreateCompletionRequestModel1, error)
- func (t *CreateCompletionRequest_Model) FromCreateCompletionRequestModel0(v CreateCompletionRequestModel0) error
- func (t *CreateCompletionRequest_Model) FromCreateCompletionRequestModel1(v CreateCompletionRequestModel1) error
- func (t CreateCompletionRequest_Model) MarshalJSON() ([]byte, error)
- func (t *CreateCompletionRequest_Model) MergeCreateCompletionRequestModel0(v CreateCompletionRequestModel0) error
- func (t *CreateCompletionRequest_Model) MergeCreateCompletionRequestModel1(v CreateCompletionRequestModel1) error
- func (t *CreateCompletionRequest_Model) UnmarshalJSON(b []byte) error
- type CreateCompletionRequest_Prompt
- func (t CreateCompletionRequest_Prompt) AsCreateCompletionRequestPrompt0() (CreateCompletionRequestPrompt0, error)
- func (t CreateCompletionRequest_Prompt) AsCreateCompletionRequestPrompt1() (CreateCompletionRequestPrompt1, error)
- func (t CreateCompletionRequest_Prompt) AsCreateCompletionRequestPrompt2() (CreateCompletionRequestPrompt2, error)
- func (t CreateCompletionRequest_Prompt) AsCreateCompletionRequestPrompt3() (CreateCompletionRequestPrompt3, error)
- func (t *CreateCompletionRequest_Prompt) FromCreateCompletionRequestPrompt0(v CreateCompletionRequestPrompt0) error
- func (t *CreateCompletionRequest_Prompt) FromCreateCompletionRequestPrompt1(v CreateCompletionRequestPrompt1) error
- func (t *CreateCompletionRequest_Prompt) FromCreateCompletionRequestPrompt2(v CreateCompletionRequestPrompt2) error
- func (t *CreateCompletionRequest_Prompt) FromCreateCompletionRequestPrompt3(v CreateCompletionRequestPrompt3) error
- func (t CreateCompletionRequest_Prompt) MarshalJSON() ([]byte, error)
- func (t *CreateCompletionRequest_Prompt) MergeCreateCompletionRequestPrompt0(v CreateCompletionRequestPrompt0) error
- func (t *CreateCompletionRequest_Prompt) MergeCreateCompletionRequestPrompt1(v CreateCompletionRequestPrompt1) error
- func (t *CreateCompletionRequest_Prompt) MergeCreateCompletionRequestPrompt2(v CreateCompletionRequestPrompt2) error
- func (t *CreateCompletionRequest_Prompt) MergeCreateCompletionRequestPrompt3(v CreateCompletionRequestPrompt3) error
- func (t *CreateCompletionRequest_Prompt) UnmarshalJSON(b []byte) error
- type CreateCompletionRequest_Stop
- func (t CreateCompletionRequest_Stop) AsCreateCompletionRequestStop0() (CreateCompletionRequestStop0, error)
- func (t CreateCompletionRequest_Stop) AsCreateCompletionRequestStop1() (CreateCompletionRequestStop1, error)
- func (t *CreateCompletionRequest_Stop) FromCreateCompletionRequestStop0(v CreateCompletionRequestStop0) error
- func (t *CreateCompletionRequest_Stop) FromCreateCompletionRequestStop1(v CreateCompletionRequestStop1) error
- func (t CreateCompletionRequest_Stop) MarshalJSON() ([]byte, error)
- func (t *CreateCompletionRequest_Stop) MergeCreateCompletionRequestStop0(v CreateCompletionRequestStop0) error
- func (t *CreateCompletionRequest_Stop) MergeCreateCompletionRequestStop1(v CreateCompletionRequestStop1) error
- func (t *CreateCompletionRequest_Stop) UnmarshalJSON(b []byte) error
- type CreateCompletionResponse
- type CreateCompletionResponseChoicesFinishReason
- type CreateCompletionResponseObject
- type CreateEmbeddingJSONRequestBody
- type CreateEmbeddingRequest
- type CreateEmbeddingRequestEncodingFormat
- type CreateEmbeddingRequestInput0
- type CreateEmbeddingRequestInput1
- type CreateEmbeddingRequestInput2
- type CreateEmbeddingRequestInput3
- type CreateEmbeddingRequestModel0
- type CreateEmbeddingRequestModel1
- type CreateEmbeddingRequest_Input
- func (t CreateEmbeddingRequest_Input) AsCreateEmbeddingRequestInput0() (CreateEmbeddingRequestInput0, error)
- func (t CreateEmbeddingRequest_Input) AsCreateEmbeddingRequestInput1() (CreateEmbeddingRequestInput1, error)
- func (t CreateEmbeddingRequest_Input) AsCreateEmbeddingRequestInput2() (CreateEmbeddingRequestInput2, error)
- func (t CreateEmbeddingRequest_Input) AsCreateEmbeddingRequestInput3() (CreateEmbeddingRequestInput3, error)
- func (t *CreateEmbeddingRequest_Input) FromCreateEmbeddingRequestInput0(v CreateEmbeddingRequestInput0) error
- func (t *CreateEmbeddingRequest_Input) FromCreateEmbeddingRequestInput1(v CreateEmbeddingRequestInput1) error
- func (t *CreateEmbeddingRequest_Input) FromCreateEmbeddingRequestInput2(v CreateEmbeddingRequestInput2) error
- func (t *CreateEmbeddingRequest_Input) FromCreateEmbeddingRequestInput3(v CreateEmbeddingRequestInput3) error
- func (t CreateEmbeddingRequest_Input) MarshalJSON() ([]byte, error)
- func (t *CreateEmbeddingRequest_Input) MergeCreateEmbeddingRequestInput0(v CreateEmbeddingRequestInput0) error
- func (t *CreateEmbeddingRequest_Input) MergeCreateEmbeddingRequestInput1(v CreateEmbeddingRequestInput1) error
- func (t *CreateEmbeddingRequest_Input) MergeCreateEmbeddingRequestInput2(v CreateEmbeddingRequestInput2) error
- func (t *CreateEmbeddingRequest_Input) MergeCreateEmbeddingRequestInput3(v CreateEmbeddingRequestInput3) error
- func (t *CreateEmbeddingRequest_Input) UnmarshalJSON(b []byte) error
- type CreateEmbeddingRequest_Model
- func (t CreateEmbeddingRequest_Model) AsCreateEmbeddingRequestModel0() (CreateEmbeddingRequestModel0, error)
- func (t CreateEmbeddingRequest_Model) AsCreateEmbeddingRequestModel1() (CreateEmbeddingRequestModel1, error)
- func (t *CreateEmbeddingRequest_Model) FromCreateEmbeddingRequestModel0(v CreateEmbeddingRequestModel0) error
- func (t *CreateEmbeddingRequest_Model) FromCreateEmbeddingRequestModel1(v CreateEmbeddingRequestModel1) error
- func (t CreateEmbeddingRequest_Model) MarshalJSON() ([]byte, error)
- func (t *CreateEmbeddingRequest_Model) MergeCreateEmbeddingRequestModel0(v CreateEmbeddingRequestModel0) error
- func (t *CreateEmbeddingRequest_Model) MergeCreateEmbeddingRequestModel1(v CreateEmbeddingRequestModel1) error
- func (t *CreateEmbeddingRequest_Model) UnmarshalJSON(b []byte) error
- type CreateEmbeddingResponse
- type CreateEmbeddingResponseObject
- type CreateFileMultipartRequestBody
- type CreateFileRequest
- type CreateFileRequestPurpose
- type CreateFineTuningJobJSONRequestBody
- type CreateFineTuningJobRequest
- type CreateFineTuningJobRequestHyperparametersBatchSize0
- type CreateFineTuningJobRequestHyperparametersBatchSize1
- type CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0
- type CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1
- type CreateFineTuningJobRequestHyperparametersNEpochs0
- type CreateFineTuningJobRequestHyperparametersNEpochs1
- type CreateFineTuningJobRequestModel0
- type CreateFineTuningJobRequestModel1
- type CreateFineTuningJobRequest_Hyperparameters_BatchSize
- func (t CreateFineTuningJobRequest_Hyperparameters_BatchSize) AsCreateFineTuningJobRequestHyperparametersBatchSize0() (CreateFineTuningJobRequestHyperparametersBatchSize0, error)
- func (t CreateFineTuningJobRequest_Hyperparameters_BatchSize) AsCreateFineTuningJobRequestHyperparametersBatchSize1() (CreateFineTuningJobRequestHyperparametersBatchSize1, error)
- func (t *CreateFineTuningJobRequest_Hyperparameters_BatchSize) FromCreateFineTuningJobRequestHyperparametersBatchSize0(v CreateFineTuningJobRequestHyperparametersBatchSize0) error
- func (t *CreateFineTuningJobRequest_Hyperparameters_BatchSize) FromCreateFineTuningJobRequestHyperparametersBatchSize1(v CreateFineTuningJobRequestHyperparametersBatchSize1) error
- func (t CreateFineTuningJobRequest_Hyperparameters_BatchSize) MarshalJSON() ([]byte, error)
- func (t *CreateFineTuningJobRequest_Hyperparameters_BatchSize) MergeCreateFineTuningJobRequestHyperparametersBatchSize0(v CreateFineTuningJobRequestHyperparametersBatchSize0) error
- func (t *CreateFineTuningJobRequest_Hyperparameters_BatchSize) MergeCreateFineTuningJobRequestHyperparametersBatchSize1(v CreateFineTuningJobRequestHyperparametersBatchSize1) error
- func (t *CreateFineTuningJobRequest_Hyperparameters_BatchSize) UnmarshalJSON(b []byte) error
- type CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier
- func (t CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) AsCreateFineTuningJobRequestHyperparametersLearningRateMultiplier0() (CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0, error)
- func (t CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) AsCreateFineTuningJobRequestHyperparametersLearningRateMultiplier1() (CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1, error)
- func (t *CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) FromCreateFineTuningJobRequestHyperparametersLearningRateMultiplier0(v CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0) error
- func (t *CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) FromCreateFineTuningJobRequestHyperparametersLearningRateMultiplier1(v CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1) error
- func (t CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) MarshalJSON() ([]byte, error)
- func (t *CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) MergeCreateFineTuningJobRequestHyperparametersLearningRateMultiplier0(v CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0) error
- func (t *CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) MergeCreateFineTuningJobRequestHyperparametersLearningRateMultiplier1(v CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1) error
- func (t *CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) UnmarshalJSON(b []byte) error
- type CreateFineTuningJobRequest_Hyperparameters_NEpochs
- func (t CreateFineTuningJobRequest_Hyperparameters_NEpochs) AsCreateFineTuningJobRequestHyperparametersNEpochs0() (CreateFineTuningJobRequestHyperparametersNEpochs0, error)
- func (t CreateFineTuningJobRequest_Hyperparameters_NEpochs) AsCreateFineTuningJobRequestHyperparametersNEpochs1() (CreateFineTuningJobRequestHyperparametersNEpochs1, error)
- func (t *CreateFineTuningJobRequest_Hyperparameters_NEpochs) FromCreateFineTuningJobRequestHyperparametersNEpochs0(v CreateFineTuningJobRequestHyperparametersNEpochs0) error
- func (t *CreateFineTuningJobRequest_Hyperparameters_NEpochs) FromCreateFineTuningJobRequestHyperparametersNEpochs1(v CreateFineTuningJobRequestHyperparametersNEpochs1) error
- func (t CreateFineTuningJobRequest_Hyperparameters_NEpochs) MarshalJSON() ([]byte, error)
- func (t *CreateFineTuningJobRequest_Hyperparameters_NEpochs) MergeCreateFineTuningJobRequestHyperparametersNEpochs0(v CreateFineTuningJobRequestHyperparametersNEpochs0) error
- func (t *CreateFineTuningJobRequest_Hyperparameters_NEpochs) MergeCreateFineTuningJobRequestHyperparametersNEpochs1(v CreateFineTuningJobRequestHyperparametersNEpochs1) error
- func (t *CreateFineTuningJobRequest_Hyperparameters_NEpochs) UnmarshalJSON(b []byte) error
- type CreateFineTuningJobRequest_Model
- func (t CreateFineTuningJobRequest_Model) AsCreateFineTuningJobRequestModel0() (CreateFineTuningJobRequestModel0, error)
- func (t CreateFineTuningJobRequest_Model) AsCreateFineTuningJobRequestModel1() (CreateFineTuningJobRequestModel1, error)
- func (t *CreateFineTuningJobRequest_Model) FromCreateFineTuningJobRequestModel0(v CreateFineTuningJobRequestModel0) error
- func (t *CreateFineTuningJobRequest_Model) FromCreateFineTuningJobRequestModel1(v CreateFineTuningJobRequestModel1) error
- func (t CreateFineTuningJobRequest_Model) MarshalJSON() ([]byte, error)
- func (t *CreateFineTuningJobRequest_Model) MergeCreateFineTuningJobRequestModel0(v CreateFineTuningJobRequestModel0) error
- func (t *CreateFineTuningJobRequest_Model) MergeCreateFineTuningJobRequestModel1(v CreateFineTuningJobRequestModel1) error
- func (t *CreateFineTuningJobRequest_Model) UnmarshalJSON(b []byte) error
- type CreateImageEditMultipartRequestBody
- type CreateImageEditRequest
- type CreateImageEditRequestModel0
- type CreateImageEditRequestModel1
- type CreateImageEditRequestResponseFormat
- type CreateImageEditRequestSize
- type CreateImageEditRequest_Model
- func (t CreateImageEditRequest_Model) AsCreateImageEditRequestModel0() (CreateImageEditRequestModel0, error)
- func (t CreateImageEditRequest_Model) AsCreateImageEditRequestModel1() (CreateImageEditRequestModel1, error)
- func (t *CreateImageEditRequest_Model) FromCreateImageEditRequestModel0(v CreateImageEditRequestModel0) error
- func (t *CreateImageEditRequest_Model) FromCreateImageEditRequestModel1(v CreateImageEditRequestModel1) error
- func (t CreateImageEditRequest_Model) MarshalJSON() ([]byte, error)
- func (t *CreateImageEditRequest_Model) MergeCreateImageEditRequestModel0(v CreateImageEditRequestModel0) error
- func (t *CreateImageEditRequest_Model) MergeCreateImageEditRequestModel1(v CreateImageEditRequestModel1) error
- func (t *CreateImageEditRequest_Model) UnmarshalJSON(b []byte) error
- type CreateImageJSONRequestBody
- type CreateImageRequest
- type CreateImageRequestModel0
- type CreateImageRequestModel1
- type CreateImageRequestQuality
- type CreateImageRequestResponseFormat
- type CreateImageRequestSize
- type CreateImageRequestStyle
- type CreateImageRequest_Model
- func (t CreateImageRequest_Model) AsCreateImageRequestModel0() (CreateImageRequestModel0, error)
- func (t CreateImageRequest_Model) AsCreateImageRequestModel1() (CreateImageRequestModel1, error)
- func (t *CreateImageRequest_Model) FromCreateImageRequestModel0(v CreateImageRequestModel0) error
- func (t *CreateImageRequest_Model) FromCreateImageRequestModel1(v CreateImageRequestModel1) error
- func (t CreateImageRequest_Model) MarshalJSON() ([]byte, error)
- func (t *CreateImageRequest_Model) MergeCreateImageRequestModel0(v CreateImageRequestModel0) error
- func (t *CreateImageRequest_Model) MergeCreateImageRequestModel1(v CreateImageRequestModel1) error
- func (t *CreateImageRequest_Model) UnmarshalJSON(b []byte) error
- type CreateImageVariationMultipartRequestBody
- type CreateImageVariationRequest
- type CreateImageVariationRequestModel0
- type CreateImageVariationRequestModel1
- type CreateImageVariationRequestResponseFormat
- type CreateImageVariationRequestSize
- type CreateImageVariationRequest_Model
- func (t CreateImageVariationRequest_Model) AsCreateImageVariationRequestModel0() (CreateImageVariationRequestModel0, error)
- func (t CreateImageVariationRequest_Model) AsCreateImageVariationRequestModel1() (CreateImageVariationRequestModel1, error)
- func (t *CreateImageVariationRequest_Model) FromCreateImageVariationRequestModel0(v CreateImageVariationRequestModel0) error
- func (t *CreateImageVariationRequest_Model) FromCreateImageVariationRequestModel1(v CreateImageVariationRequestModel1) error
- func (t CreateImageVariationRequest_Model) MarshalJSON() ([]byte, error)
- func (t *CreateImageVariationRequest_Model) MergeCreateImageVariationRequestModel0(v CreateImageVariationRequestModel0) error
- func (t *CreateImageVariationRequest_Model) MergeCreateImageVariationRequestModel1(v CreateImageVariationRequestModel1) error
- func (t *CreateImageVariationRequest_Model) UnmarshalJSON(b []byte) error
- type CreateMessageJSONRequestBody
- type CreateMessageRequest
- type CreateMessageRequestRole
- type CreateModerationJSONRequestBody
- type CreateModerationRequest
- type CreateModerationRequestInput0
- type CreateModerationRequestInput1
- type CreateModerationRequestModel0
- type CreateModerationRequestModel1
- type CreateModerationRequest_Input
- func (t CreateModerationRequest_Input) AsCreateModerationRequestInput0() (CreateModerationRequestInput0, error)
- func (t CreateModerationRequest_Input) AsCreateModerationRequestInput1() (CreateModerationRequestInput1, error)
- func (t *CreateModerationRequest_Input) FromCreateModerationRequestInput0(v CreateModerationRequestInput0) error
- func (t *CreateModerationRequest_Input) FromCreateModerationRequestInput1(v CreateModerationRequestInput1) error
- func (t CreateModerationRequest_Input) MarshalJSON() ([]byte, error)
- func (t *CreateModerationRequest_Input) MergeCreateModerationRequestInput0(v CreateModerationRequestInput0) error
- func (t *CreateModerationRequest_Input) MergeCreateModerationRequestInput1(v CreateModerationRequestInput1) error
- func (t *CreateModerationRequest_Input) UnmarshalJSON(b []byte) error
- type CreateModerationRequest_Model
- func (t CreateModerationRequest_Model) AsCreateModerationRequestModel0() (CreateModerationRequestModel0, error)
- func (t CreateModerationRequest_Model) AsCreateModerationRequestModel1() (CreateModerationRequestModel1, error)
- func (t *CreateModerationRequest_Model) FromCreateModerationRequestModel0(v CreateModerationRequestModel0) error
- func (t *CreateModerationRequest_Model) FromCreateModerationRequestModel1(v CreateModerationRequestModel1) error
- func (t CreateModerationRequest_Model) MarshalJSON() ([]byte, error)
- func (t *CreateModerationRequest_Model) MergeCreateModerationRequestModel0(v CreateModerationRequestModel0) error
- func (t *CreateModerationRequest_Model) MergeCreateModerationRequestModel1(v CreateModerationRequestModel1) error
- func (t *CreateModerationRequest_Model) UnmarshalJSON(b []byte) error
- type CreateModerationResponse
- type CreateRunJSONRequestBody
- type CreateRunRequest
- type CreateRunRequest_Tools_Item
- func (t CreateRunRequest_Tools_Item) AsAssistantToolsCode() (AssistantToolsCode, error)
- func (t CreateRunRequest_Tools_Item) AsAssistantToolsFunction() (AssistantToolsFunction, error)
- func (t CreateRunRequest_Tools_Item) AsAssistantToolsRetrieval() (AssistantToolsRetrieval, error)
- func (t *CreateRunRequest_Tools_Item) FromAssistantToolsCode(v AssistantToolsCode) error
- func (t *CreateRunRequest_Tools_Item) FromAssistantToolsFunction(v AssistantToolsFunction) error
- func (t *CreateRunRequest_Tools_Item) FromAssistantToolsRetrieval(v AssistantToolsRetrieval) error
- func (t CreateRunRequest_Tools_Item) MarshalJSON() ([]byte, error)
- func (t *CreateRunRequest_Tools_Item) MergeAssistantToolsCode(v AssistantToolsCode) error
- func (t *CreateRunRequest_Tools_Item) MergeAssistantToolsFunction(v AssistantToolsFunction) error
- func (t *CreateRunRequest_Tools_Item) MergeAssistantToolsRetrieval(v AssistantToolsRetrieval) error
- func (t *CreateRunRequest_Tools_Item) UnmarshalJSON(b []byte) error
- type CreateSpeechJSONRequestBody
- type CreateSpeechRequest
- type CreateSpeechRequestModel0
- type CreateSpeechRequestModel1
- type CreateSpeechRequestResponseFormat
- type CreateSpeechRequestVoice
- type CreateSpeechRequest_Model
- func (t CreateSpeechRequest_Model) AsCreateSpeechRequestModel0() (CreateSpeechRequestModel0, error)
- func (t CreateSpeechRequest_Model) AsCreateSpeechRequestModel1() (CreateSpeechRequestModel1, error)
- func (t *CreateSpeechRequest_Model) FromCreateSpeechRequestModel0(v CreateSpeechRequestModel0) error
- func (t *CreateSpeechRequest_Model) FromCreateSpeechRequestModel1(v CreateSpeechRequestModel1) error
- func (t CreateSpeechRequest_Model) MarshalJSON() ([]byte, error)
- func (t *CreateSpeechRequest_Model) MergeCreateSpeechRequestModel0(v CreateSpeechRequestModel0) error
- func (t *CreateSpeechRequest_Model) MergeCreateSpeechRequestModel1(v CreateSpeechRequestModel1) error
- func (t *CreateSpeechRequest_Model) UnmarshalJSON(b []byte) error
- type CreateThreadAndRunJSONRequestBody
- type CreateThreadAndRunRequest
- type CreateThreadAndRunRequest_Tools_Item
- func (t CreateThreadAndRunRequest_Tools_Item) AsAssistantToolsCode() (AssistantToolsCode, error)
- func (t CreateThreadAndRunRequest_Tools_Item) AsAssistantToolsFunction() (AssistantToolsFunction, error)
- func (t CreateThreadAndRunRequest_Tools_Item) AsAssistantToolsRetrieval() (AssistantToolsRetrieval, error)
- func (t *CreateThreadAndRunRequest_Tools_Item) FromAssistantToolsCode(v AssistantToolsCode) error
- func (t *CreateThreadAndRunRequest_Tools_Item) FromAssistantToolsFunction(v AssistantToolsFunction) error
- func (t *CreateThreadAndRunRequest_Tools_Item) FromAssistantToolsRetrieval(v AssistantToolsRetrieval) error
- func (t CreateThreadAndRunRequest_Tools_Item) MarshalJSON() ([]byte, error)
- func (t *CreateThreadAndRunRequest_Tools_Item) MergeAssistantToolsCode(v AssistantToolsCode) error
- func (t *CreateThreadAndRunRequest_Tools_Item) MergeAssistantToolsFunction(v AssistantToolsFunction) error
- func (t *CreateThreadAndRunRequest_Tools_Item) MergeAssistantToolsRetrieval(v AssistantToolsRetrieval) error
- func (t *CreateThreadAndRunRequest_Tools_Item) UnmarshalJSON(b []byte) error
- type CreateThreadJSONRequestBody
- type CreateThreadRequest
- type CreateTranscriptionMultipartRequestBody
- type CreateTranscriptionRequest
- type CreateTranscriptionRequestModel0
- type CreateTranscriptionRequestModel1
- type CreateTranscriptionRequestResponseFormat
- type CreateTranscriptionRequestTimestampGranularities
- type CreateTranscriptionRequest_Model
- func (t CreateTranscriptionRequest_Model) AsCreateTranscriptionRequestModel0() (CreateTranscriptionRequestModel0, error)
- func (t CreateTranscriptionRequest_Model) AsCreateTranscriptionRequestModel1() (CreateTranscriptionRequestModel1, error)
- func (t *CreateTranscriptionRequest_Model) FromCreateTranscriptionRequestModel0(v CreateTranscriptionRequestModel0) error
- func (t *CreateTranscriptionRequest_Model) FromCreateTranscriptionRequestModel1(v CreateTranscriptionRequestModel1) error
- func (t CreateTranscriptionRequest_Model) MarshalJSON() ([]byte, error)
- func (t *CreateTranscriptionRequest_Model) MergeCreateTranscriptionRequestModel0(v CreateTranscriptionRequestModel0) error
- func (t *CreateTranscriptionRequest_Model) MergeCreateTranscriptionRequestModel1(v CreateTranscriptionRequestModel1) error
- func (t *CreateTranscriptionRequest_Model) UnmarshalJSON(b []byte) error
- type CreateTranscriptionResponseJson
- type CreateTranscriptionResponseVerboseJson
- type CreateTranslationMultipartRequestBody
- type CreateTranslationRequest
- type CreateTranslationRequestModel0
- type CreateTranslationRequestModel1
- type CreateTranslationRequest_Model
- func (t CreateTranslationRequest_Model) AsCreateTranslationRequestModel0() (CreateTranslationRequestModel0, error)
- func (t CreateTranslationRequest_Model) AsCreateTranslationRequestModel1() (CreateTranslationRequestModel1, error)
- func (t *CreateTranslationRequest_Model) FromCreateTranslationRequestModel0(v CreateTranslationRequestModel0) error
- func (t *CreateTranslationRequest_Model) FromCreateTranslationRequestModel1(v CreateTranslationRequestModel1) error
- func (t CreateTranslationRequest_Model) MarshalJSON() ([]byte, error)
- func (t *CreateTranslationRequest_Model) MergeCreateTranslationRequestModel0(v CreateTranslationRequestModel0) error
- func (t *CreateTranslationRequest_Model) MergeCreateTranslationRequestModel1(v CreateTranslationRequestModel1) error
- func (t *CreateTranslationRequest_Model) UnmarshalJSON(b []byte) error
- type CreateTranslationResponseJson
- type CreateTranslationResponseVerboseJson
- type DeleteAssistantFileResponse
- type DeleteAssistantFileResponseObject
- type DeleteAssistantResponse
- type DeleteAssistantResponseObject
- type DeleteFileResponse
- type DeleteFileResponseObject
- type DeleteMessageResponse
- type DeleteMessageResponseObject
- type DeleteModelResponse
- type DeleteThreadResponse
- type DeleteThreadResponseObject
- type DoneEvent
- type DoneEventData
- type DoneEventEvent
- type Embedding
- type EmbeddingEmbedding0
- type EmbeddingEmbedding1
- type EmbeddingObject
- type Embedding_Embedding
- func (t Embedding_Embedding) AsEmbeddingEmbedding0() (EmbeddingEmbedding0, error)
- func (t Embedding_Embedding) AsEmbeddingEmbedding1() (EmbeddingEmbedding1, error)
- func (t *Embedding_Embedding) FromEmbeddingEmbedding0(v EmbeddingEmbedding0) error
- func (t *Embedding_Embedding) FromEmbeddingEmbedding1(v EmbeddingEmbedding1) error
- func (t Embedding_Embedding) MarshalJSON() ([]byte, error)
- func (t *Embedding_Embedding) MergeEmbeddingEmbedding0(v EmbeddingEmbedding0) error
- func (t *Embedding_Embedding) MergeEmbeddingEmbedding1(v EmbeddingEmbedding1) error
- func (t *Embedding_Embedding) UnmarshalJSON(b []byte) error
- type Error
- type ErrorEvent
- type ErrorEventEvent
- type ErrorResponse
- type FineTuningJob
- type FineTuningJobEvent
- type FineTuningJobEventLevel
- type FineTuningJobEventObject
- type FineTuningJobHyperparametersNEpochs0
- type FineTuningJobHyperparametersNEpochs1
- type FineTuningJobObject
- type FineTuningJobStatus
- type FineTuningJob_Hyperparameters_NEpochs
- func (t FineTuningJob_Hyperparameters_NEpochs) AsFineTuningJobHyperparametersNEpochs0() (FineTuningJobHyperparametersNEpochs0, error)
- func (t FineTuningJob_Hyperparameters_NEpochs) AsFineTuningJobHyperparametersNEpochs1() (FineTuningJobHyperparametersNEpochs1, error)
- func (t *FineTuningJob_Hyperparameters_NEpochs) FromFineTuningJobHyperparametersNEpochs0(v FineTuningJobHyperparametersNEpochs0) error
- func (t *FineTuningJob_Hyperparameters_NEpochs) FromFineTuningJobHyperparametersNEpochs1(v FineTuningJobHyperparametersNEpochs1) error
- func (t FineTuningJob_Hyperparameters_NEpochs) MarshalJSON() ([]byte, error)
- func (t *FineTuningJob_Hyperparameters_NEpochs) MergeFineTuningJobHyperparametersNEpochs0(v FineTuningJobHyperparametersNEpochs0) error
- func (t *FineTuningJob_Hyperparameters_NEpochs) MergeFineTuningJobHyperparametersNEpochs1(v FineTuningJobHyperparametersNEpochs1) error
- func (t *FineTuningJob_Hyperparameters_NEpochs) UnmarshalJSON(b []byte) error
- type FunctionObject
- type FunctionParameters
- type Image
- type ImagesResponse
- type InvalidParamFormatError
- type ListAssistantFilesParams
- type ListAssistantFilesParamsOrder
- type ListAssistantFilesResponse
- type ListAssistantsParams
- type ListAssistantsParamsOrder
- type ListAssistantsResponse
- type ListFilesParams
- type ListFilesResponse
- type ListFilesResponseObject
- type ListFineTuningEventsParams
- type ListFineTuningJobEventsResponse
- type ListFineTuningJobEventsResponseObject
- type ListMessageFilesParams
- type ListMessageFilesParamsOrder
- type ListMessageFilesResponse
- type ListMessagesParams
- type ListMessagesParamsOrder
- type ListMessagesResponse
- type ListModelsResponse
- type ListModelsResponseObject
- type ListPaginatedFineTuningJobsParams
- type ListPaginatedFineTuningJobsResponse
- type ListPaginatedFineTuningJobsResponseObject
- type ListRunStepsParams
- type ListRunStepsParamsOrder
- type ListRunStepsResponse
- type ListRunsParams
- type ListRunsParamsOrder
- type ListRunsResponse
- type ListThreadsResponse
- type MessageContentImageFileObject
- type MessageContentImageFileObjectType
- type MessageContentTextAnnotationsFileCitationObject
- type MessageContentTextAnnotationsFileCitationObjectType
- type MessageContentTextAnnotationsFilePathObject
- type MessageContentTextAnnotationsFilePathObjectType
- type MessageContentTextObject
- type MessageContentTextObjectType
- type MessageContentTextObject_Text_Annotations_Item
- func (t MessageContentTextObject_Text_Annotations_Item) AsMessageContentTextAnnotationsFileCitationObject() (MessageContentTextAnnotationsFileCitationObject, error)
- func (t MessageContentTextObject_Text_Annotations_Item) AsMessageContentTextAnnotationsFilePathObject() (MessageContentTextAnnotationsFilePathObject, error)
- func (t *MessageContentTextObject_Text_Annotations_Item) FromMessageContentTextAnnotationsFileCitationObject(v MessageContentTextAnnotationsFileCitationObject) error
- func (t *MessageContentTextObject_Text_Annotations_Item) FromMessageContentTextAnnotationsFilePathObject(v MessageContentTextAnnotationsFilePathObject) error
- func (t MessageContentTextObject_Text_Annotations_Item) MarshalJSON() ([]byte, error)
- func (t *MessageContentTextObject_Text_Annotations_Item) MergeMessageContentTextAnnotationsFileCitationObject(v MessageContentTextAnnotationsFileCitationObject) error
- func (t *MessageContentTextObject_Text_Annotations_Item) MergeMessageContentTextAnnotationsFilePathObject(v MessageContentTextAnnotationsFilePathObject) error
- func (t *MessageContentTextObject_Text_Annotations_Item) UnmarshalJSON(b []byte) error
- type MessageDeltaContentImageFileObject
- type MessageDeltaContentImageFileObjectType
- type MessageDeltaContentTextAnnotationsFileCitationObject
- type MessageDeltaContentTextAnnotationsFileCitationObjectType
- type MessageDeltaContentTextAnnotationsFilePathObject
- type MessageDeltaContentTextAnnotationsFilePathObjectType
- type MessageDeltaContentTextObject
- type MessageDeltaContentTextObjectType
- type MessageDeltaContentTextObject_Text_Annotations_Item
- func (t MessageDeltaContentTextObject_Text_Annotations_Item) AsMessageDeltaContentTextAnnotationsFileCitationObject() (MessageDeltaContentTextAnnotationsFileCitationObject, error)
- func (t MessageDeltaContentTextObject_Text_Annotations_Item) AsMessageDeltaContentTextAnnotationsFilePathObject() (MessageDeltaContentTextAnnotationsFilePathObject, error)
- func (t *MessageDeltaContentTextObject_Text_Annotations_Item) FromMessageDeltaContentTextAnnotationsFileCitationObject(v MessageDeltaContentTextAnnotationsFileCitationObject) error
- func (t *MessageDeltaContentTextObject_Text_Annotations_Item) FromMessageDeltaContentTextAnnotationsFilePathObject(v MessageDeltaContentTextAnnotationsFilePathObject) error
- func (t MessageDeltaContentTextObject_Text_Annotations_Item) MarshalJSON() ([]byte, error)
- func (t *MessageDeltaContentTextObject_Text_Annotations_Item) MergeMessageDeltaContentTextAnnotationsFileCitationObject(v MessageDeltaContentTextAnnotationsFileCitationObject) error
- func (t *MessageDeltaContentTextObject_Text_Annotations_Item) MergeMessageDeltaContentTextAnnotationsFilePathObject(v MessageDeltaContentTextAnnotationsFilePathObject) error
- func (t *MessageDeltaContentTextObject_Text_Annotations_Item) UnmarshalJSON(b []byte) error
- type MessageDeltaObject
- type MessageDeltaObjectDeltaRole
- type MessageDeltaObjectObject
- type MessageDeltaObject_Delta_Content_Item
- func (t MessageDeltaObject_Delta_Content_Item) AsMessageDeltaContentImageFileObject() (MessageDeltaContentImageFileObject, error)
- func (t MessageDeltaObject_Delta_Content_Item) AsMessageDeltaContentTextObject() (MessageDeltaContentTextObject, error)
- func (t *MessageDeltaObject_Delta_Content_Item) FromMessageDeltaContentImageFileObject(v MessageDeltaContentImageFileObject) error
- func (t *MessageDeltaObject_Delta_Content_Item) FromMessageDeltaContentTextObject(v MessageDeltaContentTextObject) error
- func (t MessageDeltaObject_Delta_Content_Item) MarshalJSON() ([]byte, error)
- func (t *MessageDeltaObject_Delta_Content_Item) MergeMessageDeltaContentImageFileObject(v MessageDeltaContentImageFileObject) error
- func (t *MessageDeltaObject_Delta_Content_Item) MergeMessageDeltaContentTextObject(v MessageDeltaContentTextObject) error
- func (t *MessageDeltaObject_Delta_Content_Item) UnmarshalJSON(b []byte) error
- type MessageFileObject
- type MessageFileObjectObject
- type MessageObject
- type MessageObjectIncompleteDetailsReason
- type MessageObjectObject
- type MessageObjectRole
- type MessageObjectStatus
- type MessageObject_Content_Item
- func (t MessageObject_Content_Item) AsMessageContentImageFileObject() (MessageContentImageFileObject, error)
- func (t MessageObject_Content_Item) AsMessageContentTextObject() (MessageContentTextObject, error)
- func (t *MessageObject_Content_Item) FromMessageContentImageFileObject(v MessageContentImageFileObject) error
- func (t *MessageObject_Content_Item) FromMessageContentTextObject(v MessageContentTextObject) error
- func (t MessageObject_Content_Item) MarshalJSON() ([]byte, error)
- func (t *MessageObject_Content_Item) MergeMessageContentImageFileObject(v MessageContentImageFileObject) error
- func (t *MessageObject_Content_Item) MergeMessageContentTextObject(v MessageContentTextObject) error
- func (t *MessageObject_Content_Item) UnmarshalJSON(b []byte) error
- type MessageStreamEvent
- func (t MessageStreamEvent) AsMessageStreamEvent0() (MessageStreamEvent0, error)
- func (t MessageStreamEvent) AsMessageStreamEvent1() (MessageStreamEvent1, error)
- func (t MessageStreamEvent) AsMessageStreamEvent2() (MessageStreamEvent2, error)
- func (t MessageStreamEvent) AsMessageStreamEvent3() (MessageStreamEvent3, error)
- func (t MessageStreamEvent) AsMessageStreamEvent4() (MessageStreamEvent4, error)
- func (t *MessageStreamEvent) FromMessageStreamEvent0(v MessageStreamEvent0) error
- func (t *MessageStreamEvent) FromMessageStreamEvent1(v MessageStreamEvent1) error
- func (t *MessageStreamEvent) FromMessageStreamEvent2(v MessageStreamEvent2) error
- func (t *MessageStreamEvent) FromMessageStreamEvent3(v MessageStreamEvent3) error
- func (t *MessageStreamEvent) FromMessageStreamEvent4(v MessageStreamEvent4) error
- func (t MessageStreamEvent) MarshalJSON() ([]byte, error)
- func (t *MessageStreamEvent) MergeMessageStreamEvent0(v MessageStreamEvent0) error
- func (t *MessageStreamEvent) MergeMessageStreamEvent1(v MessageStreamEvent1) error
- func (t *MessageStreamEvent) MergeMessageStreamEvent2(v MessageStreamEvent2) error
- func (t *MessageStreamEvent) MergeMessageStreamEvent3(v MessageStreamEvent3) error
- func (t *MessageStreamEvent) MergeMessageStreamEvent4(v MessageStreamEvent4) error
- func (t *MessageStreamEvent) UnmarshalJSON(b []byte) error
- type MessageStreamEvent0
- type MessageStreamEvent0Event
- type MessageStreamEvent1
- type MessageStreamEvent1Event
- type MessageStreamEvent2
- type MessageStreamEvent2Event
- type MessageStreamEvent3
- type MessageStreamEvent3Event
- type MessageStreamEvent4
- type MessageStreamEvent4Event
- type MiddlewareFunc
- type Model
- type ModelObject
- type ModifyAssistantJSONRequestBody
- type ModifyAssistantRequest
- type ModifyAssistantRequestModel0
- type ModifyAssistantRequest_Model
- func (t ModifyAssistantRequest_Model) AsModifyAssistantRequestModel0() (ModifyAssistantRequestModel0, error)
- func (t *ModifyAssistantRequest_Model) FromModifyAssistantRequestModel0(v ModifyAssistantRequestModel0) error
- func (t ModifyAssistantRequest_Model) MarshalJSON() ([]byte, error)
- func (t *ModifyAssistantRequest_Model) MergeModifyAssistantRequestModel0(v ModifyAssistantRequestModel0) error
- func (t *ModifyAssistantRequest_Model) UnmarshalJSON(b []byte) error
- type ModifyAssistantRequest_Tools_Item
- func (t ModifyAssistantRequest_Tools_Item) AsAssistantToolsCode() (AssistantToolsCode, error)
- func (t ModifyAssistantRequest_Tools_Item) AsAssistantToolsFunction() (AssistantToolsFunction, error)
- func (t ModifyAssistantRequest_Tools_Item) AsAssistantToolsRetrieval() (AssistantToolsRetrieval, error)
- func (t ModifyAssistantRequest_Tools_Item) AsXAssistantToolsGPTScript() (XAssistantToolsGPTScript, error)
- func (t *ModifyAssistantRequest_Tools_Item) FromAssistantToolsCode(v AssistantToolsCode) error
- func (t *ModifyAssistantRequest_Tools_Item) FromAssistantToolsFunction(v AssistantToolsFunction) error
- func (t *ModifyAssistantRequest_Tools_Item) FromAssistantToolsRetrieval(v AssistantToolsRetrieval) error
- func (t *ModifyAssistantRequest_Tools_Item) FromXAssistantToolsGPTScript(v XAssistantToolsGPTScript) error
- func (t ModifyAssistantRequest_Tools_Item) MarshalJSON() ([]byte, error)
- func (t *ModifyAssistantRequest_Tools_Item) MergeAssistantToolsCode(v AssistantToolsCode) error
- func (t *ModifyAssistantRequest_Tools_Item) MergeAssistantToolsFunction(v AssistantToolsFunction) error
- func (t *ModifyAssistantRequest_Tools_Item) MergeAssistantToolsRetrieval(v AssistantToolsRetrieval) error
- func (t *ModifyAssistantRequest_Tools_Item) MergeXAssistantToolsGPTScript(v XAssistantToolsGPTScript) error
- func (t *ModifyAssistantRequest_Tools_Item) UnmarshalJSON(b []byte) error
- type ModifyMessageJSONRequestBody
- type ModifyMessageRequest
- type ModifyRunJSONRequestBody
- type ModifyRunRequest
- type ModifyThreadJSONRequestBody
- type ModifyThreadRequest
- type OpenAIFile
- type OpenAIFileObject
- type OpenAIFilePurpose
- type OpenAIFileStatus
- type RequiredHeaderError
- type RequiredParamError
- type RunCompletionUsage
- type RunObject
- type RunObjectLastErrorCode
- type RunObjectObject
- type RunObjectRequiredActionType
- type RunObjectStatus
- type RunObject_Tools_Item
- func (t RunObject_Tools_Item) AsAssistantToolsCode() (AssistantToolsCode, error)
- func (t RunObject_Tools_Item) AsAssistantToolsFunction() (AssistantToolsFunction, error)
- func (t RunObject_Tools_Item) AsAssistantToolsRetrieval() (AssistantToolsRetrieval, error)
- func (t *RunObject_Tools_Item) FromAssistantToolsCode(v AssistantToolsCode) error
- func (t *RunObject_Tools_Item) FromAssistantToolsFunction(v AssistantToolsFunction) error
- func (t *RunObject_Tools_Item) FromAssistantToolsRetrieval(v AssistantToolsRetrieval) error
- func (t RunObject_Tools_Item) MarshalJSON() ([]byte, error)
- func (t *RunObject_Tools_Item) MergeAssistantToolsCode(v AssistantToolsCode) error
- func (t *RunObject_Tools_Item) MergeAssistantToolsFunction(v AssistantToolsFunction) error
- func (t *RunObject_Tools_Item) MergeAssistantToolsRetrieval(v AssistantToolsRetrieval) error
- func (t *RunObject_Tools_Item) UnmarshalJSON(b []byte) error
- type RunStepCompletionUsage
- type RunStepDeltaObject
- type RunStepDeltaObjectObject
- type RunStepDeltaObject_Delta_StepDetails
- func (t RunStepDeltaObject_Delta_StepDetails) AsRunStepDeltaStepDetailsMessageCreationObject() (RunStepDeltaStepDetailsMessageCreationObject, error)
- func (t RunStepDeltaObject_Delta_StepDetails) AsRunStepDeltaStepDetailsToolCallsObject() (RunStepDeltaStepDetailsToolCallsObject, error)
- func (t *RunStepDeltaObject_Delta_StepDetails) FromRunStepDeltaStepDetailsMessageCreationObject(v RunStepDeltaStepDetailsMessageCreationObject) error
- func (t *RunStepDeltaObject_Delta_StepDetails) FromRunStepDeltaStepDetailsToolCallsObject(v RunStepDeltaStepDetailsToolCallsObject) error
- func (t RunStepDeltaObject_Delta_StepDetails) MarshalJSON() ([]byte, error)
- func (t *RunStepDeltaObject_Delta_StepDetails) MergeRunStepDeltaStepDetailsMessageCreationObject(v RunStepDeltaStepDetailsMessageCreationObject) error
- func (t *RunStepDeltaObject_Delta_StepDetails) MergeRunStepDeltaStepDetailsToolCallsObject(v RunStepDeltaStepDetailsToolCallsObject) error
- func (t *RunStepDeltaObject_Delta_StepDetails) UnmarshalJSON(b []byte) error
- type RunStepDeltaStepDetailsMessageCreationObject
- type RunStepDeltaStepDetailsMessageCreationObjectType
- type RunStepDeltaStepDetailsToolCallsCodeObject
- type RunStepDeltaStepDetailsToolCallsCodeObjectType
- type RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item
- func (t RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) AsRunStepDeltaStepDetailsToolCallsCodeOutputImageObject() (RunStepDeltaStepDetailsToolCallsCodeOutputImageObject, error)
- func (t RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) AsRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject() (RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject, error)
- func (t *RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) FromRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(v RunStepDeltaStepDetailsToolCallsCodeOutputImageObject) error
- func (t *RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) FromRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(v RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject) error
- func (t RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MarshalJSON() ([]byte, error)
- func (t *RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MergeRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(v RunStepDeltaStepDetailsToolCallsCodeOutputImageObject) error
- func (t *RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MergeRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(v RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject) error
- func (t *RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) UnmarshalJSON(b []byte) error
- type RunStepDeltaStepDetailsToolCallsCodeOutputImageObject
- type RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType
- type RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject
- type RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType
- type RunStepDeltaStepDetailsToolCallsFunctionObject
- type RunStepDeltaStepDetailsToolCallsFunctionObjectType
- type RunStepDeltaStepDetailsToolCallsObject
- type RunStepDeltaStepDetailsToolCallsObjectType
- type RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item
- func (t RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDeltaStepDetailsToolCallsCodeObject() (RunStepDeltaStepDetailsToolCallsCodeObject, error)
- func (t RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDeltaStepDetailsToolCallsFunctionObject() (RunStepDeltaStepDetailsToolCallsFunctionObject, error)
- func (t RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDeltaStepDetailsToolCallsRetrievalObject() (RunStepDeltaStepDetailsToolCallsRetrievalObject, error)
- func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDeltaStepDetailsToolCallsCodeObject(v RunStepDeltaStepDetailsToolCallsCodeObject) error
- func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDeltaStepDetailsToolCallsFunctionObject(v RunStepDeltaStepDetailsToolCallsFunctionObject) error
- func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDeltaStepDetailsToolCallsRetrievalObject(v RunStepDeltaStepDetailsToolCallsRetrievalObject) error
- func (t RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) MarshalJSON() ([]byte, error)
- func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDeltaStepDetailsToolCallsCodeObject(v RunStepDeltaStepDetailsToolCallsCodeObject) error
- func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDeltaStepDetailsToolCallsFunctionObject(v RunStepDeltaStepDetailsToolCallsFunctionObject) error
- func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDeltaStepDetailsToolCallsRetrievalObject(v RunStepDeltaStepDetailsToolCallsRetrievalObject) error
- func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) UnmarshalJSON(b []byte) error
- type RunStepDeltaStepDetailsToolCallsRetrievalObject
- type RunStepDeltaStepDetailsToolCallsRetrievalObjectType
- type RunStepDetailsMessageCreationObject
- type RunStepDetailsMessageCreationObjectType
- type RunStepDetailsToolCallsCodeObject
- type RunStepDetailsToolCallsCodeObjectType
- type RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item
- func (t RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) AsRunStepDetailsToolCallsCodeOutputImageObject() (RunStepDetailsToolCallsCodeOutputImageObject, error)
- func (t RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) AsRunStepDetailsToolCallsCodeOutputLogsObject() (RunStepDetailsToolCallsCodeOutputLogsObject, error)
- func (t *RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) FromRunStepDetailsToolCallsCodeOutputImageObject(v RunStepDetailsToolCallsCodeOutputImageObject) error
- func (t *RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) FromRunStepDetailsToolCallsCodeOutputLogsObject(v RunStepDetailsToolCallsCodeOutputLogsObject) error
- func (t RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MarshalJSON() ([]byte, error)
- func (t *RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MergeRunStepDetailsToolCallsCodeOutputImageObject(v RunStepDetailsToolCallsCodeOutputImageObject) error
- func (t *RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MergeRunStepDetailsToolCallsCodeOutputLogsObject(v RunStepDetailsToolCallsCodeOutputLogsObject) error
- func (t *RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) UnmarshalJSON(b []byte) error
- type RunStepDetailsToolCallsCodeOutputImageObject
- type RunStepDetailsToolCallsCodeOutputImageObjectType
- type RunStepDetailsToolCallsCodeOutputLogsObject
- type RunStepDetailsToolCallsCodeOutputLogsObjectType
- type RunStepDetailsToolCallsFunctionObject
- type RunStepDetailsToolCallsFunctionObjectType
- type RunStepDetailsToolCallsObject
- type RunStepDetailsToolCallsObjectType
- type RunStepDetailsToolCallsObject_ToolCalls_Item
- func (t RunStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDetailsToolCallsCodeObject() (RunStepDetailsToolCallsCodeObject, error)
- func (t RunStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDetailsToolCallsFunctionObject() (RunStepDetailsToolCallsFunctionObject, error)
- func (t RunStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDetailsToolCallsRetrievalObject() (RunStepDetailsToolCallsRetrievalObject, error)
- func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDetailsToolCallsCodeObject(v RunStepDetailsToolCallsCodeObject) error
- func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDetailsToolCallsFunctionObject(v RunStepDetailsToolCallsFunctionObject) error
- func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDetailsToolCallsRetrievalObject(v RunStepDetailsToolCallsRetrievalObject) error
- func (t RunStepDetailsToolCallsObject_ToolCalls_Item) MarshalJSON() ([]byte, error)
- func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDetailsToolCallsCodeObject(v RunStepDetailsToolCallsCodeObject) error
- func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDetailsToolCallsFunctionObject(v RunStepDetailsToolCallsFunctionObject) error
- func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDetailsToolCallsRetrievalObject(v RunStepDetailsToolCallsRetrievalObject) error
- func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) UnmarshalJSON(b []byte) error
- type RunStepDetailsToolCallsRetrievalObject
- type RunStepDetailsToolCallsRetrievalObjectType
- type RunStepObject
- type RunStepObjectLastErrorCode
- type RunStepObjectObject
- type RunStepObjectStatus
- type RunStepObjectType
- type RunStepObject_StepDetails
- func (t RunStepObject_StepDetails) AsRunStepDetailsMessageCreationObject() (RunStepDetailsMessageCreationObject, error)
- func (t RunStepObject_StepDetails) AsRunStepDetailsToolCallsObject() (RunStepDetailsToolCallsObject, error)
- func (t *RunStepObject_StepDetails) FromRunStepDetailsMessageCreationObject(v RunStepDetailsMessageCreationObject) error
- func (t *RunStepObject_StepDetails) FromRunStepDetailsToolCallsObject(v RunStepDetailsToolCallsObject) error
- func (t RunStepObject_StepDetails) MarshalJSON() ([]byte, error)
- func (t *RunStepObject_StepDetails) MergeRunStepDetailsMessageCreationObject(v RunStepDetailsMessageCreationObject) error
- func (t *RunStepObject_StepDetails) MergeRunStepDetailsToolCallsObject(v RunStepDetailsToolCallsObject) error
- func (t *RunStepObject_StepDetails) UnmarshalJSON(b []byte) error
- type RunStepStreamEvent
- func (t RunStepStreamEvent) AsRunStepStreamEvent0() (RunStepStreamEvent0, error)
- func (t RunStepStreamEvent) AsRunStepStreamEvent1() (RunStepStreamEvent1, error)
- func (t RunStepStreamEvent) AsRunStepStreamEvent2() (RunStepStreamEvent2, error)
- func (t RunStepStreamEvent) AsRunStepStreamEvent3() (RunStepStreamEvent3, error)
- func (t RunStepStreamEvent) AsRunStepStreamEvent4() (RunStepStreamEvent4, error)
- func (t RunStepStreamEvent) AsRunStepStreamEvent5() (RunStepStreamEvent5, error)
- func (t RunStepStreamEvent) AsRunStepStreamEvent6() (RunStepStreamEvent6, error)
- func (t *RunStepStreamEvent) FromRunStepStreamEvent0(v RunStepStreamEvent0) error
- func (t *RunStepStreamEvent) FromRunStepStreamEvent1(v RunStepStreamEvent1) error
- func (t *RunStepStreamEvent) FromRunStepStreamEvent2(v RunStepStreamEvent2) error
- func (t *RunStepStreamEvent) FromRunStepStreamEvent3(v RunStepStreamEvent3) error
- func (t *RunStepStreamEvent) FromRunStepStreamEvent4(v RunStepStreamEvent4) error
- func (t *RunStepStreamEvent) FromRunStepStreamEvent5(v RunStepStreamEvent5) error
- func (t *RunStepStreamEvent) FromRunStepStreamEvent6(v RunStepStreamEvent6) error
- func (t RunStepStreamEvent) MarshalJSON() ([]byte, error)
- func (t *RunStepStreamEvent) MergeRunStepStreamEvent0(v RunStepStreamEvent0) error
- func (t *RunStepStreamEvent) MergeRunStepStreamEvent1(v RunStepStreamEvent1) error
- func (t *RunStepStreamEvent) MergeRunStepStreamEvent2(v RunStepStreamEvent2) error
- func (t *RunStepStreamEvent) MergeRunStepStreamEvent3(v RunStepStreamEvent3) error
- func (t *RunStepStreamEvent) MergeRunStepStreamEvent4(v RunStepStreamEvent4) error
- func (t *RunStepStreamEvent) MergeRunStepStreamEvent5(v RunStepStreamEvent5) error
- func (t *RunStepStreamEvent) MergeRunStepStreamEvent6(v RunStepStreamEvent6) error
- func (t *RunStepStreamEvent) UnmarshalJSON(b []byte) error
- type RunStepStreamEvent0
- type RunStepStreamEvent0Event
- type RunStepStreamEvent1
- type RunStepStreamEvent1Event
- type RunStepStreamEvent2
- type RunStepStreamEvent2Event
- type RunStepStreamEvent3
- type RunStepStreamEvent3Event
- type RunStepStreamEvent4
- type RunStepStreamEvent4Event
- type RunStepStreamEvent5
- type RunStepStreamEvent5Event
- type RunStepStreamEvent6
- type RunStepStreamEvent6Event
- type RunStreamEvent
- func (t RunStreamEvent) AsRunStreamEvent0() (RunStreamEvent0, error)
- func (t RunStreamEvent) AsRunStreamEvent1() (RunStreamEvent1, error)
- func (t RunStreamEvent) AsRunStreamEvent2() (RunStreamEvent2, error)
- func (t RunStreamEvent) AsRunStreamEvent3() (RunStreamEvent3, error)
- func (t RunStreamEvent) AsRunStreamEvent4() (RunStreamEvent4, error)
- func (t RunStreamEvent) AsRunStreamEvent5() (RunStreamEvent5, error)
- func (t RunStreamEvent) AsRunStreamEvent6() (RunStreamEvent6, error)
- func (t RunStreamEvent) AsRunStreamEvent7() (RunStreamEvent7, error)
- func (t RunStreamEvent) AsRunStreamEvent8() (RunStreamEvent8, error)
- func (t *RunStreamEvent) FromRunStreamEvent0(v RunStreamEvent0) error
- func (t *RunStreamEvent) FromRunStreamEvent1(v RunStreamEvent1) error
- func (t *RunStreamEvent) FromRunStreamEvent2(v RunStreamEvent2) error
- func (t *RunStreamEvent) FromRunStreamEvent3(v RunStreamEvent3) error
- func (t *RunStreamEvent) FromRunStreamEvent4(v RunStreamEvent4) error
- func (t *RunStreamEvent) FromRunStreamEvent5(v RunStreamEvent5) error
- func (t *RunStreamEvent) FromRunStreamEvent6(v RunStreamEvent6) error
- func (t *RunStreamEvent) FromRunStreamEvent7(v RunStreamEvent7) error
- func (t *RunStreamEvent) FromRunStreamEvent8(v RunStreamEvent8) error
- func (t RunStreamEvent) MarshalJSON() ([]byte, error)
- func (t *RunStreamEvent) MergeRunStreamEvent0(v RunStreamEvent0) error
- func (t *RunStreamEvent) MergeRunStreamEvent1(v RunStreamEvent1) error
- func (t *RunStreamEvent) MergeRunStreamEvent2(v RunStreamEvent2) error
- func (t *RunStreamEvent) MergeRunStreamEvent3(v RunStreamEvent3) error
- func (t *RunStreamEvent) MergeRunStreamEvent4(v RunStreamEvent4) error
- func (t *RunStreamEvent) MergeRunStreamEvent5(v RunStreamEvent5) error
- func (t *RunStreamEvent) MergeRunStreamEvent6(v RunStreamEvent6) error
- func (t *RunStreamEvent) MergeRunStreamEvent7(v RunStreamEvent7) error
- func (t *RunStreamEvent) MergeRunStreamEvent8(v RunStreamEvent8) error
- func (t *RunStreamEvent) UnmarshalJSON(b []byte) error
- type RunStreamEvent0
- type RunStreamEvent0Event
- type RunStreamEvent1
- type RunStreamEvent1Event
- type RunStreamEvent2
- type RunStreamEvent2Event
- type RunStreamEvent3
- type RunStreamEvent3Event
- type RunStreamEvent4
- type RunStreamEvent4Event
- type RunStreamEvent5
- type RunStreamEvent5Event
- type RunStreamEvent6
- type RunStreamEvent6Event
- type RunStreamEvent7
- type RunStreamEvent7Event
- type RunStreamEvent8
- type RunStreamEvent8Event
- type RunToolCallObject
- type RunToolCallObjectType
- type ServerInterface
- type ServerInterfaceWrapper
- func (siw *ServerInterfaceWrapper) CancelFineTuningJob(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CancelRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateAssistant(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateAssistantFile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateChatCompletion(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateCompletion(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateEmbedding(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateFile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateFineTuningJob(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateImage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateImageEdit(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateImageVariation(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateMessage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateModeration(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateSpeech(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateThread(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateThreadAndRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateTranscription(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) CreateTranslation(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteAssistant(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteAssistantFile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteFile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteModel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DeleteThread(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) DownloadFile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAssistant(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetAssistantFile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetMessage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetMessageFile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetRunStep(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) GetThread(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListAssistantFiles(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListAssistants(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListFiles(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListFineTuningEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListMessageFiles(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListMessages(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListModels(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListPaginatedFineTuningJobs(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListRunSteps(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ListRuns(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ModifyAssistant(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ModifyMessage(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ModifyRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) ModifyThread(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RetrieveFile(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RetrieveFineTuningJob(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) RetrieveModel(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) SubmitToolOuputsToRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) XConfirmRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) XConfirmToolRun(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) XCreateTool(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) XDeleteTool(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) XGetTool(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) XInspectTool(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) XListRunStepEvents(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) XListThreads(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) XListTools(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) XModifyTool(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) XRunTool(w http.ResponseWriter, r *http.Request)
- func (siw *ServerInterfaceWrapper) XStreamRun(w http.ResponseWriter, r *http.Request)
- type StdHTTPServerOptions
- type SubmitToolOuputsToRunJSONRequestBody
- type SubmitToolOutputsRunRequest
- type ThreadObject
- type ThreadObjectObject
- type ThreadStreamEvent
- func (t ThreadStreamEvent) AsThreadStreamEvent0() (ThreadStreamEvent0, error)
- func (t *ThreadStreamEvent) FromThreadStreamEvent0(v ThreadStreamEvent0) error
- func (t ThreadStreamEvent) MarshalJSON() ([]byte, error)
- func (t *ThreadStreamEvent) MergeThreadStreamEvent0(v ThreadStreamEvent0) error
- func (t *ThreadStreamEvent) UnmarshalJSON(b []byte) error
- type ThreadStreamEvent0
- type ThreadStreamEvent0Event
- type TooManyValuesForParamError
- type TranscriptionSegment
- type TranscriptionWord
- type UnescapedCookieParamError
- type UnmarshalingParamError
- type XAssistantToolsGPTScript
- type XAssistantToolsGPTScriptType
- type XConfirmRunJSONRequestBody
- type XConfirmRunToolRequest
- type XConfirmToolRunJSONRequestBody
- type XConfirmToolRunRequest
- type XCreateToolJSONRequestBody
- type XCreateToolRequest
- type XDeleteToolResponse
- type XDeleteToolResponseObject
- type XInspectToolJSONRequestBody
- type XInspectToolRequest
- type XInspectToolResponse
- type XListRunStepEventsParams
- type XListRunStepEventsResponse
- type XListThreadsParams
- type XListThreadsParamsOrder
- type XListThreadsResponse
- type XListToolsParams
- type XListToolsParamsOrder
- type XListToolsResponse
- type XModifyToolJSONRequestBody
- type XModifyToolRequest
- type XRunStepEventObject
- type XRunToolJSONRequestBody
- type XRunToolRequest
- type XStreamRunParams
- type XToolObject
- type XToolObjectObject
- type XToolSetTool
Constants ¶
const (
ApiKeyAuthScopes = "ApiKeyAuth.Scopes"
)
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
func HandlerFromMux ¶
func HandlerFromMux(si ServerInterface, m *http.ServeMux) http.Handler
HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.
func HandlerWithOptions ¶
func HandlerWithOptions(si ServerInterface, options StdHTTPServerOptions) http.Handler
HandlerWithOptions creates http.Handler with additional options
Types ¶
type AssistantFileObject ¶
type AssistantFileObject struct { // AssistantId The assistant ID that the file is attached to. AssistantId string `json:"assistant_id"` // CreatedAt The Unix timestamp (in seconds) for when the assistant file was created. CreatedAt int `json:"created_at"` // Id The identifier, which can be referenced in API endpoints. Id string `json:"id"` // Object The object type, which is always `assistant.file`. Object AssistantFileObjectObject `json:"object"` }
AssistantFileObject A list of [Files](/docs/api-reference/files) attached to an `assistant`.
type AssistantFileObjectObject ¶
type AssistantFileObjectObject string
AssistantFileObjectObject The object type, which is always `assistant.file`.
const (
AssistantFile AssistantFileObjectObject = "assistant.file"
)
Defines values for AssistantFileObjectObject.
type AssistantObject ¶
type AssistantObject struct { // CreatedAt The Unix timestamp (in seconds) for when the assistant was created. CreatedAt int `json:"created_at"` // Description The description of the assistant. The maximum length is 512 characters. Description *string `json:"description"` // FileIds 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"` // Id The identifier, which can be referenced in API endpoints. Id string `json:"id"` // Instructions The system instructions that the assistant uses. The maximum length is 32768 characters. Instructions *string `json:"instructions"` // 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. Metadata *map[string]interface{} `json:"metadata"` // Model 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"` // Name The name of the assistant. The maximum length is 256 characters. Name *string `json:"name"` // Object The object type, which is always `assistant`. Object AssistantObjectObject `json:"object"` // Tools 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`, `function`, or `gptscript`. Tools []AssistantObject_Tools_Item `json:"tools"` }
AssistantObject Represents an `assistant` that can call the model and use tools.
type AssistantObjectObject ¶
type AssistantObjectObject string
AssistantObjectObject The object type, which is always `assistant`.
const (
AssistantObjectObjectAssistant AssistantObjectObject = "assistant"
)
Defines values for AssistantObjectObject.
type AssistantObject_Tools_Item ¶
type AssistantObject_Tools_Item struct {
// contains filtered or unexported fields
}
AssistantObject_Tools_Item defines model for AssistantObject.tools.Item.
func (AssistantObject_Tools_Item) AsAssistantToolsCode ¶
func (t AssistantObject_Tools_Item) AsAssistantToolsCode() (AssistantToolsCode, error)
AsAssistantToolsCode returns the union data inside the AssistantObject_Tools_Item as a AssistantToolsCode
func (AssistantObject_Tools_Item) AsAssistantToolsFunction ¶
func (t AssistantObject_Tools_Item) AsAssistantToolsFunction() (AssistantToolsFunction, error)
AsAssistantToolsFunction returns the union data inside the AssistantObject_Tools_Item as a AssistantToolsFunction
func (AssistantObject_Tools_Item) AsAssistantToolsRetrieval ¶
func (t AssistantObject_Tools_Item) AsAssistantToolsRetrieval() (AssistantToolsRetrieval, error)
AsAssistantToolsRetrieval returns the union data inside the AssistantObject_Tools_Item as a AssistantToolsRetrieval
func (AssistantObject_Tools_Item) AsXAssistantToolsGPTScript ¶
func (t AssistantObject_Tools_Item) AsXAssistantToolsGPTScript() (XAssistantToolsGPTScript, error)
AsXAssistantToolsGPTScript returns the union data inside the AssistantObject_Tools_Item as a XAssistantToolsGPTScript
func (*AssistantObject_Tools_Item) FromAssistantToolsCode ¶
func (t *AssistantObject_Tools_Item) FromAssistantToolsCode(v AssistantToolsCode) error
FromAssistantToolsCode overwrites any union data inside the AssistantObject_Tools_Item as the provided AssistantToolsCode
func (*AssistantObject_Tools_Item) FromAssistantToolsFunction ¶
func (t *AssistantObject_Tools_Item) FromAssistantToolsFunction(v AssistantToolsFunction) error
FromAssistantToolsFunction overwrites any union data inside the AssistantObject_Tools_Item as the provided AssistantToolsFunction
func (*AssistantObject_Tools_Item) FromAssistantToolsRetrieval ¶
func (t *AssistantObject_Tools_Item) FromAssistantToolsRetrieval(v AssistantToolsRetrieval) error
FromAssistantToolsRetrieval overwrites any union data inside the AssistantObject_Tools_Item as the provided AssistantToolsRetrieval
func (*AssistantObject_Tools_Item) FromXAssistantToolsGPTScript ¶
func (t *AssistantObject_Tools_Item) FromXAssistantToolsGPTScript(v XAssistantToolsGPTScript) error
FromXAssistantToolsGPTScript overwrites any union data inside the AssistantObject_Tools_Item as the provided XAssistantToolsGPTScript
func (AssistantObject_Tools_Item) MarshalJSON ¶
func (t AssistantObject_Tools_Item) MarshalJSON() ([]byte, error)
func (*AssistantObject_Tools_Item) MergeAssistantToolsCode ¶
func (t *AssistantObject_Tools_Item) MergeAssistantToolsCode(v AssistantToolsCode) error
MergeAssistantToolsCode performs a merge with any union data inside the AssistantObject_Tools_Item, using the provided AssistantToolsCode
func (*AssistantObject_Tools_Item) MergeAssistantToolsFunction ¶
func (t *AssistantObject_Tools_Item) MergeAssistantToolsFunction(v AssistantToolsFunction) error
MergeAssistantToolsFunction performs a merge with any union data inside the AssistantObject_Tools_Item, using the provided AssistantToolsFunction
func (*AssistantObject_Tools_Item) MergeAssistantToolsRetrieval ¶
func (t *AssistantObject_Tools_Item) MergeAssistantToolsRetrieval(v AssistantToolsRetrieval) error
MergeAssistantToolsRetrieval performs a merge with any union data inside the AssistantObject_Tools_Item, using the provided AssistantToolsRetrieval
func (*AssistantObject_Tools_Item) MergeXAssistantToolsGPTScript ¶
func (t *AssistantObject_Tools_Item) MergeXAssistantToolsGPTScript(v XAssistantToolsGPTScript) error
MergeXAssistantToolsGPTScript performs a merge with any union data inside the AssistantObject_Tools_Item, using the provided XAssistantToolsGPTScript
func (*AssistantObject_Tools_Item) UnmarshalJSON ¶
func (t *AssistantObject_Tools_Item) UnmarshalJSON(b []byte) error
type AssistantStreamEvent ¶
type AssistantStreamEvent struct {
// contains filtered or unexported fields
}
AssistantStreamEvent Represents an event emitted when streaming a Run.
Each event in a server-sent events stream has an `event` and `data` property:
``` event: thread.created data: {"id": "thread_123", "object": "thread", ...} ```
We emit events whenever a new object is created, transitions to a new state, or is being streamed in parts (deltas). For example, we emit `thread.run.created` when a new run is created, `thread.run.completed` when a run completes, and so on. When an Assistant chooses to create a message during a run, we emit a `thread.message.created event`, a `thread.message.in_progress` event, many `thread.message.delta` events, and finally a `thread.message.completed` event.
We may add additional events over time, so we recommend handling unknown events gracefully in your code. See the [Assistants API quickstart](/docs/assistants/overview) to learn how to integrate the Assistants API with streaming.
func (AssistantStreamEvent) AsDoneEvent ¶
func (t AssistantStreamEvent) AsDoneEvent() (DoneEvent, error)
AsDoneEvent returns the union data inside the AssistantStreamEvent as a DoneEvent
func (AssistantStreamEvent) AsErrorEvent ¶
func (t AssistantStreamEvent) AsErrorEvent() (ErrorEvent, error)
AsErrorEvent returns the union data inside the AssistantStreamEvent as a ErrorEvent
func (AssistantStreamEvent) AsMessageStreamEvent ¶
func (t AssistantStreamEvent) AsMessageStreamEvent() (MessageStreamEvent, error)
AsMessageStreamEvent returns the union data inside the AssistantStreamEvent as a MessageStreamEvent
func (AssistantStreamEvent) AsRunStepStreamEvent ¶
func (t AssistantStreamEvent) AsRunStepStreamEvent() (RunStepStreamEvent, error)
AsRunStepStreamEvent returns the union data inside the AssistantStreamEvent as a RunStepStreamEvent
func (AssistantStreamEvent) AsRunStreamEvent ¶
func (t AssistantStreamEvent) AsRunStreamEvent() (RunStreamEvent, error)
AsRunStreamEvent returns the union data inside the AssistantStreamEvent as a RunStreamEvent
func (AssistantStreamEvent) AsThreadStreamEvent ¶
func (t AssistantStreamEvent) AsThreadStreamEvent() (ThreadStreamEvent, error)
AsThreadStreamEvent returns the union data inside the AssistantStreamEvent as a ThreadStreamEvent
func (*AssistantStreamEvent) FromDoneEvent ¶
func (t *AssistantStreamEvent) FromDoneEvent(v DoneEvent) error
FromDoneEvent overwrites any union data inside the AssistantStreamEvent as the provided DoneEvent
func (*AssistantStreamEvent) FromErrorEvent ¶
func (t *AssistantStreamEvent) FromErrorEvent(v ErrorEvent) error
FromErrorEvent overwrites any union data inside the AssistantStreamEvent as the provided ErrorEvent
func (*AssistantStreamEvent) FromMessageStreamEvent ¶
func (t *AssistantStreamEvent) FromMessageStreamEvent(v MessageStreamEvent) error
FromMessageStreamEvent overwrites any union data inside the AssistantStreamEvent as the provided MessageStreamEvent
func (*AssistantStreamEvent) FromRunStepStreamEvent ¶
func (t *AssistantStreamEvent) FromRunStepStreamEvent(v RunStepStreamEvent) error
FromRunStepStreamEvent overwrites any union data inside the AssistantStreamEvent as the provided RunStepStreamEvent
func (*AssistantStreamEvent) FromRunStreamEvent ¶
func (t *AssistantStreamEvent) FromRunStreamEvent(v RunStreamEvent) error
FromRunStreamEvent overwrites any union data inside the AssistantStreamEvent as the provided RunStreamEvent
func (*AssistantStreamEvent) FromThreadStreamEvent ¶
func (t *AssistantStreamEvent) FromThreadStreamEvent(v ThreadStreamEvent) error
FromThreadStreamEvent overwrites any union data inside the AssistantStreamEvent as the provided ThreadStreamEvent
func (AssistantStreamEvent) MarshalJSON ¶
func (t AssistantStreamEvent) MarshalJSON() ([]byte, error)
func (*AssistantStreamEvent) MergeDoneEvent ¶
func (t *AssistantStreamEvent) MergeDoneEvent(v DoneEvent) error
MergeDoneEvent performs a merge with any union data inside the AssistantStreamEvent, using the provided DoneEvent
func (*AssistantStreamEvent) MergeErrorEvent ¶
func (t *AssistantStreamEvent) MergeErrorEvent(v ErrorEvent) error
MergeErrorEvent performs a merge with any union data inside the AssistantStreamEvent, using the provided ErrorEvent
func (*AssistantStreamEvent) MergeMessageStreamEvent ¶
func (t *AssistantStreamEvent) MergeMessageStreamEvent(v MessageStreamEvent) error
MergeMessageStreamEvent performs a merge with any union data inside the AssistantStreamEvent, using the provided MessageStreamEvent
func (*AssistantStreamEvent) MergeRunStepStreamEvent ¶
func (t *AssistantStreamEvent) MergeRunStepStreamEvent(v RunStepStreamEvent) error
MergeRunStepStreamEvent performs a merge with any union data inside the AssistantStreamEvent, using the provided RunStepStreamEvent
func (*AssistantStreamEvent) MergeRunStreamEvent ¶
func (t *AssistantStreamEvent) MergeRunStreamEvent(v RunStreamEvent) error
MergeRunStreamEvent performs a merge with any union data inside the AssistantStreamEvent, using the provided RunStreamEvent
func (*AssistantStreamEvent) MergeThreadStreamEvent ¶
func (t *AssistantStreamEvent) MergeThreadStreamEvent(v ThreadStreamEvent) error
MergeThreadStreamEvent performs a merge with any union data inside the AssistantStreamEvent, using the provided ThreadStreamEvent
func (*AssistantStreamEvent) UnmarshalJSON ¶
func (t *AssistantStreamEvent) UnmarshalJSON(b []byte) error
type AssistantToolsCode ¶
type AssistantToolsCode struct { // Type The type of tool being defined: `code_interpreter` Type AssistantToolsCodeType `json:"type"` }
AssistantToolsCode defines model for AssistantToolsCode.
type AssistantToolsCodeType ¶
type AssistantToolsCodeType string
AssistantToolsCodeType The type of tool being defined: `code_interpreter`
const (
AssistantToolsCodeTypeCodeInterpreter AssistantToolsCodeType = "code_interpreter"
)
Defines values for AssistantToolsCodeType.
type AssistantToolsFunction ¶
type AssistantToolsFunction struct { Function FunctionObject `json:"function"` // Type The type of tool being defined: `function` Type AssistantToolsFunctionType `json:"type"` }
AssistantToolsFunction defines model for AssistantToolsFunction.
type AssistantToolsFunctionType ¶
type AssistantToolsFunctionType string
AssistantToolsFunctionType The type of tool being defined: `function`
const (
AssistantToolsFunctionTypeFunction AssistantToolsFunctionType = "function"
)
Defines values for AssistantToolsFunctionType.
type AssistantToolsRetrieval ¶
type AssistantToolsRetrieval struct { // Type The type of tool being defined: `retrieval` Type AssistantToolsRetrievalType `json:"type"` }
AssistantToolsRetrieval defines model for AssistantToolsRetrieval.
type AssistantToolsRetrievalType ¶
type AssistantToolsRetrievalType string
AssistantToolsRetrievalType The type of tool being defined: `retrieval`
const (
AssistantToolsRetrievalTypeRetrieval AssistantToolsRetrievalType = "retrieval"
)
Defines values for AssistantToolsRetrievalType.
type ChatCompletionFunctionCallOption ¶
type ChatCompletionFunctionCallOption struct { // Name 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.
type ChatCompletionFunctions ¶
type ChatCompletionFunctions struct { // Description 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"` // Name 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"` // Parameters 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 *FunctionParameters `json:"parameters"` }
ChatCompletionFunctions defines model for ChatCompletionFunctions.
type ChatCompletionMessageToolCall ¶
type ChatCompletionMessageToolCall struct { // Function The function that the model called. Function struct { // Arguments 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"` // Name The name of the function to call. Name string `json:"name"` } `json:"function"` // Id The ID of the tool call. Id string `json:"id"` // Type The type of the tool. Currently, only `function` is supported. Type ChatCompletionMessageToolCallType `json:"type"` }
ChatCompletionMessageToolCall defines model for ChatCompletionMessageToolCall.
type ChatCompletionMessageToolCallChunk ¶
type ChatCompletionMessageToolCallChunk struct { Function *struct { // Arguments 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,omitempty"` // Name The name of the function to call. Name *string `json:"name,omitempty"` } `json:"function,omitempty"` // Id The ID of the tool call. Id *string `json:"id,omitempty"` Index int `json:"index"` // Type The type of the tool. Currently, only `function` is supported. Type *ChatCompletionMessageToolCallChunkType `json:"type,omitempty"` }
ChatCompletionMessageToolCallChunk defines model for ChatCompletionMessageToolCallChunk.
type ChatCompletionMessageToolCallChunkType ¶
type ChatCompletionMessageToolCallChunkType string
ChatCompletionMessageToolCallChunkType The type of the tool. Currently, only `function` is supported.
const (
ChatCompletionMessageToolCallChunkTypeFunction ChatCompletionMessageToolCallChunkType = "function"
)
Defines values for ChatCompletionMessageToolCallChunkType.
type ChatCompletionMessageToolCallType ¶
type ChatCompletionMessageToolCallType string
ChatCompletionMessageToolCallType The type of the tool. Currently, only `function` is supported.
const (
ChatCompletionMessageToolCallTypeFunction ChatCompletionMessageToolCallType = "function"
)
Defines values for ChatCompletionMessageToolCallType.
type ChatCompletionMessageToolCalls ¶
type ChatCompletionMessageToolCalls = []ChatCompletionMessageToolCall
ChatCompletionMessageToolCalls The tool calls generated by the model, such as function calls.
type ChatCompletionNamedToolChoice ¶
type ChatCompletionNamedToolChoice struct { Function struct { // Name The name of the function to call. Name string `json:"name"` } `json:"function"` // Type 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.
type ChatCompletionNamedToolChoiceType ¶
type ChatCompletionNamedToolChoiceType string
ChatCompletionNamedToolChoiceType The type of the tool. Currently, only `function` is supported.
const (
ChatCompletionNamedToolChoiceTypeFunction ChatCompletionNamedToolChoiceType = "function"
)
Defines values for ChatCompletionNamedToolChoiceType.
type ChatCompletionRequestAssistantMessage ¶
type ChatCompletionRequestAssistantMessage struct { // Content The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified. Content *string `json:"content"` // FunctionCall Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. // Deprecated: FunctionCall *struct { // Arguments 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"` // Name The name of the function to call. Name string `json:"name"` } `json:"function_call,omitempty"` // Name An optional name for the participant. Provides the model information to differentiate between participants of the same role. Name *string `json:"name,omitempty"` // Role The role of the messages author, in this case `assistant`. Role ChatCompletionRequestAssistantMessageRole `json:"role"` // ToolCalls The tool calls generated by the model, such as function calls. ToolCalls *ChatCompletionMessageToolCalls `json:"tool_calls,omitempty"` }
ChatCompletionRequestAssistantMessage defines model for ChatCompletionRequestAssistantMessage.
type ChatCompletionRequestAssistantMessageRole ¶
type ChatCompletionRequestAssistantMessageRole string
ChatCompletionRequestAssistantMessageRole The role of the messages author, in this case `assistant`.
const (
ChatCompletionRequestAssistantMessageRoleAssistant ChatCompletionRequestAssistantMessageRole = "assistant"
)
Defines values for ChatCompletionRequestAssistantMessageRole.
type ChatCompletionRequestFunctionMessage ¶
type ChatCompletionRequestFunctionMessage struct { // Content The contents of the function message. Content *string `json:"content"` // Name The name of the function to call. Name string `json:"name"` // Role The role of the messages author, in this case `function`. Role ChatCompletionRequestFunctionMessageRole `json:"role"` }
ChatCompletionRequestFunctionMessage defines model for ChatCompletionRequestFunctionMessage.
type ChatCompletionRequestFunctionMessageRole ¶
type ChatCompletionRequestFunctionMessageRole string
ChatCompletionRequestFunctionMessageRole The role of the messages author, in this case `function`.
const (
ChatCompletionRequestFunctionMessageRoleFunction ChatCompletionRequestFunctionMessageRole = "function"
)
Defines values for ChatCompletionRequestFunctionMessageRole.
type ChatCompletionRequestMessage ¶
type ChatCompletionRequestMessage struct {
// contains filtered or unexported fields
}
ChatCompletionRequestMessage defines model for ChatCompletionRequestMessage.
func (ChatCompletionRequestMessage) AsChatCompletionRequestAssistantMessage ¶
func (t ChatCompletionRequestMessage) AsChatCompletionRequestAssistantMessage() (ChatCompletionRequestAssistantMessage, error)
AsChatCompletionRequestAssistantMessage returns the union data inside the ChatCompletionRequestMessage as a ChatCompletionRequestAssistantMessage
func (ChatCompletionRequestMessage) AsChatCompletionRequestFunctionMessage ¶
func (t ChatCompletionRequestMessage) AsChatCompletionRequestFunctionMessage() (ChatCompletionRequestFunctionMessage, error)
AsChatCompletionRequestFunctionMessage returns the union data inside the ChatCompletionRequestMessage as a ChatCompletionRequestFunctionMessage
func (ChatCompletionRequestMessage) AsChatCompletionRequestSystemMessage ¶
func (t ChatCompletionRequestMessage) AsChatCompletionRequestSystemMessage() (ChatCompletionRequestSystemMessage, error)
AsChatCompletionRequestSystemMessage returns the union data inside the ChatCompletionRequestMessage as a ChatCompletionRequestSystemMessage
func (ChatCompletionRequestMessage) AsChatCompletionRequestToolMessage ¶
func (t ChatCompletionRequestMessage) AsChatCompletionRequestToolMessage() (ChatCompletionRequestToolMessage, error)
AsChatCompletionRequestToolMessage returns the union data inside the ChatCompletionRequestMessage as a ChatCompletionRequestToolMessage
func (ChatCompletionRequestMessage) AsChatCompletionRequestUserMessage ¶
func (t ChatCompletionRequestMessage) AsChatCompletionRequestUserMessage() (ChatCompletionRequestUserMessage, error)
AsChatCompletionRequestUserMessage returns the union data inside the ChatCompletionRequestMessage as a ChatCompletionRequestUserMessage
func (*ChatCompletionRequestMessage) FromChatCompletionRequestAssistantMessage ¶
func (t *ChatCompletionRequestMessage) FromChatCompletionRequestAssistantMessage(v ChatCompletionRequestAssistantMessage) error
FromChatCompletionRequestAssistantMessage overwrites any union data inside the ChatCompletionRequestMessage as the provided ChatCompletionRequestAssistantMessage
func (*ChatCompletionRequestMessage) FromChatCompletionRequestFunctionMessage ¶
func (t *ChatCompletionRequestMessage) FromChatCompletionRequestFunctionMessage(v ChatCompletionRequestFunctionMessage) error
FromChatCompletionRequestFunctionMessage overwrites any union data inside the ChatCompletionRequestMessage as the provided ChatCompletionRequestFunctionMessage
func (*ChatCompletionRequestMessage) FromChatCompletionRequestSystemMessage ¶
func (t *ChatCompletionRequestMessage) FromChatCompletionRequestSystemMessage(v ChatCompletionRequestSystemMessage) error
FromChatCompletionRequestSystemMessage overwrites any union data inside the ChatCompletionRequestMessage as the provided ChatCompletionRequestSystemMessage
func (*ChatCompletionRequestMessage) FromChatCompletionRequestToolMessage ¶
func (t *ChatCompletionRequestMessage) FromChatCompletionRequestToolMessage(v ChatCompletionRequestToolMessage) error
FromChatCompletionRequestToolMessage overwrites any union data inside the ChatCompletionRequestMessage as the provided ChatCompletionRequestToolMessage
func (*ChatCompletionRequestMessage) FromChatCompletionRequestUserMessage ¶
func (t *ChatCompletionRequestMessage) FromChatCompletionRequestUserMessage(v ChatCompletionRequestUserMessage) error
FromChatCompletionRequestUserMessage overwrites any union data inside the ChatCompletionRequestMessage as the provided ChatCompletionRequestUserMessage
func (ChatCompletionRequestMessage) MarshalJSON ¶
func (t ChatCompletionRequestMessage) MarshalJSON() ([]byte, error)
func (*ChatCompletionRequestMessage) MergeChatCompletionRequestAssistantMessage ¶
func (t *ChatCompletionRequestMessage) MergeChatCompletionRequestAssistantMessage(v ChatCompletionRequestAssistantMessage) error
MergeChatCompletionRequestAssistantMessage performs a merge with any union data inside the ChatCompletionRequestMessage, using the provided ChatCompletionRequestAssistantMessage
func (*ChatCompletionRequestMessage) MergeChatCompletionRequestFunctionMessage ¶
func (t *ChatCompletionRequestMessage) MergeChatCompletionRequestFunctionMessage(v ChatCompletionRequestFunctionMessage) error
MergeChatCompletionRequestFunctionMessage performs a merge with any union data inside the ChatCompletionRequestMessage, using the provided ChatCompletionRequestFunctionMessage
func (*ChatCompletionRequestMessage) MergeChatCompletionRequestSystemMessage ¶
func (t *ChatCompletionRequestMessage) MergeChatCompletionRequestSystemMessage(v ChatCompletionRequestSystemMessage) error
MergeChatCompletionRequestSystemMessage performs a merge with any union data inside the ChatCompletionRequestMessage, using the provided ChatCompletionRequestSystemMessage
func (*ChatCompletionRequestMessage) MergeChatCompletionRequestToolMessage ¶
func (t *ChatCompletionRequestMessage) MergeChatCompletionRequestToolMessage(v ChatCompletionRequestToolMessage) error
MergeChatCompletionRequestToolMessage performs a merge with any union data inside the ChatCompletionRequestMessage, using the provided ChatCompletionRequestToolMessage
func (*ChatCompletionRequestMessage) MergeChatCompletionRequestUserMessage ¶
func (t *ChatCompletionRequestMessage) MergeChatCompletionRequestUserMessage(v ChatCompletionRequestUserMessage) error
MergeChatCompletionRequestUserMessage performs a merge with any union data inside the ChatCompletionRequestMessage, using the provided ChatCompletionRequestUserMessage
func (*ChatCompletionRequestMessage) UnmarshalJSON ¶
func (t *ChatCompletionRequestMessage) UnmarshalJSON(b []byte) error
type ChatCompletionRequestMessageContentPart ¶
type ChatCompletionRequestMessageContentPart struct {
// contains filtered or unexported fields
}
ChatCompletionRequestMessageContentPart defines model for ChatCompletionRequestMessageContentPart.
func (ChatCompletionRequestMessageContentPart) AsChatCompletionRequestMessageContentPartImage ¶
func (t ChatCompletionRequestMessageContentPart) AsChatCompletionRequestMessageContentPartImage() (ChatCompletionRequestMessageContentPartImage, error)
AsChatCompletionRequestMessageContentPartImage returns the union data inside the ChatCompletionRequestMessageContentPart as a ChatCompletionRequestMessageContentPartImage
func (ChatCompletionRequestMessageContentPart) AsChatCompletionRequestMessageContentPartText ¶
func (t ChatCompletionRequestMessageContentPart) AsChatCompletionRequestMessageContentPartText() (ChatCompletionRequestMessageContentPartText, error)
AsChatCompletionRequestMessageContentPartText returns the union data inside the ChatCompletionRequestMessageContentPart as a ChatCompletionRequestMessageContentPartText
func (*ChatCompletionRequestMessageContentPart) FromChatCompletionRequestMessageContentPartImage ¶
func (t *ChatCompletionRequestMessageContentPart) FromChatCompletionRequestMessageContentPartImage(v ChatCompletionRequestMessageContentPartImage) error
FromChatCompletionRequestMessageContentPartImage overwrites any union data inside the ChatCompletionRequestMessageContentPart as the provided ChatCompletionRequestMessageContentPartImage
func (*ChatCompletionRequestMessageContentPart) FromChatCompletionRequestMessageContentPartText ¶
func (t *ChatCompletionRequestMessageContentPart) FromChatCompletionRequestMessageContentPartText(v ChatCompletionRequestMessageContentPartText) error
FromChatCompletionRequestMessageContentPartText overwrites any union data inside the ChatCompletionRequestMessageContentPart as the provided ChatCompletionRequestMessageContentPartText
func (ChatCompletionRequestMessageContentPart) MarshalJSON ¶
func (t ChatCompletionRequestMessageContentPart) MarshalJSON() ([]byte, error)
func (*ChatCompletionRequestMessageContentPart) MergeChatCompletionRequestMessageContentPartImage ¶
func (t *ChatCompletionRequestMessageContentPart) MergeChatCompletionRequestMessageContentPartImage(v ChatCompletionRequestMessageContentPartImage) error
MergeChatCompletionRequestMessageContentPartImage performs a merge with any union data inside the ChatCompletionRequestMessageContentPart, using the provided ChatCompletionRequestMessageContentPartImage
func (*ChatCompletionRequestMessageContentPart) MergeChatCompletionRequestMessageContentPartText ¶
func (t *ChatCompletionRequestMessageContentPart) MergeChatCompletionRequestMessageContentPartText(v ChatCompletionRequestMessageContentPartText) error
MergeChatCompletionRequestMessageContentPartText performs a merge with any union data inside the ChatCompletionRequestMessageContentPart, using the provided ChatCompletionRequestMessageContentPartText
func (*ChatCompletionRequestMessageContentPart) UnmarshalJSON ¶
func (t *ChatCompletionRequestMessageContentPart) UnmarshalJSON(b []byte) error
type ChatCompletionRequestMessageContentPartImage ¶
type ChatCompletionRequestMessageContentPartImage struct { ImageUrl struct { // Detail Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding). Detail *ChatCompletionRequestMessageContentPartImageImageUrlDetail `json:"detail,omitempty"` // Url Either a URL of the image or the base64 encoded image data. Url string `json:"url"` } `json:"image_url"` // Type The type of the content part. Type ChatCompletionRequestMessageContentPartImageType `json:"type"` }
ChatCompletionRequestMessageContentPartImage defines model for ChatCompletionRequestMessageContentPartImage.
type ChatCompletionRequestMessageContentPartImageImageUrlDetail ¶
type ChatCompletionRequestMessageContentPartImageImageUrlDetail string
ChatCompletionRequestMessageContentPartImageImageUrlDetail Specifies the detail level of the image. Learn more in the [Vision guide](/docs/guides/vision/low-or-high-fidelity-image-understanding).
const ( ChatCompletionRequestMessageContentPartImageImageUrlDetailAuto ChatCompletionRequestMessageContentPartImageImageUrlDetail = "auto" ChatCompletionRequestMessageContentPartImageImageUrlDetailHigh ChatCompletionRequestMessageContentPartImageImageUrlDetail = "high" ChatCompletionRequestMessageContentPartImageImageUrlDetailLow ChatCompletionRequestMessageContentPartImageImageUrlDetail = "low" )
Defines values for ChatCompletionRequestMessageContentPartImageImageUrlDetail.
type ChatCompletionRequestMessageContentPartImageType ¶
type ChatCompletionRequestMessageContentPartImageType string
ChatCompletionRequestMessageContentPartImageType The type of the content part.
const (
ImageUrl ChatCompletionRequestMessageContentPartImageType = "image_url"
)
Defines values for ChatCompletionRequestMessageContentPartImageType.
type ChatCompletionRequestMessageContentPartText ¶
type ChatCompletionRequestMessageContentPartText struct { // Text The text content. Text string `json:"text"` // Type The type of the content part. Type ChatCompletionRequestMessageContentPartTextType `json:"type"` }
ChatCompletionRequestMessageContentPartText defines model for ChatCompletionRequestMessageContentPartText.
type ChatCompletionRequestMessageContentPartTextType ¶
type ChatCompletionRequestMessageContentPartTextType string
ChatCompletionRequestMessageContentPartTextType The type of the content part.
const (
ChatCompletionRequestMessageContentPartTextTypeText ChatCompletionRequestMessageContentPartTextType = "text"
)
Defines values for ChatCompletionRequestMessageContentPartTextType.
type ChatCompletionRequestSystemMessage ¶
type ChatCompletionRequestSystemMessage struct { // Content The contents of the system message. Content string `json:"content"` // Name An optional name for the participant. Provides the model information to differentiate between participants of the same role. Name *string `json:"name,omitempty"` // Role The role of the messages author, in this case `system`. Role ChatCompletionRequestSystemMessageRole `json:"role"` }
ChatCompletionRequestSystemMessage defines model for ChatCompletionRequestSystemMessage.
type ChatCompletionRequestSystemMessageRole ¶
type ChatCompletionRequestSystemMessageRole string
ChatCompletionRequestSystemMessageRole The role of the messages author, in this case `system`.
const (
ChatCompletionRequestSystemMessageRoleSystem ChatCompletionRequestSystemMessageRole = "system"
)
Defines values for ChatCompletionRequestSystemMessageRole.
type ChatCompletionRequestToolMessage ¶
type ChatCompletionRequestToolMessage struct { // Content The contents of the tool message. Content string `json:"content"` // Role The role of the messages author, in this case `tool`. Role ChatCompletionRequestToolMessageRole `json:"role"` // ToolCallId Tool call that this message is responding to. ToolCallId string `json:"tool_call_id"` }
ChatCompletionRequestToolMessage defines model for ChatCompletionRequestToolMessage.
type ChatCompletionRequestToolMessageRole ¶
type ChatCompletionRequestToolMessageRole string
ChatCompletionRequestToolMessageRole The role of the messages author, in this case `tool`.
const (
ChatCompletionRequestToolMessageRoleTool ChatCompletionRequestToolMessageRole = "tool"
)
Defines values for ChatCompletionRequestToolMessageRole.
type ChatCompletionRequestUserMessage ¶
type ChatCompletionRequestUserMessage struct { // Content The contents of the user message. Content ChatCompletionRequestUserMessage_Content `json:"content"` // Name An optional name for the participant. Provides the model information to differentiate between participants of the same role. Name *string `json:"name,omitempty"` // Role The role of the messages author, in this case `user`. Role ChatCompletionRequestUserMessageRole `json:"role"` }
ChatCompletionRequestUserMessage defines model for ChatCompletionRequestUserMessage.
type ChatCompletionRequestUserMessageContent0 ¶
type ChatCompletionRequestUserMessageContent0 = string
ChatCompletionRequestUserMessageContent0 The text contents of the message.
type ChatCompletionRequestUserMessageContent1 ¶
type ChatCompletionRequestUserMessageContent1 = []ChatCompletionRequestMessageContentPart
ChatCompletionRequestUserMessageContent1 An array of content parts with a defined type, each can be of type `text` or `image_url` when passing in images. You can pass multiple images by adding multiple `image_url` content parts. Image input is only supported when using the `gpt-4-visual-preview` model.
type ChatCompletionRequestUserMessageRole ¶
type ChatCompletionRequestUserMessageRole string
ChatCompletionRequestUserMessageRole The role of the messages author, in this case `user`.
const (
ChatCompletionRequestUserMessageRoleUser ChatCompletionRequestUserMessageRole = "user"
)
Defines values for ChatCompletionRequestUserMessageRole.
type ChatCompletionRequestUserMessage_Content ¶
type ChatCompletionRequestUserMessage_Content struct {
// contains filtered or unexported fields
}
ChatCompletionRequestUserMessage_Content The contents of the user message.
func (ChatCompletionRequestUserMessage_Content) AsChatCompletionRequestUserMessageContent0 ¶
func (t ChatCompletionRequestUserMessage_Content) AsChatCompletionRequestUserMessageContent0() (ChatCompletionRequestUserMessageContent0, error)
AsChatCompletionRequestUserMessageContent0 returns the union data inside the ChatCompletionRequestUserMessage_Content as a ChatCompletionRequestUserMessageContent0
func (ChatCompletionRequestUserMessage_Content) AsChatCompletionRequestUserMessageContent1 ¶
func (t ChatCompletionRequestUserMessage_Content) AsChatCompletionRequestUserMessageContent1() (ChatCompletionRequestUserMessageContent1, error)
AsChatCompletionRequestUserMessageContent1 returns the union data inside the ChatCompletionRequestUserMessage_Content as a ChatCompletionRequestUserMessageContent1
func (*ChatCompletionRequestUserMessage_Content) FromChatCompletionRequestUserMessageContent0 ¶
func (t *ChatCompletionRequestUserMessage_Content) FromChatCompletionRequestUserMessageContent0(v ChatCompletionRequestUserMessageContent0) error
FromChatCompletionRequestUserMessageContent0 overwrites any union data inside the ChatCompletionRequestUserMessage_Content as the provided ChatCompletionRequestUserMessageContent0
func (*ChatCompletionRequestUserMessage_Content) FromChatCompletionRequestUserMessageContent1 ¶
func (t *ChatCompletionRequestUserMessage_Content) FromChatCompletionRequestUserMessageContent1(v ChatCompletionRequestUserMessageContent1) error
FromChatCompletionRequestUserMessageContent1 overwrites any union data inside the ChatCompletionRequestUserMessage_Content as the provided ChatCompletionRequestUserMessageContent1
func (ChatCompletionRequestUserMessage_Content) MarshalJSON ¶
func (t ChatCompletionRequestUserMessage_Content) MarshalJSON() ([]byte, error)
func (*ChatCompletionRequestUserMessage_Content) MergeChatCompletionRequestUserMessageContent0 ¶
func (t *ChatCompletionRequestUserMessage_Content) MergeChatCompletionRequestUserMessageContent0(v ChatCompletionRequestUserMessageContent0) error
MergeChatCompletionRequestUserMessageContent0 performs a merge with any union data inside the ChatCompletionRequestUserMessage_Content, using the provided ChatCompletionRequestUserMessageContent0
func (*ChatCompletionRequestUserMessage_Content) MergeChatCompletionRequestUserMessageContent1 ¶
func (t *ChatCompletionRequestUserMessage_Content) MergeChatCompletionRequestUserMessageContent1(v ChatCompletionRequestUserMessageContent1) error
MergeChatCompletionRequestUserMessageContent1 performs a merge with any union data inside the ChatCompletionRequestUserMessage_Content, using the provided ChatCompletionRequestUserMessageContent1
func (*ChatCompletionRequestUserMessage_Content) UnmarshalJSON ¶
func (t *ChatCompletionRequestUserMessage_Content) UnmarshalJSON(b []byte) error
type ChatCompletionResponseMessage ¶
type ChatCompletionResponseMessage struct { // Content The contents of the message. Content *string `json:"content"` // FunctionCall Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. // Deprecated: FunctionCall *struct { // Arguments 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"` // Name The name of the function to call. Name string `json:"name"` } `json:"function_call,omitempty"` // Role The role of the author of this message. Role ChatCompletionResponseMessageRole `json:"role"` // ToolCalls The tool calls generated by the model, such as function calls. ToolCalls *ChatCompletionMessageToolCalls `json:"tool_calls,omitempty"` }
ChatCompletionResponseMessage A chat completion message generated by the model.
type ChatCompletionResponseMessageRole ¶
type ChatCompletionResponseMessageRole string
ChatCompletionResponseMessageRole The role of the author of this message.
const (
ChatCompletionResponseMessageRoleAssistant ChatCompletionResponseMessageRole = "assistant"
)
Defines values for ChatCompletionResponseMessageRole.
type ChatCompletionRole ¶
type ChatCompletionRole string
ChatCompletionRole The role of the author of a message
const ( ChatCompletionRoleAssistant ChatCompletionRole = "assistant" ChatCompletionRoleFunction ChatCompletionRole = "function" ChatCompletionRoleSystem ChatCompletionRole = "system" ChatCompletionRoleTool ChatCompletionRole = "tool" ChatCompletionRoleUser ChatCompletionRole = "user" )
Defines values for ChatCompletionRole.
type ChatCompletionStreamResponseDelta ¶
type ChatCompletionStreamResponseDelta struct { // Content The contents of the chunk message. Content *string `json:"content"` // FunctionCall Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model. // Deprecated: FunctionCall *struct { // Arguments 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,omitempty"` // Name The name of the function to call. Name *string `json:"name,omitempty"` } `json:"function_call,omitempty"` // Role The role of the author of this message. Role *ChatCompletionStreamResponseDeltaRole `json:"role,omitempty"` ToolCalls *[]ChatCompletionMessageToolCallChunk `json:"tool_calls,omitempty"` }
ChatCompletionStreamResponseDelta A chat completion delta generated by streamed model responses.
type ChatCompletionStreamResponseDeltaRole ¶
type ChatCompletionStreamResponseDeltaRole string
ChatCompletionStreamResponseDeltaRole The role of the author of this message.
const ( ChatCompletionStreamResponseDeltaRoleAssistant ChatCompletionStreamResponseDeltaRole = "assistant" ChatCompletionStreamResponseDeltaRoleSystem ChatCompletionStreamResponseDeltaRole = "system" ChatCompletionStreamResponseDeltaRoleTool ChatCompletionStreamResponseDeltaRole = "tool" ChatCompletionStreamResponseDeltaRoleUser ChatCompletionStreamResponseDeltaRole = "user" )
Defines values for ChatCompletionStreamResponseDeltaRole.
type ChatCompletionTokenLogprob ¶
type ChatCompletionTokenLogprob struct { // Bytes 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 *[]int `json:"bytes"` // Logprob The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely. Logprob float32 `json:"logprob"` // Token The token. Token string `json:"token"` // TopLogprobs 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 []struct { // Bytes 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 *[]int `json:"bytes"` // Logprob The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely. Logprob float32 `json:"logprob"` // Token The token. Token string `json:"token"` } `json:"top_logprobs"` }
ChatCompletionTokenLogprob defines model for ChatCompletionTokenLogprob.
type ChatCompletionTool ¶
type ChatCompletionTool struct { Function FunctionObject `json:"function"` // Type The type of the tool. Currently, only `function` is supported. Type ChatCompletionToolType `json:"type"` }
ChatCompletionTool defines model for ChatCompletionTool.
type ChatCompletionToolChoiceOption ¶
type ChatCompletionToolChoiceOption struct {
// contains filtered or unexported fields
}
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 (ChatCompletionToolChoiceOption) AsChatCompletionNamedToolChoice ¶
func (t ChatCompletionToolChoiceOption) AsChatCompletionNamedToolChoice() (ChatCompletionNamedToolChoice, error)
AsChatCompletionNamedToolChoice returns the union data inside the ChatCompletionToolChoiceOption as a ChatCompletionNamedToolChoice
func (ChatCompletionToolChoiceOption) AsChatCompletionToolChoiceOption0 ¶
func (t ChatCompletionToolChoiceOption) AsChatCompletionToolChoiceOption0() (ChatCompletionToolChoiceOption0, error)
AsChatCompletionToolChoiceOption0 returns the union data inside the ChatCompletionToolChoiceOption as a ChatCompletionToolChoiceOption0
func (*ChatCompletionToolChoiceOption) FromChatCompletionNamedToolChoice ¶
func (t *ChatCompletionToolChoiceOption) FromChatCompletionNamedToolChoice(v ChatCompletionNamedToolChoice) error
FromChatCompletionNamedToolChoice overwrites any union data inside the ChatCompletionToolChoiceOption as the provided ChatCompletionNamedToolChoice
func (*ChatCompletionToolChoiceOption) FromChatCompletionToolChoiceOption0 ¶
func (t *ChatCompletionToolChoiceOption) FromChatCompletionToolChoiceOption0(v ChatCompletionToolChoiceOption0) error
FromChatCompletionToolChoiceOption0 overwrites any union data inside the ChatCompletionToolChoiceOption as the provided ChatCompletionToolChoiceOption0
func (ChatCompletionToolChoiceOption) MarshalJSON ¶
func (t ChatCompletionToolChoiceOption) MarshalJSON() ([]byte, error)
func (*ChatCompletionToolChoiceOption) MergeChatCompletionNamedToolChoice ¶
func (t *ChatCompletionToolChoiceOption) MergeChatCompletionNamedToolChoice(v ChatCompletionNamedToolChoice) error
MergeChatCompletionNamedToolChoice performs a merge with any union data inside the ChatCompletionToolChoiceOption, using the provided ChatCompletionNamedToolChoice
func (*ChatCompletionToolChoiceOption) MergeChatCompletionToolChoiceOption0 ¶
func (t *ChatCompletionToolChoiceOption) MergeChatCompletionToolChoiceOption0(v ChatCompletionToolChoiceOption0) error
MergeChatCompletionToolChoiceOption0 performs a merge with any union data inside the ChatCompletionToolChoiceOption, using the provided ChatCompletionToolChoiceOption0
func (*ChatCompletionToolChoiceOption) UnmarshalJSON ¶
func (t *ChatCompletionToolChoiceOption) UnmarshalJSON(b []byte) error
type ChatCompletionToolChoiceOption0 ¶
type ChatCompletionToolChoiceOption0 string
ChatCompletionToolChoiceOption0 `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 ( ChatCompletionToolChoiceOption0Auto ChatCompletionToolChoiceOption0 = "auto" ChatCompletionToolChoiceOption0None ChatCompletionToolChoiceOption0 = "none" )
Defines values for ChatCompletionToolChoiceOption0.
type ChatCompletionToolType ¶
type ChatCompletionToolType string
ChatCompletionToolType The type of the tool. Currently, only `function` is supported.
const (
ChatCompletionToolTypeFunction ChatCompletionToolType = "function"
)
Defines values for ChatCompletionToolType.
type CompletionUsage ¶
type CompletionUsage struct { // CompletionTokens Number of tokens in the generated completion. CompletionTokens int `json:"completion_tokens"` // PromptTokens Number of tokens in the prompt. PromptTokens int `json:"prompt_tokens"` // TotalTokens Total number of tokens used in the request (prompt + completion). TotalTokens int `json:"total_tokens"` }
CompletionUsage Usage statistics for the completion request.
type CreateAssistantFileJSONRequestBody ¶
type CreateAssistantFileJSONRequestBody = CreateAssistantFileRequest
CreateAssistantFileJSONRequestBody defines body for CreateAssistantFile for application/json ContentType.
type CreateAssistantFileRequest ¶
type CreateAssistantFileRequest struct { // FileId 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"` }
CreateAssistantFileRequest defines model for CreateAssistantFileRequest.
type CreateAssistantJSONRequestBody ¶
type CreateAssistantJSONRequestBody = CreateAssistantRequest
CreateAssistantJSONRequestBody defines body for CreateAssistant for application/json ContentType.
type CreateAssistantRequest ¶
type CreateAssistantRequest struct { // Description The description of the assistant. The maximum length is 512 characters. Description *string `json:"description"` // FileIds 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"` // Instructions The system instructions that the assistant uses. The maximum length is 32768 characters. Instructions *string `json:"instructions"` // 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. Metadata *map[string]interface{} `json:"metadata"` // Model 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 CreateAssistantRequest_Model `json:"model"` // Name The name of the assistant. The maximum length is 256 characters. Name *string `json:"name"` // Tools 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`, `function`, or `gptscript`. Tools *[]CreateAssistantRequest_Tools_Item `json:"tools,omitempty"` }
CreateAssistantRequest defines model for CreateAssistantRequest.
type CreateAssistantRequestModel0 ¶
type CreateAssistantRequestModel0 = string
CreateAssistantRequestModel0 defines model for .
type CreateAssistantRequest_Model ¶
type CreateAssistantRequest_Model struct {
// contains filtered or unexported fields
}
CreateAssistantRequest_Model 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 (CreateAssistantRequest_Model) AsCreateAssistantRequestModel0 ¶
func (t CreateAssistantRequest_Model) AsCreateAssistantRequestModel0() (CreateAssistantRequestModel0, error)
AsCreateAssistantRequestModel0 returns the union data inside the CreateAssistantRequest_Model as a CreateAssistantRequestModel0
func (*CreateAssistantRequest_Model) FromCreateAssistantRequestModel0 ¶
func (t *CreateAssistantRequest_Model) FromCreateAssistantRequestModel0(v CreateAssistantRequestModel0) error
FromCreateAssistantRequestModel0 overwrites any union data inside the CreateAssistantRequest_Model as the provided CreateAssistantRequestModel0
func (CreateAssistantRequest_Model) MarshalJSON ¶
func (t CreateAssistantRequest_Model) MarshalJSON() ([]byte, error)
func (*CreateAssistantRequest_Model) MergeCreateAssistantRequestModel0 ¶
func (t *CreateAssistantRequest_Model) MergeCreateAssistantRequestModel0(v CreateAssistantRequestModel0) error
MergeCreateAssistantRequestModel0 performs a merge with any union data inside the CreateAssistantRequest_Model, using the provided CreateAssistantRequestModel0
func (*CreateAssistantRequest_Model) UnmarshalJSON ¶
func (t *CreateAssistantRequest_Model) UnmarshalJSON(b []byte) error
type CreateAssistantRequest_Tools_Item ¶
type CreateAssistantRequest_Tools_Item struct {
// contains filtered or unexported fields
}
CreateAssistantRequest_Tools_Item defines model for CreateAssistantRequest.tools.Item.
func (CreateAssistantRequest_Tools_Item) AsAssistantToolsCode ¶
func (t CreateAssistantRequest_Tools_Item) AsAssistantToolsCode() (AssistantToolsCode, error)
AsAssistantToolsCode returns the union data inside the CreateAssistantRequest_Tools_Item as a AssistantToolsCode
func (CreateAssistantRequest_Tools_Item) AsAssistantToolsFunction ¶
func (t CreateAssistantRequest_Tools_Item) AsAssistantToolsFunction() (AssistantToolsFunction, error)
AsAssistantToolsFunction returns the union data inside the CreateAssistantRequest_Tools_Item as a AssistantToolsFunction
func (CreateAssistantRequest_Tools_Item) AsAssistantToolsRetrieval ¶
func (t CreateAssistantRequest_Tools_Item) AsAssistantToolsRetrieval() (AssistantToolsRetrieval, error)
AsAssistantToolsRetrieval returns the union data inside the CreateAssistantRequest_Tools_Item as a AssistantToolsRetrieval
func (CreateAssistantRequest_Tools_Item) AsXAssistantToolsGPTScript ¶
func (t CreateAssistantRequest_Tools_Item) AsXAssistantToolsGPTScript() (XAssistantToolsGPTScript, error)
AsXAssistantToolsGPTScript returns the union data inside the CreateAssistantRequest_Tools_Item as a XAssistantToolsGPTScript
func (*CreateAssistantRequest_Tools_Item) FromAssistantToolsCode ¶
func (t *CreateAssistantRequest_Tools_Item) FromAssistantToolsCode(v AssistantToolsCode) error
FromAssistantToolsCode overwrites any union data inside the CreateAssistantRequest_Tools_Item as the provided AssistantToolsCode
func (*CreateAssistantRequest_Tools_Item) FromAssistantToolsFunction ¶
func (t *CreateAssistantRequest_Tools_Item) FromAssistantToolsFunction(v AssistantToolsFunction) error
FromAssistantToolsFunction overwrites any union data inside the CreateAssistantRequest_Tools_Item as the provided AssistantToolsFunction
func (*CreateAssistantRequest_Tools_Item) FromAssistantToolsRetrieval ¶
func (t *CreateAssistantRequest_Tools_Item) FromAssistantToolsRetrieval(v AssistantToolsRetrieval) error
FromAssistantToolsRetrieval overwrites any union data inside the CreateAssistantRequest_Tools_Item as the provided AssistantToolsRetrieval
func (*CreateAssistantRequest_Tools_Item) FromXAssistantToolsGPTScript ¶
func (t *CreateAssistantRequest_Tools_Item) FromXAssistantToolsGPTScript(v XAssistantToolsGPTScript) error
FromXAssistantToolsGPTScript overwrites any union data inside the CreateAssistantRequest_Tools_Item as the provided XAssistantToolsGPTScript
func (CreateAssistantRequest_Tools_Item) MarshalJSON ¶
func (t CreateAssistantRequest_Tools_Item) MarshalJSON() ([]byte, error)
func (*CreateAssistantRequest_Tools_Item) MergeAssistantToolsCode ¶
func (t *CreateAssistantRequest_Tools_Item) MergeAssistantToolsCode(v AssistantToolsCode) error
MergeAssistantToolsCode performs a merge with any union data inside the CreateAssistantRequest_Tools_Item, using the provided AssistantToolsCode
func (*CreateAssistantRequest_Tools_Item) MergeAssistantToolsFunction ¶
func (t *CreateAssistantRequest_Tools_Item) MergeAssistantToolsFunction(v AssistantToolsFunction) error
MergeAssistantToolsFunction performs a merge with any union data inside the CreateAssistantRequest_Tools_Item, using the provided AssistantToolsFunction
func (*CreateAssistantRequest_Tools_Item) MergeAssistantToolsRetrieval ¶
func (t *CreateAssistantRequest_Tools_Item) MergeAssistantToolsRetrieval(v AssistantToolsRetrieval) error
MergeAssistantToolsRetrieval performs a merge with any union data inside the CreateAssistantRequest_Tools_Item, using the provided AssistantToolsRetrieval
func (*CreateAssistantRequest_Tools_Item) MergeXAssistantToolsGPTScript ¶
func (t *CreateAssistantRequest_Tools_Item) MergeXAssistantToolsGPTScript(v XAssistantToolsGPTScript) error
MergeXAssistantToolsGPTScript performs a merge with any union data inside the CreateAssistantRequest_Tools_Item, using the provided XAssistantToolsGPTScript
func (*CreateAssistantRequest_Tools_Item) UnmarshalJSON ¶
func (t *CreateAssistantRequest_Tools_Item) UnmarshalJSON(b []byte) error
type CreateChatCompletionFunctionResponse ¶
type CreateChatCompletionFunctionResponse struct { // Choices A list of chat completion choices. Can be more than one if `n` is greater than 1. Choices []struct { // 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, or `function_call` if the model called a function. FinishReason CreateChatCompletionFunctionResponseChoicesFinishReason `json:"finish_reason"` // Index The index of the choice in the list of choices. Index int `json:"index"` // Message A chat completion message generated by the model. Message ChatCompletionResponseMessage `json:"message"` } `json:"choices"` // Created The Unix timestamp (in seconds) of when the chat completion was created. Created int `json:"created"` // Id A unique identifier for the chat completion. Id string `json:"id"` // Model The model used for the chat completion. Model string `json:"model"` // Object The object type, which is always `chat.completion`. Object CreateChatCompletionFunctionResponseObject `json:"object"` // SystemFingerprint 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 Usage statistics for the completion request. Usage *CompletionUsage `json:"usage,omitempty"` }
CreateChatCompletionFunctionResponse Represents a chat completion response returned by model, based on the provided input.
type CreateChatCompletionFunctionResponseChoicesFinishReason ¶
type CreateChatCompletionFunctionResponseChoicesFinishReason string
CreateChatCompletionFunctionResponseChoicesFinishReason 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, or `function_call` if the model called a function.
const ( CreateChatCompletionFunctionResponseChoicesFinishReasonContentFilter CreateChatCompletionFunctionResponseChoicesFinishReason = "content_filter" CreateChatCompletionFunctionResponseChoicesFinishReasonFunctionCall CreateChatCompletionFunctionResponseChoicesFinishReason = "function_call" CreateChatCompletionFunctionResponseChoicesFinishReasonLength CreateChatCompletionFunctionResponseChoicesFinishReason = "length" CreateChatCompletionFunctionResponseChoicesFinishReasonStop CreateChatCompletionFunctionResponseChoicesFinishReason = "stop" )
Defines values for CreateChatCompletionFunctionResponseChoicesFinishReason.
type CreateChatCompletionFunctionResponseObject ¶
type CreateChatCompletionFunctionResponseObject string
CreateChatCompletionFunctionResponseObject The object type, which is always `chat.completion`.
const (
CreateChatCompletionFunctionResponseObjectChatCompletion CreateChatCompletionFunctionResponseObject = "chat.completion"
)
Defines values for CreateChatCompletionFunctionResponseObject.
type CreateChatCompletionImageResponse ¶
type CreateChatCompletionImageResponse = map[string]interface{}
CreateChatCompletionImageResponse Represents a streamed chunk of a chat completion response returned by model, based on the provided input.
type CreateChatCompletionJSONRequestBody ¶
type CreateChatCompletionJSONRequestBody = CreateChatCompletionRequest
CreateChatCompletionJSONRequestBody defines body for CreateChatCompletion for application/json ContentType.
type CreateChatCompletionRequest ¶
type CreateChatCompletionRequest struct { // FrequencyPenalty 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 *float32 `json:"frequency_penalty"` // FunctionCall 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: FunctionCall *CreateChatCompletionRequest_FunctionCall `json:"function_call,omitempty"` // Functions Deprecated in favor of `tools`. // // A list of functions the model may generate JSON inputs for. // Deprecated: Functions *[]ChatCompletionFunctions `json:"functions,omitempty"` // LogitBias 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]int `json:"logit_bias"` // Logprobs 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 `json:"logprobs"` // MaxTokens 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 *int `json:"max_tokens"` // Messages 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"` // Model 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 CreateChatCompletionRequest_Model `json:"model"` // N 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 *int `json:"n"` // PresencePenalty 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 *float32 `json:"presence_penalty"` // 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. ResponseFormat *struct { // Type Must be one of `text` or `json_object`. Type *CreateChatCompletionRequestResponseFormatType `json:"type,omitempty"` } `json:"response_format,omitempty"` // Seed 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 *int `json:"seed"` // Stop Up to 4 sequences where the API will stop generating further tokens. Stop *CreateChatCompletionRequest_Stop `json:"stop,omitempty"` // Stream 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 `json:"stream"` // Temperature 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 *float32 `json:"temperature"` // ToolChoice 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"` // Tools 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. A max of 128 functions are supported. Tools *[]ChatCompletionTool `json:"tools"` // TopLogprobs An integer between 0 and 20 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 *int `json:"top_logprobs"` // TopP 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 *float32 `json:"top_p"` // User 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"` }
CreateChatCompletionRequest defines model for CreateChatCompletionRequest.
type CreateChatCompletionRequestFunctionCall0 ¶
type CreateChatCompletionRequestFunctionCall0 string
CreateChatCompletionRequestFunctionCall0 `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 ( CreateChatCompletionRequestFunctionCall0Auto CreateChatCompletionRequestFunctionCall0 = "auto" CreateChatCompletionRequestFunctionCall0None CreateChatCompletionRequestFunctionCall0 = "none" )
Defines values for CreateChatCompletionRequestFunctionCall0.
type CreateChatCompletionRequestModel0 ¶
type CreateChatCompletionRequestModel0 = string
CreateChatCompletionRequestModel0 defines model for .
type CreateChatCompletionRequestModel1 ¶
type CreateChatCompletionRequestModel1 string
CreateChatCompletionRequestModel1 defines model for CreateChatCompletionRequest.Model.1.
const ( CreateChatCompletionRequestModel1Gpt35Turbo CreateChatCompletionRequestModel1 = "gpt-3.5-turbo" CreateChatCompletionRequestModel1Gpt35Turbo0125 CreateChatCompletionRequestModel1 = "gpt-3.5-turbo-0125" CreateChatCompletionRequestModel1Gpt35Turbo0301 CreateChatCompletionRequestModel1 = "gpt-3.5-turbo-0301" CreateChatCompletionRequestModel1Gpt35Turbo0613 CreateChatCompletionRequestModel1 = "gpt-3.5-turbo-0613" CreateChatCompletionRequestModel1Gpt35Turbo1106 CreateChatCompletionRequestModel1 = "gpt-3.5-turbo-1106" CreateChatCompletionRequestModel1Gpt35Turbo16k CreateChatCompletionRequestModel1 = "gpt-3.5-turbo-16k" CreateChatCompletionRequestModel1Gpt35Turbo16k0613 CreateChatCompletionRequestModel1 = "gpt-3.5-turbo-16k-0613" CreateChatCompletionRequestModel1Gpt4 CreateChatCompletionRequestModel1 = "gpt-4" CreateChatCompletionRequestModel1Gpt40125Preview CreateChatCompletionRequestModel1 = "gpt-4-0125-preview" CreateChatCompletionRequestModel1Gpt40314 CreateChatCompletionRequestModel1 = "gpt-4-0314" CreateChatCompletionRequestModel1Gpt40613 CreateChatCompletionRequestModel1 = "gpt-4-0613" CreateChatCompletionRequestModel1Gpt41106Preview CreateChatCompletionRequestModel1 = "gpt-4-1106-preview" CreateChatCompletionRequestModel1Gpt432k CreateChatCompletionRequestModel1 = "gpt-4-32k" CreateChatCompletionRequestModel1Gpt432k0314 CreateChatCompletionRequestModel1 = "gpt-4-32k-0314" CreateChatCompletionRequestModel1Gpt432k0613 CreateChatCompletionRequestModel1 = "gpt-4-32k-0613" CreateChatCompletionRequestModel1Gpt4TurboPreview CreateChatCompletionRequestModel1 = "gpt-4-turbo-preview" CreateChatCompletionRequestModel1Gpt4VisionPreview CreateChatCompletionRequestModel1 = "gpt-4-vision-preview" )
Defines values for CreateChatCompletionRequestModel1.
type CreateChatCompletionRequestResponseFormatType ¶
type CreateChatCompletionRequestResponseFormatType string
CreateChatCompletionRequestResponseFormatType Must be one of `text` or `json_object`.
const ( CreateChatCompletionRequestResponseFormatTypeJsonObject CreateChatCompletionRequestResponseFormatType = "json_object" CreateChatCompletionRequestResponseFormatTypeText CreateChatCompletionRequestResponseFormatType = "text" )
Defines values for CreateChatCompletionRequestResponseFormatType.
type CreateChatCompletionRequestStop0 ¶
type CreateChatCompletionRequestStop0 = string
CreateChatCompletionRequestStop0 defines model for .
type CreateChatCompletionRequestStop1 ¶
type CreateChatCompletionRequestStop1 = []string
CreateChatCompletionRequestStop1 defines model for .
type CreateChatCompletionRequest_FunctionCall ¶
type CreateChatCompletionRequest_FunctionCall struct {
// contains filtered or unexported fields
}
CreateChatCompletionRequest_FunctionCall 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.
func (CreateChatCompletionRequest_FunctionCall) AsChatCompletionFunctionCallOption ¶
func (t CreateChatCompletionRequest_FunctionCall) AsChatCompletionFunctionCallOption() (ChatCompletionFunctionCallOption, error)
AsChatCompletionFunctionCallOption returns the union data inside the CreateChatCompletionRequest_FunctionCall as a ChatCompletionFunctionCallOption
func (CreateChatCompletionRequest_FunctionCall) AsCreateChatCompletionRequestFunctionCall0 ¶
func (t CreateChatCompletionRequest_FunctionCall) AsCreateChatCompletionRequestFunctionCall0() (CreateChatCompletionRequestFunctionCall0, error)
AsCreateChatCompletionRequestFunctionCall0 returns the union data inside the CreateChatCompletionRequest_FunctionCall as a CreateChatCompletionRequestFunctionCall0
func (*CreateChatCompletionRequest_FunctionCall) FromChatCompletionFunctionCallOption ¶
func (t *CreateChatCompletionRequest_FunctionCall) FromChatCompletionFunctionCallOption(v ChatCompletionFunctionCallOption) error
FromChatCompletionFunctionCallOption overwrites any union data inside the CreateChatCompletionRequest_FunctionCall as the provided ChatCompletionFunctionCallOption
func (*CreateChatCompletionRequest_FunctionCall) FromCreateChatCompletionRequestFunctionCall0 ¶
func (t *CreateChatCompletionRequest_FunctionCall) FromCreateChatCompletionRequestFunctionCall0(v CreateChatCompletionRequestFunctionCall0) error
FromCreateChatCompletionRequestFunctionCall0 overwrites any union data inside the CreateChatCompletionRequest_FunctionCall as the provided CreateChatCompletionRequestFunctionCall0
func (CreateChatCompletionRequest_FunctionCall) MarshalJSON ¶
func (t CreateChatCompletionRequest_FunctionCall) MarshalJSON() ([]byte, error)
func (*CreateChatCompletionRequest_FunctionCall) MergeChatCompletionFunctionCallOption ¶
func (t *CreateChatCompletionRequest_FunctionCall) MergeChatCompletionFunctionCallOption(v ChatCompletionFunctionCallOption) error
MergeChatCompletionFunctionCallOption performs a merge with any union data inside the CreateChatCompletionRequest_FunctionCall, using the provided ChatCompletionFunctionCallOption
func (*CreateChatCompletionRequest_FunctionCall) MergeCreateChatCompletionRequestFunctionCall0 ¶
func (t *CreateChatCompletionRequest_FunctionCall) MergeCreateChatCompletionRequestFunctionCall0(v CreateChatCompletionRequestFunctionCall0) error
MergeCreateChatCompletionRequestFunctionCall0 performs a merge with any union data inside the CreateChatCompletionRequest_FunctionCall, using the provided CreateChatCompletionRequestFunctionCall0
func (*CreateChatCompletionRequest_FunctionCall) UnmarshalJSON ¶
func (t *CreateChatCompletionRequest_FunctionCall) UnmarshalJSON(b []byte) error
type CreateChatCompletionRequest_Model ¶
type CreateChatCompletionRequest_Model struct {
// contains filtered or unexported fields
}
CreateChatCompletionRequest_Model 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 (CreateChatCompletionRequest_Model) AsCreateChatCompletionRequestModel0 ¶
func (t CreateChatCompletionRequest_Model) AsCreateChatCompletionRequestModel0() (CreateChatCompletionRequestModel0, error)
AsCreateChatCompletionRequestModel0 returns the union data inside the CreateChatCompletionRequest_Model as a CreateChatCompletionRequestModel0
func (CreateChatCompletionRequest_Model) AsCreateChatCompletionRequestModel1 ¶
func (t CreateChatCompletionRequest_Model) AsCreateChatCompletionRequestModel1() (CreateChatCompletionRequestModel1, error)
AsCreateChatCompletionRequestModel1 returns the union data inside the CreateChatCompletionRequest_Model as a CreateChatCompletionRequestModel1
func (*CreateChatCompletionRequest_Model) FromCreateChatCompletionRequestModel0 ¶
func (t *CreateChatCompletionRequest_Model) FromCreateChatCompletionRequestModel0(v CreateChatCompletionRequestModel0) error
FromCreateChatCompletionRequestModel0 overwrites any union data inside the CreateChatCompletionRequest_Model as the provided CreateChatCompletionRequestModel0
func (*CreateChatCompletionRequest_Model) FromCreateChatCompletionRequestModel1 ¶
func (t *CreateChatCompletionRequest_Model) FromCreateChatCompletionRequestModel1(v CreateChatCompletionRequestModel1) error
FromCreateChatCompletionRequestModel1 overwrites any union data inside the CreateChatCompletionRequest_Model as the provided CreateChatCompletionRequestModel1
func (CreateChatCompletionRequest_Model) MarshalJSON ¶
func (t CreateChatCompletionRequest_Model) MarshalJSON() ([]byte, error)
func (*CreateChatCompletionRequest_Model) MergeCreateChatCompletionRequestModel0 ¶
func (t *CreateChatCompletionRequest_Model) MergeCreateChatCompletionRequestModel0(v CreateChatCompletionRequestModel0) error
MergeCreateChatCompletionRequestModel0 performs a merge with any union data inside the CreateChatCompletionRequest_Model, using the provided CreateChatCompletionRequestModel0
func (*CreateChatCompletionRequest_Model) MergeCreateChatCompletionRequestModel1 ¶
func (t *CreateChatCompletionRequest_Model) MergeCreateChatCompletionRequestModel1(v CreateChatCompletionRequestModel1) error
MergeCreateChatCompletionRequestModel1 performs a merge with any union data inside the CreateChatCompletionRequest_Model, using the provided CreateChatCompletionRequestModel1
func (*CreateChatCompletionRequest_Model) UnmarshalJSON ¶
func (t *CreateChatCompletionRequest_Model) UnmarshalJSON(b []byte) error
type CreateChatCompletionRequest_Stop ¶
type CreateChatCompletionRequest_Stop struct {
// contains filtered or unexported fields
}
CreateChatCompletionRequest_Stop Up to 4 sequences where the API will stop generating further tokens.
func (CreateChatCompletionRequest_Stop) AsCreateChatCompletionRequestStop0 ¶
func (t CreateChatCompletionRequest_Stop) AsCreateChatCompletionRequestStop0() (CreateChatCompletionRequestStop0, error)
AsCreateChatCompletionRequestStop0 returns the union data inside the CreateChatCompletionRequest_Stop as a CreateChatCompletionRequestStop0
func (CreateChatCompletionRequest_Stop) AsCreateChatCompletionRequestStop1 ¶
func (t CreateChatCompletionRequest_Stop) AsCreateChatCompletionRequestStop1() (CreateChatCompletionRequestStop1, error)
AsCreateChatCompletionRequestStop1 returns the union data inside the CreateChatCompletionRequest_Stop as a CreateChatCompletionRequestStop1
func (*CreateChatCompletionRequest_Stop) FromCreateChatCompletionRequestStop0 ¶
func (t *CreateChatCompletionRequest_Stop) FromCreateChatCompletionRequestStop0(v CreateChatCompletionRequestStop0) error
FromCreateChatCompletionRequestStop0 overwrites any union data inside the CreateChatCompletionRequest_Stop as the provided CreateChatCompletionRequestStop0
func (*CreateChatCompletionRequest_Stop) FromCreateChatCompletionRequestStop1 ¶
func (t *CreateChatCompletionRequest_Stop) FromCreateChatCompletionRequestStop1(v CreateChatCompletionRequestStop1) error
FromCreateChatCompletionRequestStop1 overwrites any union data inside the CreateChatCompletionRequest_Stop as the provided CreateChatCompletionRequestStop1
func (CreateChatCompletionRequest_Stop) MarshalJSON ¶
func (t CreateChatCompletionRequest_Stop) MarshalJSON() ([]byte, error)
func (*CreateChatCompletionRequest_Stop) MergeCreateChatCompletionRequestStop0 ¶
func (t *CreateChatCompletionRequest_Stop) MergeCreateChatCompletionRequestStop0(v CreateChatCompletionRequestStop0) error
MergeCreateChatCompletionRequestStop0 performs a merge with any union data inside the CreateChatCompletionRequest_Stop, using the provided CreateChatCompletionRequestStop0
func (*CreateChatCompletionRequest_Stop) MergeCreateChatCompletionRequestStop1 ¶
func (t *CreateChatCompletionRequest_Stop) MergeCreateChatCompletionRequestStop1(v CreateChatCompletionRequestStop1) error
MergeCreateChatCompletionRequestStop1 performs a merge with any union data inside the CreateChatCompletionRequest_Stop, using the provided CreateChatCompletionRequestStop1
func (*CreateChatCompletionRequest_Stop) UnmarshalJSON ¶
func (t *CreateChatCompletionRequest_Stop) UnmarshalJSON(b []byte) error
type CreateChatCompletionResponse ¶
type CreateChatCompletionResponse struct { // Choices A list of chat completion choices. Can be more than one if `n` is greater than 1. Choices []struct { // 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. FinishReason CreateChatCompletionResponseChoicesFinishReason `json:"finish_reason"` // Index The index of the choice in the list of choices. Index int `json:"index"` // Logprobs Log probability information for the choice. Logprobs *struct { // Content A list of message content tokens with log probability information. Content *[]ChatCompletionTokenLogprob `json:"content"` } `json:"logprobs"` // Message A chat completion message generated by the model. Message ChatCompletionResponseMessage `json:"message"` } `json:"choices"` // Created The Unix timestamp (in seconds) of when the chat completion was created. Created int `json:"created"` // Id A unique identifier for the chat completion. Id string `json:"id"` // Model The model used for the chat completion. Model string `json:"model"` // Object The object type, which is always `chat.completion`. Object CreateChatCompletionResponseObject `json:"object"` // SystemFingerprint 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 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.
type CreateChatCompletionResponseChoicesFinishReason ¶
type CreateChatCompletionResponseChoicesFinishReason string
CreateChatCompletionResponseChoicesFinishReason 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 ( CreateChatCompletionResponseChoicesFinishReasonContentFilter CreateChatCompletionResponseChoicesFinishReason = "content_filter" CreateChatCompletionResponseChoicesFinishReasonFunctionCall CreateChatCompletionResponseChoicesFinishReason = "function_call" CreateChatCompletionResponseChoicesFinishReasonLength CreateChatCompletionResponseChoicesFinishReason = "length" CreateChatCompletionResponseChoicesFinishReasonStop CreateChatCompletionResponseChoicesFinishReason = "stop" CreateChatCompletionResponseChoicesFinishReasonToolCalls CreateChatCompletionResponseChoicesFinishReason = "tool_calls" )
Defines values for CreateChatCompletionResponseChoicesFinishReason.
type CreateChatCompletionResponseObject ¶
type CreateChatCompletionResponseObject string
CreateChatCompletionResponseObject The object type, which is always `chat.completion`.
const (
CreateChatCompletionResponseObjectChatCompletion CreateChatCompletionResponseObject = "chat.completion"
)
Defines values for CreateChatCompletionResponseObject.
type CreateChatCompletionStreamResponse ¶
type CreateChatCompletionStreamResponse struct { // Choices A list of chat completion choices. Can be more than one if `n` is greater than 1. Choices []struct { // Delta A chat completion delta generated by streamed model responses. Delta ChatCompletionStreamResponseDelta `json:"delta"` // 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. FinishReason *CreateChatCompletionStreamResponseChoicesFinishReason `json:"finish_reason"` // Index The index of the choice in the list of choices. Index int `json:"index"` // Logprobs Log probability information for the choice. Logprobs *struct { // Content A list of message content tokens with log probability information. Content *[]ChatCompletionTokenLogprob `json:"content"` } `json:"logprobs"` } `json:"choices"` // Created The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp. Created int `json:"created"` // Id A unique identifier for the chat completion. Each chunk has the same ID. Id string `json:"id"` // Model The model to generate the completion. Model string `json:"model"` // Object The object type, which is always `chat.completion.chunk`. Object CreateChatCompletionStreamResponseObject `json:"object"` // SystemFingerprint 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"` }
CreateChatCompletionStreamResponse Represents a streamed chunk of a chat completion response returned by model, based on the provided input.
type CreateChatCompletionStreamResponseChoicesFinishReason ¶
type CreateChatCompletionStreamResponseChoicesFinishReason string
CreateChatCompletionStreamResponseChoicesFinishReason 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 ( CreateChatCompletionStreamResponseChoicesFinishReasonContentFilter CreateChatCompletionStreamResponseChoicesFinishReason = "content_filter" CreateChatCompletionStreamResponseChoicesFinishReasonFunctionCall CreateChatCompletionStreamResponseChoicesFinishReason = "function_call" CreateChatCompletionStreamResponseChoicesFinishReasonLength CreateChatCompletionStreamResponseChoicesFinishReason = "length" CreateChatCompletionStreamResponseChoicesFinishReasonStop CreateChatCompletionStreamResponseChoicesFinishReason = "stop" CreateChatCompletionStreamResponseChoicesFinishReasonToolCalls CreateChatCompletionStreamResponseChoicesFinishReason = "tool_calls" )
Defines values for CreateChatCompletionStreamResponseChoicesFinishReason.
type CreateChatCompletionStreamResponseObject ¶
type CreateChatCompletionStreamResponseObject string
CreateChatCompletionStreamResponseObject The object type, which is always `chat.completion.chunk`.
const (
ChatCompletionChunk CreateChatCompletionStreamResponseObject = "chat.completion.chunk"
)
Defines values for CreateChatCompletionStreamResponseObject.
type CreateCompletionJSONRequestBody ¶
type CreateCompletionJSONRequestBody = CreateCompletionRequest
CreateCompletionJSONRequestBody defines body for CreateCompletion for application/json ContentType.
type CreateCompletionRequest ¶
type CreateCompletionRequest struct { // BestOf 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 *int `json:"best_of"` // Echo Echo back the prompt in addition to the completion Echo *bool `json:"echo"` // FrequencyPenalty 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 *float32 `json:"frequency_penalty"` // LogitBias 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]int `json:"logit_bias"` // Logprobs 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 *int `json:"logprobs"` // MaxTokens 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 *int `json:"max_tokens"` // Model 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 CreateCompletionRequest_Model `json:"model"` // N 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 *int `json:"n"` // PresencePenalty 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 *float32 `json:"presence_penalty"` // 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. Prompt *CreateCompletionRequest_Prompt `json:"prompt"` // Seed 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 *int `json:"seed"` // Stop Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. Stop *CreateCompletionRequest_Stop `json:"stop"` // Stream 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 `json:"stream"` // Suffix The suffix that comes after a completion of inserted text. // // This parameter is only supported for `gpt-3.5-turbo-instruct`. Suffix *string `json:"suffix"` // Temperature 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 *float32 `json:"temperature"` // TopP 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 *float32 `json:"top_p"` // User 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"` }
CreateCompletionRequest defines model for CreateCompletionRequest.
type CreateCompletionRequestModel0 ¶
type CreateCompletionRequestModel0 = string
CreateCompletionRequestModel0 defines model for .
type CreateCompletionRequestModel1 ¶
type CreateCompletionRequestModel1 string
CreateCompletionRequestModel1 defines model for CreateCompletionRequest.Model.1.
const ( Babbage002 CreateCompletionRequestModel1 = "babbage-002" Davinci002 CreateCompletionRequestModel1 = "davinci-002" Gpt35TurboInstruct CreateCompletionRequestModel1 = "gpt-3.5-turbo-instruct" )
Defines values for CreateCompletionRequestModel1.
type CreateCompletionRequestPrompt0 ¶
type CreateCompletionRequestPrompt0 = string
CreateCompletionRequestPrompt0 defines model for .
type CreateCompletionRequestPrompt1 ¶
type CreateCompletionRequestPrompt1 = []string
CreateCompletionRequestPrompt1 defines model for .
type CreateCompletionRequestPrompt2 ¶
type CreateCompletionRequestPrompt2 = []int
CreateCompletionRequestPrompt2 defines model for .
type CreateCompletionRequestPrompt3 ¶
type CreateCompletionRequestPrompt3 = [][]int
CreateCompletionRequestPrompt3 defines model for .
type CreateCompletionRequestStop0 ¶
type CreateCompletionRequestStop0 = string
CreateCompletionRequestStop0 defines model for .
type CreateCompletionRequestStop1 ¶
type CreateCompletionRequestStop1 = []string
CreateCompletionRequestStop1 defines model for .
type CreateCompletionRequest_Model ¶
type CreateCompletionRequest_Model struct {
// contains filtered or unexported fields
}
CreateCompletionRequest_Model 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 (CreateCompletionRequest_Model) AsCreateCompletionRequestModel0 ¶
func (t CreateCompletionRequest_Model) AsCreateCompletionRequestModel0() (CreateCompletionRequestModel0, error)
AsCreateCompletionRequestModel0 returns the union data inside the CreateCompletionRequest_Model as a CreateCompletionRequestModel0
func (CreateCompletionRequest_Model) AsCreateCompletionRequestModel1 ¶
func (t CreateCompletionRequest_Model) AsCreateCompletionRequestModel1() (CreateCompletionRequestModel1, error)
AsCreateCompletionRequestModel1 returns the union data inside the CreateCompletionRequest_Model as a CreateCompletionRequestModel1
func (*CreateCompletionRequest_Model) FromCreateCompletionRequestModel0 ¶
func (t *CreateCompletionRequest_Model) FromCreateCompletionRequestModel0(v CreateCompletionRequestModel0) error
FromCreateCompletionRequestModel0 overwrites any union data inside the CreateCompletionRequest_Model as the provided CreateCompletionRequestModel0
func (*CreateCompletionRequest_Model) FromCreateCompletionRequestModel1 ¶
func (t *CreateCompletionRequest_Model) FromCreateCompletionRequestModel1(v CreateCompletionRequestModel1) error
FromCreateCompletionRequestModel1 overwrites any union data inside the CreateCompletionRequest_Model as the provided CreateCompletionRequestModel1
func (CreateCompletionRequest_Model) MarshalJSON ¶
func (t CreateCompletionRequest_Model) MarshalJSON() ([]byte, error)
func (*CreateCompletionRequest_Model) MergeCreateCompletionRequestModel0 ¶
func (t *CreateCompletionRequest_Model) MergeCreateCompletionRequestModel0(v CreateCompletionRequestModel0) error
MergeCreateCompletionRequestModel0 performs a merge with any union data inside the CreateCompletionRequest_Model, using the provided CreateCompletionRequestModel0
func (*CreateCompletionRequest_Model) MergeCreateCompletionRequestModel1 ¶
func (t *CreateCompletionRequest_Model) MergeCreateCompletionRequestModel1(v CreateCompletionRequestModel1) error
MergeCreateCompletionRequestModel1 performs a merge with any union data inside the CreateCompletionRequest_Model, using the provided CreateCompletionRequestModel1
func (*CreateCompletionRequest_Model) UnmarshalJSON ¶
func (t *CreateCompletionRequest_Model) UnmarshalJSON(b []byte) error
type CreateCompletionRequest_Prompt ¶
type CreateCompletionRequest_Prompt struct {
// contains filtered or unexported fields
}
CreateCompletionRequest_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 (CreateCompletionRequest_Prompt) AsCreateCompletionRequestPrompt0 ¶
func (t CreateCompletionRequest_Prompt) AsCreateCompletionRequestPrompt0() (CreateCompletionRequestPrompt0, error)
AsCreateCompletionRequestPrompt0 returns the union data inside the CreateCompletionRequest_Prompt as a CreateCompletionRequestPrompt0
func (CreateCompletionRequest_Prompt) AsCreateCompletionRequestPrompt1 ¶
func (t CreateCompletionRequest_Prompt) AsCreateCompletionRequestPrompt1() (CreateCompletionRequestPrompt1, error)
AsCreateCompletionRequestPrompt1 returns the union data inside the CreateCompletionRequest_Prompt as a CreateCompletionRequestPrompt1
func (CreateCompletionRequest_Prompt) AsCreateCompletionRequestPrompt2 ¶
func (t CreateCompletionRequest_Prompt) AsCreateCompletionRequestPrompt2() (CreateCompletionRequestPrompt2, error)
AsCreateCompletionRequestPrompt2 returns the union data inside the CreateCompletionRequest_Prompt as a CreateCompletionRequestPrompt2
func (CreateCompletionRequest_Prompt) AsCreateCompletionRequestPrompt3 ¶
func (t CreateCompletionRequest_Prompt) AsCreateCompletionRequestPrompt3() (CreateCompletionRequestPrompt3, error)
AsCreateCompletionRequestPrompt3 returns the union data inside the CreateCompletionRequest_Prompt as a CreateCompletionRequestPrompt3
func (*CreateCompletionRequest_Prompt) FromCreateCompletionRequestPrompt0 ¶
func (t *CreateCompletionRequest_Prompt) FromCreateCompletionRequestPrompt0(v CreateCompletionRequestPrompt0) error
FromCreateCompletionRequestPrompt0 overwrites any union data inside the CreateCompletionRequest_Prompt as the provided CreateCompletionRequestPrompt0
func (*CreateCompletionRequest_Prompt) FromCreateCompletionRequestPrompt1 ¶
func (t *CreateCompletionRequest_Prompt) FromCreateCompletionRequestPrompt1(v CreateCompletionRequestPrompt1) error
FromCreateCompletionRequestPrompt1 overwrites any union data inside the CreateCompletionRequest_Prompt as the provided CreateCompletionRequestPrompt1
func (*CreateCompletionRequest_Prompt) FromCreateCompletionRequestPrompt2 ¶
func (t *CreateCompletionRequest_Prompt) FromCreateCompletionRequestPrompt2(v CreateCompletionRequestPrompt2) error
FromCreateCompletionRequestPrompt2 overwrites any union data inside the CreateCompletionRequest_Prompt as the provided CreateCompletionRequestPrompt2
func (*CreateCompletionRequest_Prompt) FromCreateCompletionRequestPrompt3 ¶
func (t *CreateCompletionRequest_Prompt) FromCreateCompletionRequestPrompt3(v CreateCompletionRequestPrompt3) error
FromCreateCompletionRequestPrompt3 overwrites any union data inside the CreateCompletionRequest_Prompt as the provided CreateCompletionRequestPrompt3
func (CreateCompletionRequest_Prompt) MarshalJSON ¶
func (t CreateCompletionRequest_Prompt) MarshalJSON() ([]byte, error)
func (*CreateCompletionRequest_Prompt) MergeCreateCompletionRequestPrompt0 ¶
func (t *CreateCompletionRequest_Prompt) MergeCreateCompletionRequestPrompt0(v CreateCompletionRequestPrompt0) error
MergeCreateCompletionRequestPrompt0 performs a merge with any union data inside the CreateCompletionRequest_Prompt, using the provided CreateCompletionRequestPrompt0
func (*CreateCompletionRequest_Prompt) MergeCreateCompletionRequestPrompt1 ¶
func (t *CreateCompletionRequest_Prompt) MergeCreateCompletionRequestPrompt1(v CreateCompletionRequestPrompt1) error
MergeCreateCompletionRequestPrompt1 performs a merge with any union data inside the CreateCompletionRequest_Prompt, using the provided CreateCompletionRequestPrompt1
func (*CreateCompletionRequest_Prompt) MergeCreateCompletionRequestPrompt2 ¶
func (t *CreateCompletionRequest_Prompt) MergeCreateCompletionRequestPrompt2(v CreateCompletionRequestPrompt2) error
MergeCreateCompletionRequestPrompt2 performs a merge with any union data inside the CreateCompletionRequest_Prompt, using the provided CreateCompletionRequestPrompt2
func (*CreateCompletionRequest_Prompt) MergeCreateCompletionRequestPrompt3 ¶
func (t *CreateCompletionRequest_Prompt) MergeCreateCompletionRequestPrompt3(v CreateCompletionRequestPrompt3) error
MergeCreateCompletionRequestPrompt3 performs a merge with any union data inside the CreateCompletionRequest_Prompt, using the provided CreateCompletionRequestPrompt3
func (*CreateCompletionRequest_Prompt) UnmarshalJSON ¶
func (t *CreateCompletionRequest_Prompt) UnmarshalJSON(b []byte) error
type CreateCompletionRequest_Stop ¶
type CreateCompletionRequest_Stop struct {
// contains filtered or unexported fields
}
CreateCompletionRequest_Stop Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
func (CreateCompletionRequest_Stop) AsCreateCompletionRequestStop0 ¶
func (t CreateCompletionRequest_Stop) AsCreateCompletionRequestStop0() (CreateCompletionRequestStop0, error)
AsCreateCompletionRequestStop0 returns the union data inside the CreateCompletionRequest_Stop as a CreateCompletionRequestStop0
func (CreateCompletionRequest_Stop) AsCreateCompletionRequestStop1 ¶
func (t CreateCompletionRequest_Stop) AsCreateCompletionRequestStop1() (CreateCompletionRequestStop1, error)
AsCreateCompletionRequestStop1 returns the union data inside the CreateCompletionRequest_Stop as a CreateCompletionRequestStop1
func (*CreateCompletionRequest_Stop) FromCreateCompletionRequestStop0 ¶
func (t *CreateCompletionRequest_Stop) FromCreateCompletionRequestStop0(v CreateCompletionRequestStop0) error
FromCreateCompletionRequestStop0 overwrites any union data inside the CreateCompletionRequest_Stop as the provided CreateCompletionRequestStop0
func (*CreateCompletionRequest_Stop) FromCreateCompletionRequestStop1 ¶
func (t *CreateCompletionRequest_Stop) FromCreateCompletionRequestStop1(v CreateCompletionRequestStop1) error
FromCreateCompletionRequestStop1 overwrites any union data inside the CreateCompletionRequest_Stop as the provided CreateCompletionRequestStop1
func (CreateCompletionRequest_Stop) MarshalJSON ¶
func (t CreateCompletionRequest_Stop) MarshalJSON() ([]byte, error)
func (*CreateCompletionRequest_Stop) MergeCreateCompletionRequestStop0 ¶
func (t *CreateCompletionRequest_Stop) MergeCreateCompletionRequestStop0(v CreateCompletionRequestStop0) error
MergeCreateCompletionRequestStop0 performs a merge with any union data inside the CreateCompletionRequest_Stop, using the provided CreateCompletionRequestStop0
func (*CreateCompletionRequest_Stop) MergeCreateCompletionRequestStop1 ¶
func (t *CreateCompletionRequest_Stop) MergeCreateCompletionRequestStop1(v CreateCompletionRequestStop1) error
MergeCreateCompletionRequestStop1 performs a merge with any union data inside the CreateCompletionRequest_Stop, using the provided CreateCompletionRequestStop1
func (*CreateCompletionRequest_Stop) UnmarshalJSON ¶
func (t *CreateCompletionRequest_Stop) UnmarshalJSON(b []byte) error
type CreateCompletionResponse ¶
type CreateCompletionResponse struct { // Choices The list of completion choices the model generated for the input prompt. Choices []struct { // 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, // or `content_filter` if content was omitted due to a flag from our content filters. FinishReason CreateCompletionResponseChoicesFinishReason `json:"finish_reason"` Index int `json:"index"` Logprobs *struct { TextOffset *[]int `json:"text_offset,omitempty"` TokenLogprobs *[]float32 `json:"token_logprobs,omitempty"` Tokens *[]string `json:"tokens,omitempty"` TopLogprobs *[]map[string]float32 `json:"top_logprobs,omitempty"` } `json:"logprobs"` Text string `json:"text"` } `json:"choices"` // Created The Unix timestamp (in seconds) of when the completion was created. Created int `json:"created"` // Id A unique identifier for the completion. Id string `json:"id"` // Model The model used for completion. Model string `json:"model"` // Object The object type, which is always "text_completion" Object CreateCompletionResponseObject `json:"object"` // SystemFingerprint 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 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).
type CreateCompletionResponseChoicesFinishReason ¶
type CreateCompletionResponseChoicesFinishReason string
CreateCompletionResponseChoicesFinishReason 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 ( CreateCompletionResponseChoicesFinishReasonContentFilter CreateCompletionResponseChoicesFinishReason = "content_filter" CreateCompletionResponseChoicesFinishReasonLength CreateCompletionResponseChoicesFinishReason = "length" CreateCompletionResponseChoicesFinishReasonStop CreateCompletionResponseChoicesFinishReason = "stop" )
Defines values for CreateCompletionResponseChoicesFinishReason.
type CreateCompletionResponseObject ¶
type CreateCompletionResponseObject string
CreateCompletionResponseObject The object type, which is always "text_completion"
const (
TextCompletion CreateCompletionResponseObject = "text_completion"
)
Defines values for CreateCompletionResponseObject.
type CreateEmbeddingJSONRequestBody ¶
type CreateEmbeddingJSONRequestBody = CreateEmbeddingRequest
CreateEmbeddingJSONRequestBody defines body for CreateEmbedding for application/json ContentType.
type CreateEmbeddingRequest ¶
type CreateEmbeddingRequest struct { // Dimensions The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models. Dimensions *int `json:"dimensions,omitempty"` // EncodingFormat The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/). EncodingFormat *CreateEmbeddingRequestEncodingFormat `json:"encoding_format,omitempty"` // Input 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 CreateEmbeddingRequest_Input `json:"input"` // Model 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 CreateEmbeddingRequest_Model `json:"model"` // User 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"` }
CreateEmbeddingRequest defines model for CreateEmbeddingRequest.
type CreateEmbeddingRequestEncodingFormat ¶
type CreateEmbeddingRequestEncodingFormat string
CreateEmbeddingRequestEncodingFormat The format to return the embeddings in. Can be either `float` or [`base64`](https://pypi.org/project/pybase64/).
const ( Base64 CreateEmbeddingRequestEncodingFormat = "base64" Float CreateEmbeddingRequestEncodingFormat = "float" )
Defines values for CreateEmbeddingRequestEncodingFormat.
type CreateEmbeddingRequestInput0 ¶
type CreateEmbeddingRequestInput0 = string
CreateEmbeddingRequestInput0 The string that will be turned into an embedding.
type CreateEmbeddingRequestInput1 ¶
type CreateEmbeddingRequestInput1 = []string
CreateEmbeddingRequestInput1 The array of strings that will be turned into an embedding.
type CreateEmbeddingRequestInput2 ¶
type CreateEmbeddingRequestInput2 = []int
CreateEmbeddingRequestInput2 The array of integers that will be turned into an embedding.
type CreateEmbeddingRequestInput3 ¶
type CreateEmbeddingRequestInput3 = [][]int
CreateEmbeddingRequestInput3 The array of arrays containing integers that will be turned into an embedding.
type CreateEmbeddingRequestModel0 ¶
type CreateEmbeddingRequestModel0 = string
CreateEmbeddingRequestModel0 defines model for .
type CreateEmbeddingRequestModel1 ¶
type CreateEmbeddingRequestModel1 string
CreateEmbeddingRequestModel1 defines model for CreateEmbeddingRequest.Model.1.
const ( TextEmbedding3Large CreateEmbeddingRequestModel1 = "text-embedding-3-large" TextEmbedding3Small CreateEmbeddingRequestModel1 = "text-embedding-3-small" TextEmbeddingAda002 CreateEmbeddingRequestModel1 = "text-embedding-ada-002" )
Defines values for CreateEmbeddingRequestModel1.
type CreateEmbeddingRequest_Input ¶
type CreateEmbeddingRequest_Input struct {
// contains filtered or unexported fields
}
CreateEmbeddingRequest_Input 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 (CreateEmbeddingRequest_Input) AsCreateEmbeddingRequestInput0 ¶
func (t CreateEmbeddingRequest_Input) AsCreateEmbeddingRequestInput0() (CreateEmbeddingRequestInput0, error)
AsCreateEmbeddingRequestInput0 returns the union data inside the CreateEmbeddingRequest_Input as a CreateEmbeddingRequestInput0
func (CreateEmbeddingRequest_Input) AsCreateEmbeddingRequestInput1 ¶
func (t CreateEmbeddingRequest_Input) AsCreateEmbeddingRequestInput1() (CreateEmbeddingRequestInput1, error)
AsCreateEmbeddingRequestInput1 returns the union data inside the CreateEmbeddingRequest_Input as a CreateEmbeddingRequestInput1
func (CreateEmbeddingRequest_Input) AsCreateEmbeddingRequestInput2 ¶
func (t CreateEmbeddingRequest_Input) AsCreateEmbeddingRequestInput2() (CreateEmbeddingRequestInput2, error)
AsCreateEmbeddingRequestInput2 returns the union data inside the CreateEmbeddingRequest_Input as a CreateEmbeddingRequestInput2
func (CreateEmbeddingRequest_Input) AsCreateEmbeddingRequestInput3 ¶
func (t CreateEmbeddingRequest_Input) AsCreateEmbeddingRequestInput3() (CreateEmbeddingRequestInput3, error)
AsCreateEmbeddingRequestInput3 returns the union data inside the CreateEmbeddingRequest_Input as a CreateEmbeddingRequestInput3
func (*CreateEmbeddingRequest_Input) FromCreateEmbeddingRequestInput0 ¶
func (t *CreateEmbeddingRequest_Input) FromCreateEmbeddingRequestInput0(v CreateEmbeddingRequestInput0) error
FromCreateEmbeddingRequestInput0 overwrites any union data inside the CreateEmbeddingRequest_Input as the provided CreateEmbeddingRequestInput0
func (*CreateEmbeddingRequest_Input) FromCreateEmbeddingRequestInput1 ¶
func (t *CreateEmbeddingRequest_Input) FromCreateEmbeddingRequestInput1(v CreateEmbeddingRequestInput1) error
FromCreateEmbeddingRequestInput1 overwrites any union data inside the CreateEmbeddingRequest_Input as the provided CreateEmbeddingRequestInput1
func (*CreateEmbeddingRequest_Input) FromCreateEmbeddingRequestInput2 ¶
func (t *CreateEmbeddingRequest_Input) FromCreateEmbeddingRequestInput2(v CreateEmbeddingRequestInput2) error
FromCreateEmbeddingRequestInput2 overwrites any union data inside the CreateEmbeddingRequest_Input as the provided CreateEmbeddingRequestInput2
func (*CreateEmbeddingRequest_Input) FromCreateEmbeddingRequestInput3 ¶
func (t *CreateEmbeddingRequest_Input) FromCreateEmbeddingRequestInput3(v CreateEmbeddingRequestInput3) error
FromCreateEmbeddingRequestInput3 overwrites any union data inside the CreateEmbeddingRequest_Input as the provided CreateEmbeddingRequestInput3
func (CreateEmbeddingRequest_Input) MarshalJSON ¶
func (t CreateEmbeddingRequest_Input) MarshalJSON() ([]byte, error)
func (*CreateEmbeddingRequest_Input) MergeCreateEmbeddingRequestInput0 ¶
func (t *CreateEmbeddingRequest_Input) MergeCreateEmbeddingRequestInput0(v CreateEmbeddingRequestInput0) error
MergeCreateEmbeddingRequestInput0 performs a merge with any union data inside the CreateEmbeddingRequest_Input, using the provided CreateEmbeddingRequestInput0
func (*CreateEmbeddingRequest_Input) MergeCreateEmbeddingRequestInput1 ¶
func (t *CreateEmbeddingRequest_Input) MergeCreateEmbeddingRequestInput1(v CreateEmbeddingRequestInput1) error
MergeCreateEmbeddingRequestInput1 performs a merge with any union data inside the CreateEmbeddingRequest_Input, using the provided CreateEmbeddingRequestInput1
func (*CreateEmbeddingRequest_Input) MergeCreateEmbeddingRequestInput2 ¶
func (t *CreateEmbeddingRequest_Input) MergeCreateEmbeddingRequestInput2(v CreateEmbeddingRequestInput2) error
MergeCreateEmbeddingRequestInput2 performs a merge with any union data inside the CreateEmbeddingRequest_Input, using the provided CreateEmbeddingRequestInput2
func (*CreateEmbeddingRequest_Input) MergeCreateEmbeddingRequestInput3 ¶
func (t *CreateEmbeddingRequest_Input) MergeCreateEmbeddingRequestInput3(v CreateEmbeddingRequestInput3) error
MergeCreateEmbeddingRequestInput3 performs a merge with any union data inside the CreateEmbeddingRequest_Input, using the provided CreateEmbeddingRequestInput3
func (*CreateEmbeddingRequest_Input) UnmarshalJSON ¶
func (t *CreateEmbeddingRequest_Input) UnmarshalJSON(b []byte) error
type CreateEmbeddingRequest_Model ¶
type CreateEmbeddingRequest_Model struct {
// contains filtered or unexported fields
}
CreateEmbeddingRequest_Model 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 (CreateEmbeddingRequest_Model) AsCreateEmbeddingRequestModel0 ¶
func (t CreateEmbeddingRequest_Model) AsCreateEmbeddingRequestModel0() (CreateEmbeddingRequestModel0, error)
AsCreateEmbeddingRequestModel0 returns the union data inside the CreateEmbeddingRequest_Model as a CreateEmbeddingRequestModel0
func (CreateEmbeddingRequest_Model) AsCreateEmbeddingRequestModel1 ¶
func (t CreateEmbeddingRequest_Model) AsCreateEmbeddingRequestModel1() (CreateEmbeddingRequestModel1, error)
AsCreateEmbeddingRequestModel1 returns the union data inside the CreateEmbeddingRequest_Model as a CreateEmbeddingRequestModel1
func (*CreateEmbeddingRequest_Model) FromCreateEmbeddingRequestModel0 ¶
func (t *CreateEmbeddingRequest_Model) FromCreateEmbeddingRequestModel0(v CreateEmbeddingRequestModel0) error
FromCreateEmbeddingRequestModel0 overwrites any union data inside the CreateEmbeddingRequest_Model as the provided CreateEmbeddingRequestModel0
func (*CreateEmbeddingRequest_Model) FromCreateEmbeddingRequestModel1 ¶
func (t *CreateEmbeddingRequest_Model) FromCreateEmbeddingRequestModel1(v CreateEmbeddingRequestModel1) error
FromCreateEmbeddingRequestModel1 overwrites any union data inside the CreateEmbeddingRequest_Model as the provided CreateEmbeddingRequestModel1
func (CreateEmbeddingRequest_Model) MarshalJSON ¶
func (t CreateEmbeddingRequest_Model) MarshalJSON() ([]byte, error)
func (*CreateEmbeddingRequest_Model) MergeCreateEmbeddingRequestModel0 ¶
func (t *CreateEmbeddingRequest_Model) MergeCreateEmbeddingRequestModel0(v CreateEmbeddingRequestModel0) error
MergeCreateEmbeddingRequestModel0 performs a merge with any union data inside the CreateEmbeddingRequest_Model, using the provided CreateEmbeddingRequestModel0
func (*CreateEmbeddingRequest_Model) MergeCreateEmbeddingRequestModel1 ¶
func (t *CreateEmbeddingRequest_Model) MergeCreateEmbeddingRequestModel1(v CreateEmbeddingRequestModel1) error
MergeCreateEmbeddingRequestModel1 performs a merge with any union data inside the CreateEmbeddingRequest_Model, using the provided CreateEmbeddingRequestModel1
func (*CreateEmbeddingRequest_Model) UnmarshalJSON ¶
func (t *CreateEmbeddingRequest_Model) UnmarshalJSON(b []byte) error
type CreateEmbeddingResponse ¶
type CreateEmbeddingResponse struct { // Data The list of embeddings generated by the model. Data []Embedding `json:"data"` // Model The name of the model used to generate the embedding. Model string `json:"model"` // Object The object type, which is always "list". Object CreateEmbeddingResponseObject `json:"object"` // Usage The usage information for the request. Usage struct { // PromptTokens The number of tokens used by the prompt. PromptTokens int `json:"prompt_tokens"` // TotalTokens The total number of tokens used by the request. TotalTokens int `json:"total_tokens"` } `json:"usage"` }
CreateEmbeddingResponse defines model for CreateEmbeddingResponse.
type CreateEmbeddingResponseObject ¶
type CreateEmbeddingResponseObject string
CreateEmbeddingResponseObject The object type, which is always "list".
const (
CreateEmbeddingResponseObjectList CreateEmbeddingResponseObject = "list"
)
Defines values for CreateEmbeddingResponseObject.
type CreateFileMultipartRequestBody ¶
type CreateFileMultipartRequestBody = CreateFileRequest
CreateFileMultipartRequestBody defines body for CreateFile for multipart/form-data ContentType.
type CreateFileRequest ¶
type CreateFileRequest struct { // File The File object (not file name) to be uploaded. File openapi_types.File `json:"file"` // 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. Purpose CreateFileRequestPurpose `json:"purpose"` }
CreateFileRequest defines model for CreateFileRequest.
type CreateFileRequestPurpose ¶
type CreateFileRequestPurpose string
CreateFileRequestPurpose 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.
const ( CreateFileRequestPurposeAssistants CreateFileRequestPurpose = "assistants" CreateFileRequestPurposeFineTune CreateFileRequestPurpose = "fine-tune" )
Defines values for CreateFileRequestPurpose.
type CreateFineTuningJobJSONRequestBody ¶
type CreateFineTuningJobJSONRequestBody = CreateFineTuningJobRequest
CreateFineTuningJobJSONRequestBody defines body for CreateFineTuningJob for application/json ContentType.
type CreateFineTuningJobRequest ¶
type CreateFineTuningJobRequest struct { // Hyperparameters The hyperparameters used for the fine-tuning job. Hyperparameters *struct { // BatchSize Number of examples in each batch. A larger batch size means that model parameters // are updated less frequently, but with lower variance. BatchSize *CreateFineTuningJobRequest_Hyperparameters_BatchSize `json:"batch_size,omitempty"` // LearningRateMultiplier Scaling factor for the learning rate. A smaller learning rate may be useful to avoid // overfitting. LearningRateMultiplier *CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier `json:"learning_rate_multiplier,omitempty"` // NEpochs The number of epochs to train the model for. An epoch refers to one full cycle // through the training dataset. NEpochs *CreateFineTuningJobRequest_Hyperparameters_NEpochs `json:"n_epochs,omitempty"` } `json:"hyperparameters,omitempty"` // Model 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 CreateFineTuningJobRequest_Model `json:"model"` // Suffix 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 `json:"suffix"` // TrainingFile 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"` // ValidationFile 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"` }
CreateFineTuningJobRequest defines model for CreateFineTuningJobRequest.
type CreateFineTuningJobRequestHyperparametersBatchSize0 ¶
type CreateFineTuningJobRequestHyperparametersBatchSize0 string
CreateFineTuningJobRequestHyperparametersBatchSize0 defines model for CreateFineTuningJobRequest.Hyperparameters.BatchSize.0.
const (
CreateFineTuningJobRequestHyperparametersBatchSize0Auto CreateFineTuningJobRequestHyperparametersBatchSize0 = "auto"
)
Defines values for CreateFineTuningJobRequestHyperparametersBatchSize0.
type CreateFineTuningJobRequestHyperparametersBatchSize1 ¶
type CreateFineTuningJobRequestHyperparametersBatchSize1 = int
CreateFineTuningJobRequestHyperparametersBatchSize1 defines model for .
type CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0 ¶
type CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0 string
CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0 defines model for CreateFineTuningJobRequest.Hyperparameters.LearningRateMultiplier.0.
const (
CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0Auto CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0 = "auto"
)
Defines values for CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0.
type CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1 ¶
type CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1 = float32
CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1 defines model for .
type CreateFineTuningJobRequestHyperparametersNEpochs0 ¶
type CreateFineTuningJobRequestHyperparametersNEpochs0 string
CreateFineTuningJobRequestHyperparametersNEpochs0 defines model for CreateFineTuningJobRequest.Hyperparameters.NEpochs.0.
const (
CreateFineTuningJobRequestHyperparametersNEpochs0Auto CreateFineTuningJobRequestHyperparametersNEpochs0 = "auto"
)
Defines values for CreateFineTuningJobRequestHyperparametersNEpochs0.
type CreateFineTuningJobRequestHyperparametersNEpochs1 ¶
type CreateFineTuningJobRequestHyperparametersNEpochs1 = int
CreateFineTuningJobRequestHyperparametersNEpochs1 defines model for .
type CreateFineTuningJobRequestModel0 ¶
type CreateFineTuningJobRequestModel0 = string
CreateFineTuningJobRequestModel0 defines model for .
type CreateFineTuningJobRequestModel1 ¶
type CreateFineTuningJobRequestModel1 string
CreateFineTuningJobRequestModel1 defines model for CreateFineTuningJobRequest.Model.1.
const ( CreateFineTuningJobRequestModel1Babbage002 CreateFineTuningJobRequestModel1 = "babbage-002" CreateFineTuningJobRequestModel1Davinci002 CreateFineTuningJobRequestModel1 = "davinci-002" CreateFineTuningJobRequestModel1Gpt35Turbo CreateFineTuningJobRequestModel1 = "gpt-3.5-turbo" )
Defines values for CreateFineTuningJobRequestModel1.
type CreateFineTuningJobRequest_Hyperparameters_BatchSize ¶
type CreateFineTuningJobRequest_Hyperparameters_BatchSize struct {
// contains filtered or unexported fields
}
CreateFineTuningJobRequest_Hyperparameters_BatchSize Number of examples in each batch. A larger batch size means that model parameters are updated less frequently, but with lower variance.
func (CreateFineTuningJobRequest_Hyperparameters_BatchSize) AsCreateFineTuningJobRequestHyperparametersBatchSize0 ¶
func (t CreateFineTuningJobRequest_Hyperparameters_BatchSize) AsCreateFineTuningJobRequestHyperparametersBatchSize0() (CreateFineTuningJobRequestHyperparametersBatchSize0, error)
AsCreateFineTuningJobRequestHyperparametersBatchSize0 returns the union data inside the CreateFineTuningJobRequest_Hyperparameters_BatchSize as a CreateFineTuningJobRequestHyperparametersBatchSize0
func (CreateFineTuningJobRequest_Hyperparameters_BatchSize) AsCreateFineTuningJobRequestHyperparametersBatchSize1 ¶
func (t CreateFineTuningJobRequest_Hyperparameters_BatchSize) AsCreateFineTuningJobRequestHyperparametersBatchSize1() (CreateFineTuningJobRequestHyperparametersBatchSize1, error)
AsCreateFineTuningJobRequestHyperparametersBatchSize1 returns the union data inside the CreateFineTuningJobRequest_Hyperparameters_BatchSize as a CreateFineTuningJobRequestHyperparametersBatchSize1
func (*CreateFineTuningJobRequest_Hyperparameters_BatchSize) FromCreateFineTuningJobRequestHyperparametersBatchSize0 ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_BatchSize) FromCreateFineTuningJobRequestHyperparametersBatchSize0(v CreateFineTuningJobRequestHyperparametersBatchSize0) error
FromCreateFineTuningJobRequestHyperparametersBatchSize0 overwrites any union data inside the CreateFineTuningJobRequest_Hyperparameters_BatchSize as the provided CreateFineTuningJobRequestHyperparametersBatchSize0
func (*CreateFineTuningJobRequest_Hyperparameters_BatchSize) FromCreateFineTuningJobRequestHyperparametersBatchSize1 ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_BatchSize) FromCreateFineTuningJobRequestHyperparametersBatchSize1(v CreateFineTuningJobRequestHyperparametersBatchSize1) error
FromCreateFineTuningJobRequestHyperparametersBatchSize1 overwrites any union data inside the CreateFineTuningJobRequest_Hyperparameters_BatchSize as the provided CreateFineTuningJobRequestHyperparametersBatchSize1
func (CreateFineTuningJobRequest_Hyperparameters_BatchSize) MarshalJSON ¶
func (t CreateFineTuningJobRequest_Hyperparameters_BatchSize) MarshalJSON() ([]byte, error)
func (*CreateFineTuningJobRequest_Hyperparameters_BatchSize) MergeCreateFineTuningJobRequestHyperparametersBatchSize0 ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_BatchSize) MergeCreateFineTuningJobRequestHyperparametersBatchSize0(v CreateFineTuningJobRequestHyperparametersBatchSize0) error
MergeCreateFineTuningJobRequestHyperparametersBatchSize0 performs a merge with any union data inside the CreateFineTuningJobRequest_Hyperparameters_BatchSize, using the provided CreateFineTuningJobRequestHyperparametersBatchSize0
func (*CreateFineTuningJobRequest_Hyperparameters_BatchSize) MergeCreateFineTuningJobRequestHyperparametersBatchSize1 ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_BatchSize) MergeCreateFineTuningJobRequestHyperparametersBatchSize1(v CreateFineTuningJobRequestHyperparametersBatchSize1) error
MergeCreateFineTuningJobRequestHyperparametersBatchSize1 performs a merge with any union data inside the CreateFineTuningJobRequest_Hyperparameters_BatchSize, using the provided CreateFineTuningJobRequestHyperparametersBatchSize1
func (*CreateFineTuningJobRequest_Hyperparameters_BatchSize) UnmarshalJSON ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_BatchSize) UnmarshalJSON(b []byte) error
type CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier ¶
type CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier struct {
// contains filtered or unexported fields
}
CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier Scaling factor for the learning rate. A smaller learning rate may be useful to avoid overfitting.
func (CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) AsCreateFineTuningJobRequestHyperparametersLearningRateMultiplier0 ¶
func (t CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) AsCreateFineTuningJobRequestHyperparametersLearningRateMultiplier0() (CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0, error)
AsCreateFineTuningJobRequestHyperparametersLearningRateMultiplier0 returns the union data inside the CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier as a CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0
func (CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) AsCreateFineTuningJobRequestHyperparametersLearningRateMultiplier1 ¶
func (t CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) AsCreateFineTuningJobRequestHyperparametersLearningRateMultiplier1() (CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1, error)
AsCreateFineTuningJobRequestHyperparametersLearningRateMultiplier1 returns the union data inside the CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier as a CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1
func (*CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) FromCreateFineTuningJobRequestHyperparametersLearningRateMultiplier0 ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) FromCreateFineTuningJobRequestHyperparametersLearningRateMultiplier0(v CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0) error
FromCreateFineTuningJobRequestHyperparametersLearningRateMultiplier0 overwrites any union data inside the CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier as the provided CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0
func (*CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) FromCreateFineTuningJobRequestHyperparametersLearningRateMultiplier1 ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) FromCreateFineTuningJobRequestHyperparametersLearningRateMultiplier1(v CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1) error
FromCreateFineTuningJobRequestHyperparametersLearningRateMultiplier1 overwrites any union data inside the CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier as the provided CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1
func (CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) MarshalJSON ¶
func (t CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) MarshalJSON() ([]byte, error)
func (*CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) MergeCreateFineTuningJobRequestHyperparametersLearningRateMultiplier0 ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) MergeCreateFineTuningJobRequestHyperparametersLearningRateMultiplier0(v CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0) error
MergeCreateFineTuningJobRequestHyperparametersLearningRateMultiplier0 performs a merge with any union data inside the CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier, using the provided CreateFineTuningJobRequestHyperparametersLearningRateMultiplier0
func (*CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) MergeCreateFineTuningJobRequestHyperparametersLearningRateMultiplier1 ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) MergeCreateFineTuningJobRequestHyperparametersLearningRateMultiplier1(v CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1) error
MergeCreateFineTuningJobRequestHyperparametersLearningRateMultiplier1 performs a merge with any union data inside the CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier, using the provided CreateFineTuningJobRequestHyperparametersLearningRateMultiplier1
func (*CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) UnmarshalJSON ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_LearningRateMultiplier) UnmarshalJSON(b []byte) error
type CreateFineTuningJobRequest_Hyperparameters_NEpochs ¶
type CreateFineTuningJobRequest_Hyperparameters_NEpochs struct {
// contains filtered or unexported fields
}
CreateFineTuningJobRequest_Hyperparameters_NEpochs The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset.
func (CreateFineTuningJobRequest_Hyperparameters_NEpochs) AsCreateFineTuningJobRequestHyperparametersNEpochs0 ¶
func (t CreateFineTuningJobRequest_Hyperparameters_NEpochs) AsCreateFineTuningJobRequestHyperparametersNEpochs0() (CreateFineTuningJobRequestHyperparametersNEpochs0, error)
AsCreateFineTuningJobRequestHyperparametersNEpochs0 returns the union data inside the CreateFineTuningJobRequest_Hyperparameters_NEpochs as a CreateFineTuningJobRequestHyperparametersNEpochs0
func (CreateFineTuningJobRequest_Hyperparameters_NEpochs) AsCreateFineTuningJobRequestHyperparametersNEpochs1 ¶
func (t CreateFineTuningJobRequest_Hyperparameters_NEpochs) AsCreateFineTuningJobRequestHyperparametersNEpochs1() (CreateFineTuningJobRequestHyperparametersNEpochs1, error)
AsCreateFineTuningJobRequestHyperparametersNEpochs1 returns the union data inside the CreateFineTuningJobRequest_Hyperparameters_NEpochs as a CreateFineTuningJobRequestHyperparametersNEpochs1
func (*CreateFineTuningJobRequest_Hyperparameters_NEpochs) FromCreateFineTuningJobRequestHyperparametersNEpochs0 ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_NEpochs) FromCreateFineTuningJobRequestHyperparametersNEpochs0(v CreateFineTuningJobRequestHyperparametersNEpochs0) error
FromCreateFineTuningJobRequestHyperparametersNEpochs0 overwrites any union data inside the CreateFineTuningJobRequest_Hyperparameters_NEpochs as the provided CreateFineTuningJobRequestHyperparametersNEpochs0
func (*CreateFineTuningJobRequest_Hyperparameters_NEpochs) FromCreateFineTuningJobRequestHyperparametersNEpochs1 ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_NEpochs) FromCreateFineTuningJobRequestHyperparametersNEpochs1(v CreateFineTuningJobRequestHyperparametersNEpochs1) error
FromCreateFineTuningJobRequestHyperparametersNEpochs1 overwrites any union data inside the CreateFineTuningJobRequest_Hyperparameters_NEpochs as the provided CreateFineTuningJobRequestHyperparametersNEpochs1
func (CreateFineTuningJobRequest_Hyperparameters_NEpochs) MarshalJSON ¶
func (t CreateFineTuningJobRequest_Hyperparameters_NEpochs) MarshalJSON() ([]byte, error)
func (*CreateFineTuningJobRequest_Hyperparameters_NEpochs) MergeCreateFineTuningJobRequestHyperparametersNEpochs0 ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_NEpochs) MergeCreateFineTuningJobRequestHyperparametersNEpochs0(v CreateFineTuningJobRequestHyperparametersNEpochs0) error
MergeCreateFineTuningJobRequestHyperparametersNEpochs0 performs a merge with any union data inside the CreateFineTuningJobRequest_Hyperparameters_NEpochs, using the provided CreateFineTuningJobRequestHyperparametersNEpochs0
func (*CreateFineTuningJobRequest_Hyperparameters_NEpochs) MergeCreateFineTuningJobRequestHyperparametersNEpochs1 ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_NEpochs) MergeCreateFineTuningJobRequestHyperparametersNEpochs1(v CreateFineTuningJobRequestHyperparametersNEpochs1) error
MergeCreateFineTuningJobRequestHyperparametersNEpochs1 performs a merge with any union data inside the CreateFineTuningJobRequest_Hyperparameters_NEpochs, using the provided CreateFineTuningJobRequestHyperparametersNEpochs1
func (*CreateFineTuningJobRequest_Hyperparameters_NEpochs) UnmarshalJSON ¶
func (t *CreateFineTuningJobRequest_Hyperparameters_NEpochs) UnmarshalJSON(b []byte) error
type CreateFineTuningJobRequest_Model ¶
type CreateFineTuningJobRequest_Model struct {
// contains filtered or unexported fields
}
CreateFineTuningJobRequest_Model 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 (CreateFineTuningJobRequest_Model) AsCreateFineTuningJobRequestModel0 ¶
func (t CreateFineTuningJobRequest_Model) AsCreateFineTuningJobRequestModel0() (CreateFineTuningJobRequestModel0, error)
AsCreateFineTuningJobRequestModel0 returns the union data inside the CreateFineTuningJobRequest_Model as a CreateFineTuningJobRequestModel0
func (CreateFineTuningJobRequest_Model) AsCreateFineTuningJobRequestModel1 ¶
func (t CreateFineTuningJobRequest_Model) AsCreateFineTuningJobRequestModel1() (CreateFineTuningJobRequestModel1, error)
AsCreateFineTuningJobRequestModel1 returns the union data inside the CreateFineTuningJobRequest_Model as a CreateFineTuningJobRequestModel1
func (*CreateFineTuningJobRequest_Model) FromCreateFineTuningJobRequestModel0 ¶
func (t *CreateFineTuningJobRequest_Model) FromCreateFineTuningJobRequestModel0(v CreateFineTuningJobRequestModel0) error
FromCreateFineTuningJobRequestModel0 overwrites any union data inside the CreateFineTuningJobRequest_Model as the provided CreateFineTuningJobRequestModel0
func (*CreateFineTuningJobRequest_Model) FromCreateFineTuningJobRequestModel1 ¶
func (t *CreateFineTuningJobRequest_Model) FromCreateFineTuningJobRequestModel1(v CreateFineTuningJobRequestModel1) error
FromCreateFineTuningJobRequestModel1 overwrites any union data inside the CreateFineTuningJobRequest_Model as the provided CreateFineTuningJobRequestModel1
func (CreateFineTuningJobRequest_Model) MarshalJSON ¶
func (t CreateFineTuningJobRequest_Model) MarshalJSON() ([]byte, error)
func (*CreateFineTuningJobRequest_Model) MergeCreateFineTuningJobRequestModel0 ¶
func (t *CreateFineTuningJobRequest_Model) MergeCreateFineTuningJobRequestModel0(v CreateFineTuningJobRequestModel0) error
MergeCreateFineTuningJobRequestModel0 performs a merge with any union data inside the CreateFineTuningJobRequest_Model, using the provided CreateFineTuningJobRequestModel0
func (*CreateFineTuningJobRequest_Model) MergeCreateFineTuningJobRequestModel1 ¶
func (t *CreateFineTuningJobRequest_Model) MergeCreateFineTuningJobRequestModel1(v CreateFineTuningJobRequestModel1) error
MergeCreateFineTuningJobRequestModel1 performs a merge with any union data inside the CreateFineTuningJobRequest_Model, using the provided CreateFineTuningJobRequestModel1
func (*CreateFineTuningJobRequest_Model) UnmarshalJSON ¶
func (t *CreateFineTuningJobRequest_Model) UnmarshalJSON(b []byte) error
type CreateImageEditMultipartRequestBody ¶
type CreateImageEditMultipartRequestBody = CreateImageEditRequest
CreateImageEditMultipartRequestBody defines body for CreateImageEdit for multipart/form-data ContentType.
type CreateImageEditRequest ¶
type CreateImageEditRequest struct { // Image 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 openapi_types.File `json:"image"` // Mask 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 *openapi_types.File `json:"mask,omitempty"` // Model The model to use for image generation. Only `dall-e-2` is supported at this time. Model *CreateImageEditRequest_Model `json:"model"` // N The number of images to generate. Must be between 1 and 10. N *int `json:"n"` // Prompt A text description of the desired image(s). The maximum length is 1000 characters. Prompt string `json:"prompt"` // ResponseFormat The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. ResponseFormat *CreateImageEditRequestResponseFormat `json:"response_format"` // Size The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. Size *CreateImageEditRequestSize `json:"size"` // User 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"` }
CreateImageEditRequest defines model for CreateImageEditRequest.
type CreateImageEditRequestModel0 ¶
type CreateImageEditRequestModel0 = string
CreateImageEditRequestModel0 defines model for .
type CreateImageEditRequestModel1 ¶
type CreateImageEditRequestModel1 string
CreateImageEditRequestModel1 defines model for CreateImageEditRequest.Model.1.
const (
CreateImageEditRequestModel1DallE2 CreateImageEditRequestModel1 = "dall-e-2"
)
Defines values for CreateImageEditRequestModel1.
type CreateImageEditRequestResponseFormat ¶
type CreateImageEditRequestResponseFormat string
CreateImageEditRequestResponseFormat The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.
const ( CreateImageEditRequestResponseFormatB64Json CreateImageEditRequestResponseFormat = "b64_json" CreateImageEditRequestResponseFormatUrl CreateImageEditRequestResponseFormat = "url" )
Defines values for CreateImageEditRequestResponseFormat.
type CreateImageEditRequestSize ¶
type CreateImageEditRequestSize string
CreateImageEditRequestSize The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
const ( CreateImageEditRequestSizeN1024x1024 CreateImageEditRequestSize = "1024x1024" CreateImageEditRequestSizeN256x256 CreateImageEditRequestSize = "256x256" CreateImageEditRequestSizeN512x512 CreateImageEditRequestSize = "512x512" )
Defines values for CreateImageEditRequestSize.
type CreateImageEditRequest_Model ¶
type CreateImageEditRequest_Model struct {
// contains filtered or unexported fields
}
CreateImageEditRequest_Model The model to use for image generation. Only `dall-e-2` is supported at this time.
func (CreateImageEditRequest_Model) AsCreateImageEditRequestModel0 ¶
func (t CreateImageEditRequest_Model) AsCreateImageEditRequestModel0() (CreateImageEditRequestModel0, error)
AsCreateImageEditRequestModel0 returns the union data inside the CreateImageEditRequest_Model as a CreateImageEditRequestModel0
func (CreateImageEditRequest_Model) AsCreateImageEditRequestModel1 ¶
func (t CreateImageEditRequest_Model) AsCreateImageEditRequestModel1() (CreateImageEditRequestModel1, error)
AsCreateImageEditRequestModel1 returns the union data inside the CreateImageEditRequest_Model as a CreateImageEditRequestModel1
func (*CreateImageEditRequest_Model) FromCreateImageEditRequestModel0 ¶
func (t *CreateImageEditRequest_Model) FromCreateImageEditRequestModel0(v CreateImageEditRequestModel0) error
FromCreateImageEditRequestModel0 overwrites any union data inside the CreateImageEditRequest_Model as the provided CreateImageEditRequestModel0
func (*CreateImageEditRequest_Model) FromCreateImageEditRequestModel1 ¶
func (t *CreateImageEditRequest_Model) FromCreateImageEditRequestModel1(v CreateImageEditRequestModel1) error
FromCreateImageEditRequestModel1 overwrites any union data inside the CreateImageEditRequest_Model as the provided CreateImageEditRequestModel1
func (CreateImageEditRequest_Model) MarshalJSON ¶
func (t CreateImageEditRequest_Model) MarshalJSON() ([]byte, error)
func (*CreateImageEditRequest_Model) MergeCreateImageEditRequestModel0 ¶
func (t *CreateImageEditRequest_Model) MergeCreateImageEditRequestModel0(v CreateImageEditRequestModel0) error
MergeCreateImageEditRequestModel0 performs a merge with any union data inside the CreateImageEditRequest_Model, using the provided CreateImageEditRequestModel0
func (*CreateImageEditRequest_Model) MergeCreateImageEditRequestModel1 ¶
func (t *CreateImageEditRequest_Model) MergeCreateImageEditRequestModel1(v CreateImageEditRequestModel1) error
MergeCreateImageEditRequestModel1 performs a merge with any union data inside the CreateImageEditRequest_Model, using the provided CreateImageEditRequestModel1
func (*CreateImageEditRequest_Model) UnmarshalJSON ¶
func (t *CreateImageEditRequest_Model) UnmarshalJSON(b []byte) error
type CreateImageJSONRequestBody ¶
type CreateImageJSONRequestBody = CreateImageRequest
CreateImageJSONRequestBody defines body for CreateImage for application/json ContentType.
type CreateImageRequest ¶
type CreateImageRequest struct { // Model The model to use for image generation. Model *CreateImageRequest_Model `json:"model"` // N The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported. N *int `json:"n"` // Prompt 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"` // 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`. Quality *CreateImageRequestQuality `json:"quality,omitempty"` // ResponseFormat The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. ResponseFormat *CreateImageRequestResponseFormat `json:"response_format"` // Size 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 `json:"size"` // 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`. Style *CreateImageRequestStyle `json:"style"` // User 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"` }
CreateImageRequest defines model for CreateImageRequest.
type CreateImageRequestModel0 ¶
type CreateImageRequestModel0 = string
CreateImageRequestModel0 defines model for .
type CreateImageRequestModel1 ¶
type CreateImageRequestModel1 string
CreateImageRequestModel1 defines model for CreateImageRequest.Model.1.
const ( CreateImageRequestModel1DallE2 CreateImageRequestModel1 = "dall-e-2" CreateImageRequestModel1DallE3 CreateImageRequestModel1 = "dall-e-3" )
Defines values for CreateImageRequestModel1.
type CreateImageRequestQuality ¶
type CreateImageRequestQuality string
CreateImageRequestQuality 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`.
const ( Hd CreateImageRequestQuality = "hd" Standard CreateImageRequestQuality = "standard" )
Defines values for CreateImageRequestQuality.
type CreateImageRequestResponseFormat ¶
type CreateImageRequestResponseFormat string
CreateImageRequestResponseFormat The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.
const ( CreateImageRequestResponseFormatB64Json CreateImageRequestResponseFormat = "b64_json" CreateImageRequestResponseFormatUrl CreateImageRequestResponseFormat = "url" )
Defines values for CreateImageRequestResponseFormat.
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 ( CreateImageRequestSizeN1024x1024 CreateImageRequestSize = "1024x1024" CreateImageRequestSizeN1024x1792 CreateImageRequestSize = "1024x1792" CreateImageRequestSizeN1792x1024 CreateImageRequestSize = "1792x1024" CreateImageRequestSizeN256x256 CreateImageRequestSize = "256x256" CreateImageRequestSizeN512x512 CreateImageRequestSize = "512x512" )
Defines values for CreateImageRequestSize.
type CreateImageRequestStyle ¶
type CreateImageRequestStyle string
CreateImageRequestStyle 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`.
const ( Natural CreateImageRequestStyle = "natural" Vivid CreateImageRequestStyle = "vivid" )
Defines values for CreateImageRequestStyle.
type CreateImageRequest_Model ¶
type CreateImageRequest_Model struct {
// contains filtered or unexported fields
}
CreateImageRequest_Model The model to use for image generation.
func (CreateImageRequest_Model) AsCreateImageRequestModel0 ¶
func (t CreateImageRequest_Model) AsCreateImageRequestModel0() (CreateImageRequestModel0, error)
AsCreateImageRequestModel0 returns the union data inside the CreateImageRequest_Model as a CreateImageRequestModel0
func (CreateImageRequest_Model) AsCreateImageRequestModel1 ¶
func (t CreateImageRequest_Model) AsCreateImageRequestModel1() (CreateImageRequestModel1, error)
AsCreateImageRequestModel1 returns the union data inside the CreateImageRequest_Model as a CreateImageRequestModel1
func (*CreateImageRequest_Model) FromCreateImageRequestModel0 ¶
func (t *CreateImageRequest_Model) FromCreateImageRequestModel0(v CreateImageRequestModel0) error
FromCreateImageRequestModel0 overwrites any union data inside the CreateImageRequest_Model as the provided CreateImageRequestModel0
func (*CreateImageRequest_Model) FromCreateImageRequestModel1 ¶
func (t *CreateImageRequest_Model) FromCreateImageRequestModel1(v CreateImageRequestModel1) error
FromCreateImageRequestModel1 overwrites any union data inside the CreateImageRequest_Model as the provided CreateImageRequestModel1
func (CreateImageRequest_Model) MarshalJSON ¶
func (t CreateImageRequest_Model) MarshalJSON() ([]byte, error)
func (*CreateImageRequest_Model) MergeCreateImageRequestModel0 ¶
func (t *CreateImageRequest_Model) MergeCreateImageRequestModel0(v CreateImageRequestModel0) error
MergeCreateImageRequestModel0 performs a merge with any union data inside the CreateImageRequest_Model, using the provided CreateImageRequestModel0
func (*CreateImageRequest_Model) MergeCreateImageRequestModel1 ¶
func (t *CreateImageRequest_Model) MergeCreateImageRequestModel1(v CreateImageRequestModel1) error
MergeCreateImageRequestModel1 performs a merge with any union data inside the CreateImageRequest_Model, using the provided CreateImageRequestModel1
func (*CreateImageRequest_Model) UnmarshalJSON ¶
func (t *CreateImageRequest_Model) UnmarshalJSON(b []byte) error
type CreateImageVariationMultipartRequestBody ¶
type CreateImageVariationMultipartRequestBody = CreateImageVariationRequest
CreateImageVariationMultipartRequestBody defines body for CreateImageVariation for multipart/form-data ContentType.
type CreateImageVariationRequest ¶
type CreateImageVariationRequest struct { // Image The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square. Image openapi_types.File `json:"image"` // Model The model to use for image generation. Only `dall-e-2` is supported at this time. Model *CreateImageVariationRequest_Model `json:"model"` // N The number of images to generate. Must be between 1 and 10. For `dall-e-3`, only `n=1` is supported. N *int `json:"n"` // ResponseFormat The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated. ResponseFormat *CreateImageVariationRequestResponseFormat `json:"response_format"` // Size The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. Size *CreateImageVariationRequestSize `json:"size"` // User 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"` }
CreateImageVariationRequest defines model for CreateImageVariationRequest.
type CreateImageVariationRequestModel0 ¶
type CreateImageVariationRequestModel0 = string
CreateImageVariationRequestModel0 defines model for .
type CreateImageVariationRequestModel1 ¶
type CreateImageVariationRequestModel1 string
CreateImageVariationRequestModel1 defines model for CreateImageVariationRequest.Model.1.
const (
DallE2 CreateImageVariationRequestModel1 = "dall-e-2"
)
Defines values for CreateImageVariationRequestModel1.
type CreateImageVariationRequestResponseFormat ¶
type CreateImageVariationRequestResponseFormat string
CreateImageVariationRequestResponseFormat The format in which the generated images are returned. Must be one of `url` or `b64_json`. URLs are only valid for 60 minutes after the image has been generated.
const ( B64Json CreateImageVariationRequestResponseFormat = "b64_json" Url CreateImageVariationRequestResponseFormat = "url" )
Defines values for CreateImageVariationRequestResponseFormat.
type CreateImageVariationRequestSize ¶
type CreateImageVariationRequestSize string
CreateImageVariationRequestSize The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
const ( N1024x1024 CreateImageVariationRequestSize = "1024x1024" N256x256 CreateImageVariationRequestSize = "256x256" N512x512 CreateImageVariationRequestSize = "512x512" )
Defines values for CreateImageVariationRequestSize.
type CreateImageVariationRequest_Model ¶
type CreateImageVariationRequest_Model struct {
// contains filtered or unexported fields
}
CreateImageVariationRequest_Model The model to use for image generation. Only `dall-e-2` is supported at this time.
func (CreateImageVariationRequest_Model) AsCreateImageVariationRequestModel0 ¶
func (t CreateImageVariationRequest_Model) AsCreateImageVariationRequestModel0() (CreateImageVariationRequestModel0, error)
AsCreateImageVariationRequestModel0 returns the union data inside the CreateImageVariationRequest_Model as a CreateImageVariationRequestModel0
func (CreateImageVariationRequest_Model) AsCreateImageVariationRequestModel1 ¶
func (t CreateImageVariationRequest_Model) AsCreateImageVariationRequestModel1() (CreateImageVariationRequestModel1, error)
AsCreateImageVariationRequestModel1 returns the union data inside the CreateImageVariationRequest_Model as a CreateImageVariationRequestModel1
func (*CreateImageVariationRequest_Model) FromCreateImageVariationRequestModel0 ¶
func (t *CreateImageVariationRequest_Model) FromCreateImageVariationRequestModel0(v CreateImageVariationRequestModel0) error
FromCreateImageVariationRequestModel0 overwrites any union data inside the CreateImageVariationRequest_Model as the provided CreateImageVariationRequestModel0
func (*CreateImageVariationRequest_Model) FromCreateImageVariationRequestModel1 ¶
func (t *CreateImageVariationRequest_Model) FromCreateImageVariationRequestModel1(v CreateImageVariationRequestModel1) error
FromCreateImageVariationRequestModel1 overwrites any union data inside the CreateImageVariationRequest_Model as the provided CreateImageVariationRequestModel1
func (CreateImageVariationRequest_Model) MarshalJSON ¶
func (t CreateImageVariationRequest_Model) MarshalJSON() ([]byte, error)
func (*CreateImageVariationRequest_Model) MergeCreateImageVariationRequestModel0 ¶
func (t *CreateImageVariationRequest_Model) MergeCreateImageVariationRequestModel0(v CreateImageVariationRequestModel0) error
MergeCreateImageVariationRequestModel0 performs a merge with any union data inside the CreateImageVariationRequest_Model, using the provided CreateImageVariationRequestModel0
func (*CreateImageVariationRequest_Model) MergeCreateImageVariationRequestModel1 ¶
func (t *CreateImageVariationRequest_Model) MergeCreateImageVariationRequestModel1(v CreateImageVariationRequestModel1) error
MergeCreateImageVariationRequestModel1 performs a merge with any union data inside the CreateImageVariationRequest_Model, using the provided CreateImageVariationRequestModel1
func (*CreateImageVariationRequest_Model) UnmarshalJSON ¶
func (t *CreateImageVariationRequest_Model) UnmarshalJSON(b []byte) error
type CreateMessageJSONRequestBody ¶
type CreateMessageJSONRequestBody = CreateMessageRequest
CreateMessageJSONRequestBody defines body for CreateMessage for application/json ContentType.
type CreateMessageRequest ¶
type CreateMessageRequest struct { // Content The content of the message. Content string `json:"content"` // FileIds 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"` // 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. Metadata *map[string]interface{} `json:"metadata"` // Role The role of the entity that is creating the message. Currently only `user` is supported. Role CreateMessageRequestRole `json:"role"` }
CreateMessageRequest defines model for CreateMessageRequest.
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"
)
Defines values for CreateMessageRequestRole.
type CreateModerationJSONRequestBody ¶
type CreateModerationJSONRequestBody = CreateModerationRequest
CreateModerationJSONRequestBody defines body for CreateModeration for application/json ContentType.
type CreateModerationRequest ¶
type CreateModerationRequest struct { // Input The input text to classify Input CreateModerationRequest_Input `json:"input"` // Model 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 *CreateModerationRequest_Model `json:"model,omitempty"` }
CreateModerationRequest defines model for CreateModerationRequest.
type CreateModerationRequestInput0 ¶
type CreateModerationRequestInput0 = string
CreateModerationRequestInput0 defines model for .
type CreateModerationRequestInput1 ¶
type CreateModerationRequestInput1 = []string
CreateModerationRequestInput1 defines model for .
type CreateModerationRequestModel0 ¶
type CreateModerationRequestModel0 = string
CreateModerationRequestModel0 defines model for .
type CreateModerationRequestModel1 ¶
type CreateModerationRequestModel1 string
CreateModerationRequestModel1 defines model for CreateModerationRequest.Model.1.
const ( TextModerationLatest CreateModerationRequestModel1 = "text-moderation-latest" TextModerationStable CreateModerationRequestModel1 = "text-moderation-stable" )
Defines values for CreateModerationRequestModel1.
type CreateModerationRequest_Input ¶
type CreateModerationRequest_Input struct {
// contains filtered or unexported fields
}
CreateModerationRequest_Input The input text to classify
func (CreateModerationRequest_Input) AsCreateModerationRequestInput0 ¶
func (t CreateModerationRequest_Input) AsCreateModerationRequestInput0() (CreateModerationRequestInput0, error)
AsCreateModerationRequestInput0 returns the union data inside the CreateModerationRequest_Input as a CreateModerationRequestInput0
func (CreateModerationRequest_Input) AsCreateModerationRequestInput1 ¶
func (t CreateModerationRequest_Input) AsCreateModerationRequestInput1() (CreateModerationRequestInput1, error)
AsCreateModerationRequestInput1 returns the union data inside the CreateModerationRequest_Input as a CreateModerationRequestInput1
func (*CreateModerationRequest_Input) FromCreateModerationRequestInput0 ¶
func (t *CreateModerationRequest_Input) FromCreateModerationRequestInput0(v CreateModerationRequestInput0) error
FromCreateModerationRequestInput0 overwrites any union data inside the CreateModerationRequest_Input as the provided CreateModerationRequestInput0
func (*CreateModerationRequest_Input) FromCreateModerationRequestInput1 ¶
func (t *CreateModerationRequest_Input) FromCreateModerationRequestInput1(v CreateModerationRequestInput1) error
FromCreateModerationRequestInput1 overwrites any union data inside the CreateModerationRequest_Input as the provided CreateModerationRequestInput1
func (CreateModerationRequest_Input) MarshalJSON ¶
func (t CreateModerationRequest_Input) MarshalJSON() ([]byte, error)
func (*CreateModerationRequest_Input) MergeCreateModerationRequestInput0 ¶
func (t *CreateModerationRequest_Input) MergeCreateModerationRequestInput0(v CreateModerationRequestInput0) error
MergeCreateModerationRequestInput0 performs a merge with any union data inside the CreateModerationRequest_Input, using the provided CreateModerationRequestInput0
func (*CreateModerationRequest_Input) MergeCreateModerationRequestInput1 ¶
func (t *CreateModerationRequest_Input) MergeCreateModerationRequestInput1(v CreateModerationRequestInput1) error
MergeCreateModerationRequestInput1 performs a merge with any union data inside the CreateModerationRequest_Input, using the provided CreateModerationRequestInput1
func (*CreateModerationRequest_Input) UnmarshalJSON ¶
func (t *CreateModerationRequest_Input) UnmarshalJSON(b []byte) error
type CreateModerationRequest_Model ¶
type CreateModerationRequest_Model struct {
// contains filtered or unexported fields
}
CreateModerationRequest_Model 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 (CreateModerationRequest_Model) AsCreateModerationRequestModel0 ¶
func (t CreateModerationRequest_Model) AsCreateModerationRequestModel0() (CreateModerationRequestModel0, error)
AsCreateModerationRequestModel0 returns the union data inside the CreateModerationRequest_Model as a CreateModerationRequestModel0
func (CreateModerationRequest_Model) AsCreateModerationRequestModel1 ¶
func (t CreateModerationRequest_Model) AsCreateModerationRequestModel1() (CreateModerationRequestModel1, error)
AsCreateModerationRequestModel1 returns the union data inside the CreateModerationRequest_Model as a CreateModerationRequestModel1
func (*CreateModerationRequest_Model) FromCreateModerationRequestModel0 ¶
func (t *CreateModerationRequest_Model) FromCreateModerationRequestModel0(v CreateModerationRequestModel0) error
FromCreateModerationRequestModel0 overwrites any union data inside the CreateModerationRequest_Model as the provided CreateModerationRequestModel0
func (*CreateModerationRequest_Model) FromCreateModerationRequestModel1 ¶
func (t *CreateModerationRequest_Model) FromCreateModerationRequestModel1(v CreateModerationRequestModel1) error
FromCreateModerationRequestModel1 overwrites any union data inside the CreateModerationRequest_Model as the provided CreateModerationRequestModel1
func (CreateModerationRequest_Model) MarshalJSON ¶
func (t CreateModerationRequest_Model) MarshalJSON() ([]byte, error)
func (*CreateModerationRequest_Model) MergeCreateModerationRequestModel0 ¶
func (t *CreateModerationRequest_Model) MergeCreateModerationRequestModel0(v CreateModerationRequestModel0) error
MergeCreateModerationRequestModel0 performs a merge with any union data inside the CreateModerationRequest_Model, using the provided CreateModerationRequestModel0
func (*CreateModerationRequest_Model) MergeCreateModerationRequestModel1 ¶
func (t *CreateModerationRequest_Model) MergeCreateModerationRequestModel1(v CreateModerationRequestModel1) error
MergeCreateModerationRequestModel1 performs a merge with any union data inside the CreateModerationRequest_Model, using the provided CreateModerationRequestModel1
func (*CreateModerationRequest_Model) UnmarshalJSON ¶
func (t *CreateModerationRequest_Model) UnmarshalJSON(b []byte) error
type CreateModerationResponse ¶
type CreateModerationResponse struct { // Id The unique identifier for the moderation request. Id string `json:"id"` // Model The model used to generate the moderation results. Model string `json:"model"` // Results A list of moderation objects. Results []struct { // Categories A list of the categories, and whether they are flagged or not. Categories struct { // Harassment Content that expresses, incites, or promotes harassing language towards any target. Harassment bool `json:"harassment"` // Harassmentthreatening Harassment content that also includes violence or serious harm towards any target. Harassmentthreatening bool `json:"harassment/threatening"` // Hate 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"` // Hatethreatening 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"` // SelfHarm Content that promotes, encourages, or depicts acts of self-harm, such as suicide, cutting, and eating disorders. SelfHarm bool `json:"self-harm"` // SelfHarminstructions 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"` // SelfHarmintent 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"` // Sexual 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"` // Sexualminors Sexual content that includes an individual who is under 18 years old. Sexualminors bool `json:"sexual/minors"` // Violence Content that depicts death, violence, or physical injury. Violence bool `json:"violence"` // Violencegraphic Content that depicts death, violence, or physical injury in graphic detail. Violencegraphic bool `json:"violence/graphic"` } `json:"categories"` // CategoryScores A list of the categories along with their scores as predicted by model. CategoryScores struct { // Harassment The score for the category 'harassment'. Harassment float32 `json:"harassment"` // Harassmentthreatening The score for the category 'harassment/threatening'. Harassmentthreatening float32 `json:"harassment/threatening"` // Hate The score for the category 'hate'. Hate float32 `json:"hate"` // Hatethreatening The score for the category 'hate/threatening'. Hatethreatening float32 `json:"hate/threatening"` // SelfHarm The score for the category 'self-harm'. SelfHarm float32 `json:"self-harm"` // SelfHarminstructions The score for the category 'self-harm/instructions'. SelfHarminstructions float32 `json:"self-harm/instructions"` // SelfHarmintent The score for the category 'self-harm/intent'. SelfHarmintent float32 `json:"self-harm/intent"` // Sexual The score for the category 'sexual'. Sexual float32 `json:"sexual"` // Sexualminors The score for the category 'sexual/minors'. Sexualminors float32 `json:"sexual/minors"` // Violence The score for the category 'violence'. Violence float32 `json:"violence"` // Violencegraphic The score for the category 'violence/graphic'. Violencegraphic float32 `json:"violence/graphic"` } `json:"category_scores"` // Flagged Whether any of the below categories are flagged. Flagged bool `json:"flagged"` } `json:"results"` }
CreateModerationResponse Represents if a given text input is potentially harmful.
type CreateRunJSONRequestBody ¶
type CreateRunJSONRequestBody = CreateRunRequest
CreateRunJSONRequestBody defines body for CreateRun for application/json ContentType.
type CreateRunRequest ¶
type CreateRunRequest struct { // AdditionalInstructions 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"` // AssistantId The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. AssistantId string `json:"assistant_id"` // Instructions 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"` // 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. Metadata *map[string]interface{} `json:"metadata"` // Model 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"` // Stream If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. Stream *bool `json:"stream"` // Tools Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. Tools *[]CreateRunRequest_Tools_Item `json:"tools"` }
CreateRunRequest defines model for CreateRunRequest.
type CreateRunRequest_Tools_Item ¶
type CreateRunRequest_Tools_Item struct {
// contains filtered or unexported fields
}
CreateRunRequest_Tools_Item defines model for CreateRunRequest.tools.Item.
func (CreateRunRequest_Tools_Item) AsAssistantToolsCode ¶
func (t CreateRunRequest_Tools_Item) AsAssistantToolsCode() (AssistantToolsCode, error)
AsAssistantToolsCode returns the union data inside the CreateRunRequest_Tools_Item as a AssistantToolsCode
func (CreateRunRequest_Tools_Item) AsAssistantToolsFunction ¶
func (t CreateRunRequest_Tools_Item) AsAssistantToolsFunction() (AssistantToolsFunction, error)
AsAssistantToolsFunction returns the union data inside the CreateRunRequest_Tools_Item as a AssistantToolsFunction
func (CreateRunRequest_Tools_Item) AsAssistantToolsRetrieval ¶
func (t CreateRunRequest_Tools_Item) AsAssistantToolsRetrieval() (AssistantToolsRetrieval, error)
AsAssistantToolsRetrieval returns the union data inside the CreateRunRequest_Tools_Item as a AssistantToolsRetrieval
func (*CreateRunRequest_Tools_Item) FromAssistantToolsCode ¶
func (t *CreateRunRequest_Tools_Item) FromAssistantToolsCode(v AssistantToolsCode) error
FromAssistantToolsCode overwrites any union data inside the CreateRunRequest_Tools_Item as the provided AssistantToolsCode
func (*CreateRunRequest_Tools_Item) FromAssistantToolsFunction ¶
func (t *CreateRunRequest_Tools_Item) FromAssistantToolsFunction(v AssistantToolsFunction) error
FromAssistantToolsFunction overwrites any union data inside the CreateRunRequest_Tools_Item as the provided AssistantToolsFunction
func (*CreateRunRequest_Tools_Item) FromAssistantToolsRetrieval ¶
func (t *CreateRunRequest_Tools_Item) FromAssistantToolsRetrieval(v AssistantToolsRetrieval) error
FromAssistantToolsRetrieval overwrites any union data inside the CreateRunRequest_Tools_Item as the provided AssistantToolsRetrieval
func (CreateRunRequest_Tools_Item) MarshalJSON ¶
func (t CreateRunRequest_Tools_Item) MarshalJSON() ([]byte, error)
func (*CreateRunRequest_Tools_Item) MergeAssistantToolsCode ¶
func (t *CreateRunRequest_Tools_Item) MergeAssistantToolsCode(v AssistantToolsCode) error
MergeAssistantToolsCode performs a merge with any union data inside the CreateRunRequest_Tools_Item, using the provided AssistantToolsCode
func (*CreateRunRequest_Tools_Item) MergeAssistantToolsFunction ¶
func (t *CreateRunRequest_Tools_Item) MergeAssistantToolsFunction(v AssistantToolsFunction) error
MergeAssistantToolsFunction performs a merge with any union data inside the CreateRunRequest_Tools_Item, using the provided AssistantToolsFunction
func (*CreateRunRequest_Tools_Item) MergeAssistantToolsRetrieval ¶
func (t *CreateRunRequest_Tools_Item) MergeAssistantToolsRetrieval(v AssistantToolsRetrieval) error
MergeAssistantToolsRetrieval performs a merge with any union data inside the CreateRunRequest_Tools_Item, using the provided AssistantToolsRetrieval
func (*CreateRunRequest_Tools_Item) UnmarshalJSON ¶
func (t *CreateRunRequest_Tools_Item) UnmarshalJSON(b []byte) error
type CreateSpeechJSONRequestBody ¶
type CreateSpeechJSONRequestBody = CreateSpeechRequest
CreateSpeechJSONRequestBody defines body for CreateSpeech for application/json ContentType.
type CreateSpeechRequest ¶
type CreateSpeechRequest struct { // Input The text to generate audio for. The maximum length is 4096 characters. Input string `json:"input"` // Model One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd` Model CreateSpeechRequest_Model `json:"model"` // ResponseFormat The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`. ResponseFormat *CreateSpeechRequestResponseFormat `json:"response_format,omitempty"` // Speed The speed of the generated audio. Select a value from `0.25` to `4.0`. `1.0` is the default. Speed *float32 `json:"speed,omitempty"` // 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). Voice CreateSpeechRequestVoice `json:"voice"` }
CreateSpeechRequest defines model for CreateSpeechRequest.
type CreateSpeechRequestModel0 ¶
type CreateSpeechRequestModel0 = string
CreateSpeechRequestModel0 defines model for .
type CreateSpeechRequestModel1 ¶
type CreateSpeechRequestModel1 string
CreateSpeechRequestModel1 defines model for CreateSpeechRequest.Model.1.
const ( Tts1 CreateSpeechRequestModel1 = "tts-1" Tts1Hd CreateSpeechRequestModel1 = "tts-1-hd" )
Defines values for CreateSpeechRequestModel1.
type CreateSpeechRequestResponseFormat ¶
type CreateSpeechRequestResponseFormat string
CreateSpeechRequestResponseFormat The format to audio in. Supported formats are `mp3`, `opus`, `aac`, `flac`, `wav`, and `pcm`.
const ( Aac CreateSpeechRequestResponseFormat = "aac" Flac CreateSpeechRequestResponseFormat = "flac" Mp3 CreateSpeechRequestResponseFormat = "mp3" Opus CreateSpeechRequestResponseFormat = "opus" Pcm CreateSpeechRequestResponseFormat = "pcm" Wav CreateSpeechRequestResponseFormat = "wav" )
Defines values for CreateSpeechRequestResponseFormat.
type CreateSpeechRequestVoice ¶
type CreateSpeechRequestVoice string
CreateSpeechRequestVoice 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).
const ( Alloy CreateSpeechRequestVoice = "alloy" Echo CreateSpeechRequestVoice = "echo" Fable CreateSpeechRequestVoice = "fable" Nova CreateSpeechRequestVoice = "nova" Onyx CreateSpeechRequestVoice = "onyx" Shimmer CreateSpeechRequestVoice = "shimmer" )
Defines values for CreateSpeechRequestVoice.
type CreateSpeechRequest_Model ¶
type CreateSpeechRequest_Model struct {
// contains filtered or unexported fields
}
CreateSpeechRequest_Model One of the available [TTS models](/docs/models/tts): `tts-1` or `tts-1-hd`
func (CreateSpeechRequest_Model) AsCreateSpeechRequestModel0 ¶
func (t CreateSpeechRequest_Model) AsCreateSpeechRequestModel0() (CreateSpeechRequestModel0, error)
AsCreateSpeechRequestModel0 returns the union data inside the CreateSpeechRequest_Model as a CreateSpeechRequestModel0
func (CreateSpeechRequest_Model) AsCreateSpeechRequestModel1 ¶
func (t CreateSpeechRequest_Model) AsCreateSpeechRequestModel1() (CreateSpeechRequestModel1, error)
AsCreateSpeechRequestModel1 returns the union data inside the CreateSpeechRequest_Model as a CreateSpeechRequestModel1
func (*CreateSpeechRequest_Model) FromCreateSpeechRequestModel0 ¶
func (t *CreateSpeechRequest_Model) FromCreateSpeechRequestModel0(v CreateSpeechRequestModel0) error
FromCreateSpeechRequestModel0 overwrites any union data inside the CreateSpeechRequest_Model as the provided CreateSpeechRequestModel0
func (*CreateSpeechRequest_Model) FromCreateSpeechRequestModel1 ¶
func (t *CreateSpeechRequest_Model) FromCreateSpeechRequestModel1(v CreateSpeechRequestModel1) error
FromCreateSpeechRequestModel1 overwrites any union data inside the CreateSpeechRequest_Model as the provided CreateSpeechRequestModel1
func (CreateSpeechRequest_Model) MarshalJSON ¶
func (t CreateSpeechRequest_Model) MarshalJSON() ([]byte, error)
func (*CreateSpeechRequest_Model) MergeCreateSpeechRequestModel0 ¶
func (t *CreateSpeechRequest_Model) MergeCreateSpeechRequestModel0(v CreateSpeechRequestModel0) error
MergeCreateSpeechRequestModel0 performs a merge with any union data inside the CreateSpeechRequest_Model, using the provided CreateSpeechRequestModel0
func (*CreateSpeechRequest_Model) MergeCreateSpeechRequestModel1 ¶
func (t *CreateSpeechRequest_Model) MergeCreateSpeechRequestModel1(v CreateSpeechRequestModel1) error
MergeCreateSpeechRequestModel1 performs a merge with any union data inside the CreateSpeechRequest_Model, using the provided CreateSpeechRequestModel1
func (*CreateSpeechRequest_Model) UnmarshalJSON ¶
func (t *CreateSpeechRequest_Model) UnmarshalJSON(b []byte) error
type CreateThreadAndRunJSONRequestBody ¶
type CreateThreadAndRunJSONRequestBody = CreateThreadAndRunRequest
CreateThreadAndRunJSONRequestBody defines body for CreateThreadAndRun for application/json ContentType.
type CreateThreadAndRunRequest ¶
type CreateThreadAndRunRequest struct { // AssistantId The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run. AssistantId string `json:"assistant_id"` // Instructions Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis. Instructions *string `json:"instructions"` // 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. Metadata *map[string]interface{} `json:"metadata"` // Model 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"` // Stream If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. Stream *bool `json:"stream"` Thread *CreateThreadRequest `json:"thread,omitempty"` // Tools Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis. Tools *[]CreateThreadAndRunRequest_Tools_Item `json:"tools"` }
CreateThreadAndRunRequest defines model for CreateThreadAndRunRequest.
type CreateThreadAndRunRequest_Tools_Item ¶
type CreateThreadAndRunRequest_Tools_Item struct {
// contains filtered or unexported fields
}
CreateThreadAndRunRequest_Tools_Item defines model for CreateThreadAndRunRequest.tools.Item.
func (CreateThreadAndRunRequest_Tools_Item) AsAssistantToolsCode ¶
func (t CreateThreadAndRunRequest_Tools_Item) AsAssistantToolsCode() (AssistantToolsCode, error)
AsAssistantToolsCode returns the union data inside the CreateThreadAndRunRequest_Tools_Item as a AssistantToolsCode
func (CreateThreadAndRunRequest_Tools_Item) AsAssistantToolsFunction ¶
func (t CreateThreadAndRunRequest_Tools_Item) AsAssistantToolsFunction() (AssistantToolsFunction, error)
AsAssistantToolsFunction returns the union data inside the CreateThreadAndRunRequest_Tools_Item as a AssistantToolsFunction
func (CreateThreadAndRunRequest_Tools_Item) AsAssistantToolsRetrieval ¶
func (t CreateThreadAndRunRequest_Tools_Item) AsAssistantToolsRetrieval() (AssistantToolsRetrieval, error)
AsAssistantToolsRetrieval returns the union data inside the CreateThreadAndRunRequest_Tools_Item as a AssistantToolsRetrieval
func (*CreateThreadAndRunRequest_Tools_Item) FromAssistantToolsCode ¶
func (t *CreateThreadAndRunRequest_Tools_Item) FromAssistantToolsCode(v AssistantToolsCode) error
FromAssistantToolsCode overwrites any union data inside the CreateThreadAndRunRequest_Tools_Item as the provided AssistantToolsCode
func (*CreateThreadAndRunRequest_Tools_Item) FromAssistantToolsFunction ¶
func (t *CreateThreadAndRunRequest_Tools_Item) FromAssistantToolsFunction(v AssistantToolsFunction) error
FromAssistantToolsFunction overwrites any union data inside the CreateThreadAndRunRequest_Tools_Item as the provided AssistantToolsFunction
func (*CreateThreadAndRunRequest_Tools_Item) FromAssistantToolsRetrieval ¶
func (t *CreateThreadAndRunRequest_Tools_Item) FromAssistantToolsRetrieval(v AssistantToolsRetrieval) error
FromAssistantToolsRetrieval overwrites any union data inside the CreateThreadAndRunRequest_Tools_Item as the provided AssistantToolsRetrieval
func (CreateThreadAndRunRequest_Tools_Item) MarshalJSON ¶
func (t CreateThreadAndRunRequest_Tools_Item) MarshalJSON() ([]byte, error)
func (*CreateThreadAndRunRequest_Tools_Item) MergeAssistantToolsCode ¶
func (t *CreateThreadAndRunRequest_Tools_Item) MergeAssistantToolsCode(v AssistantToolsCode) error
MergeAssistantToolsCode performs a merge with any union data inside the CreateThreadAndRunRequest_Tools_Item, using the provided AssistantToolsCode
func (*CreateThreadAndRunRequest_Tools_Item) MergeAssistantToolsFunction ¶
func (t *CreateThreadAndRunRequest_Tools_Item) MergeAssistantToolsFunction(v AssistantToolsFunction) error
MergeAssistantToolsFunction performs a merge with any union data inside the CreateThreadAndRunRequest_Tools_Item, using the provided AssistantToolsFunction
func (*CreateThreadAndRunRequest_Tools_Item) MergeAssistantToolsRetrieval ¶
func (t *CreateThreadAndRunRequest_Tools_Item) MergeAssistantToolsRetrieval(v AssistantToolsRetrieval) error
MergeAssistantToolsRetrieval performs a merge with any union data inside the CreateThreadAndRunRequest_Tools_Item, using the provided AssistantToolsRetrieval
func (*CreateThreadAndRunRequest_Tools_Item) UnmarshalJSON ¶
func (t *CreateThreadAndRunRequest_Tools_Item) UnmarshalJSON(b []byte) error
type CreateThreadJSONRequestBody ¶
type CreateThreadJSONRequestBody = CreateThreadRequest
CreateThreadJSONRequestBody defines body for CreateThread for application/json ContentType.
type CreateThreadRequest ¶
type CreateThreadRequest struct { // Messages A list of [messages](/docs/api-reference/messages) to start the thread with. Messages *[]CreateMessageRequest `json:"messages,omitempty"` // 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. Metadata *map[string]interface{} `json:"metadata"` }
CreateThreadRequest defines model for CreateThreadRequest.
type CreateTranscriptionMultipartRequestBody ¶
type CreateTranscriptionMultipartRequestBody = CreateTranscriptionRequest
CreateTranscriptionMultipartRequestBody defines body for CreateTranscription for multipart/form-data ContentType.
type CreateTranscriptionRequest ¶
type CreateTranscriptionRequest struct { // File 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 openapi_types.File `json:"file"` // Language 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 `json:"language,omitempty"` // Model ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available. Model CreateTranscriptionRequest_Model `json:"model"` // Prompt 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 `json:"prompt,omitempty"` // ResponseFormat The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`. ResponseFormat *CreateTranscriptionRequestResponseFormat `json:"response_format,omitempty"` // Temperature 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 *float32 `json:"temperature,omitempty"` // TimestampGranularities The timestamp granularities to populate for this transcription. `response_format` must be set `verbose_json` to use timestamp granularities. Either or both of these options are supported: `word`, or `segment`. Note: There is no additional latency for segment timestamps, but generating word timestamps incurs additional latency. TimestampGranularities *[]CreateTranscriptionRequestTimestampGranularities `json:"timestamp_granularities[],omitempty"` }
CreateTranscriptionRequest defines model for CreateTranscriptionRequest.
type CreateTranscriptionRequestModel0 ¶
type CreateTranscriptionRequestModel0 = string
CreateTranscriptionRequestModel0 defines model for .
type CreateTranscriptionRequestModel1 ¶
type CreateTranscriptionRequestModel1 string
CreateTranscriptionRequestModel1 defines model for CreateTranscriptionRequest.Model.1.
const (
CreateTranscriptionRequestModel1Whisper1 CreateTranscriptionRequestModel1 = "whisper-1"
)
Defines values for CreateTranscriptionRequestModel1.
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" CreateTranscriptionRequestResponseFormatSrt CreateTranscriptionRequestResponseFormat = "srt" CreateTranscriptionRequestResponseFormatText CreateTranscriptionRequestResponseFormat = "text" CreateTranscriptionRequestResponseFormatVerboseJson CreateTranscriptionRequestResponseFormat = "verbose_json" CreateTranscriptionRequestResponseFormatVtt CreateTranscriptionRequestResponseFormat = "vtt" )
Defines values for CreateTranscriptionRequestResponseFormat.
type CreateTranscriptionRequestTimestampGranularities ¶
type CreateTranscriptionRequestTimestampGranularities string
CreateTranscriptionRequestTimestampGranularities defines model for CreateTranscriptionRequest.TimestampGranularities.
const ( Segment CreateTranscriptionRequestTimestampGranularities = "segment" Word CreateTranscriptionRequestTimestampGranularities = "word" )
Defines values for CreateTranscriptionRequestTimestampGranularities.
type CreateTranscriptionRequest_Model ¶
type CreateTranscriptionRequest_Model struct {
// contains filtered or unexported fields
}
CreateTranscriptionRequest_Model ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.
func (CreateTranscriptionRequest_Model) AsCreateTranscriptionRequestModel0 ¶
func (t CreateTranscriptionRequest_Model) AsCreateTranscriptionRequestModel0() (CreateTranscriptionRequestModel0, error)
AsCreateTranscriptionRequestModel0 returns the union data inside the CreateTranscriptionRequest_Model as a CreateTranscriptionRequestModel0
func (CreateTranscriptionRequest_Model) AsCreateTranscriptionRequestModel1 ¶
func (t CreateTranscriptionRequest_Model) AsCreateTranscriptionRequestModel1() (CreateTranscriptionRequestModel1, error)
AsCreateTranscriptionRequestModel1 returns the union data inside the CreateTranscriptionRequest_Model as a CreateTranscriptionRequestModel1
func (*CreateTranscriptionRequest_Model) FromCreateTranscriptionRequestModel0 ¶
func (t *CreateTranscriptionRequest_Model) FromCreateTranscriptionRequestModel0(v CreateTranscriptionRequestModel0) error
FromCreateTranscriptionRequestModel0 overwrites any union data inside the CreateTranscriptionRequest_Model as the provided CreateTranscriptionRequestModel0
func (*CreateTranscriptionRequest_Model) FromCreateTranscriptionRequestModel1 ¶
func (t *CreateTranscriptionRequest_Model) FromCreateTranscriptionRequestModel1(v CreateTranscriptionRequestModel1) error
FromCreateTranscriptionRequestModel1 overwrites any union data inside the CreateTranscriptionRequest_Model as the provided CreateTranscriptionRequestModel1
func (CreateTranscriptionRequest_Model) MarshalJSON ¶
func (t CreateTranscriptionRequest_Model) MarshalJSON() ([]byte, error)
func (*CreateTranscriptionRequest_Model) MergeCreateTranscriptionRequestModel0 ¶
func (t *CreateTranscriptionRequest_Model) MergeCreateTranscriptionRequestModel0(v CreateTranscriptionRequestModel0) error
MergeCreateTranscriptionRequestModel0 performs a merge with any union data inside the CreateTranscriptionRequest_Model, using the provided CreateTranscriptionRequestModel0
func (*CreateTranscriptionRequest_Model) MergeCreateTranscriptionRequestModel1 ¶
func (t *CreateTranscriptionRequest_Model) MergeCreateTranscriptionRequestModel1(v CreateTranscriptionRequestModel1) error
MergeCreateTranscriptionRequestModel1 performs a merge with any union data inside the CreateTranscriptionRequest_Model, using the provided CreateTranscriptionRequestModel1
func (*CreateTranscriptionRequest_Model) UnmarshalJSON ¶
func (t *CreateTranscriptionRequest_Model) UnmarshalJSON(b []byte) error
type CreateTranscriptionResponseJson ¶
type CreateTranscriptionResponseJson struct { // Text The transcribed text. Text string `json:"text"` }
CreateTranscriptionResponseJson Represents a transcription response returned by model, based on the provided input.
type CreateTranscriptionResponseVerboseJson ¶
type CreateTranscriptionResponseVerboseJson struct { // Duration The duration of the input audio. Duration string `json:"duration"` // Language The language of the input audio. Language string `json:"language"` // Segments Segments of the transcribed text and their corresponding details. Segments *[]TranscriptionSegment `json:"segments,omitempty"` // Text The transcribed text. Text string `json:"text"` // Words Extracted words and their corresponding timestamps. Words *[]TranscriptionWord `json:"words,omitempty"` }
CreateTranscriptionResponseVerboseJson Represents a verbose json transcription response returned by model, based on the provided input.
type CreateTranslationMultipartRequestBody ¶
type CreateTranslationMultipartRequestBody = CreateTranslationRequest
CreateTranslationMultipartRequestBody defines body for CreateTranslation for multipart/form-data ContentType.
type CreateTranslationRequest ¶
type CreateTranslationRequest struct { // File The audio file object (not file name) translate, in one of these formats: flac, mp3, mp4, mpeg, mpga, m4a, ogg, wav, or webm. File openapi_types.File `json:"file"` // Model ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available. Model CreateTranslationRequest_Model `json:"model"` // Prompt 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 `json:"prompt,omitempty"` // ResponseFormat The format of the transcript output, in one of these options: `json`, `text`, `srt`, `verbose_json`, or `vtt`. ResponseFormat *string `json:"response_format,omitempty"` // Temperature 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 *float32 `json:"temperature,omitempty"` }
CreateTranslationRequest defines model for CreateTranslationRequest.
type CreateTranslationRequestModel0 ¶
type CreateTranslationRequestModel0 = string
CreateTranslationRequestModel0 defines model for .
type CreateTranslationRequestModel1 ¶
type CreateTranslationRequestModel1 string
CreateTranslationRequestModel1 defines model for CreateTranslationRequest.Model.1.
const (
CreateTranslationRequestModel1Whisper1 CreateTranslationRequestModel1 = "whisper-1"
)
Defines values for CreateTranslationRequestModel1.
type CreateTranslationRequest_Model ¶
type CreateTranslationRequest_Model struct {
// contains filtered or unexported fields
}
CreateTranslationRequest_Model ID of the model to use. Only `whisper-1` (which is powered by our open source Whisper V2 model) is currently available.
func (CreateTranslationRequest_Model) AsCreateTranslationRequestModel0 ¶
func (t CreateTranslationRequest_Model) AsCreateTranslationRequestModel0() (CreateTranslationRequestModel0, error)
AsCreateTranslationRequestModel0 returns the union data inside the CreateTranslationRequest_Model as a CreateTranslationRequestModel0
func (CreateTranslationRequest_Model) AsCreateTranslationRequestModel1 ¶
func (t CreateTranslationRequest_Model) AsCreateTranslationRequestModel1() (CreateTranslationRequestModel1, error)
AsCreateTranslationRequestModel1 returns the union data inside the CreateTranslationRequest_Model as a CreateTranslationRequestModel1
func (*CreateTranslationRequest_Model) FromCreateTranslationRequestModel0 ¶
func (t *CreateTranslationRequest_Model) FromCreateTranslationRequestModel0(v CreateTranslationRequestModel0) error
FromCreateTranslationRequestModel0 overwrites any union data inside the CreateTranslationRequest_Model as the provided CreateTranslationRequestModel0
func (*CreateTranslationRequest_Model) FromCreateTranslationRequestModel1 ¶
func (t *CreateTranslationRequest_Model) FromCreateTranslationRequestModel1(v CreateTranslationRequestModel1) error
FromCreateTranslationRequestModel1 overwrites any union data inside the CreateTranslationRequest_Model as the provided CreateTranslationRequestModel1
func (CreateTranslationRequest_Model) MarshalJSON ¶
func (t CreateTranslationRequest_Model) MarshalJSON() ([]byte, error)
func (*CreateTranslationRequest_Model) MergeCreateTranslationRequestModel0 ¶
func (t *CreateTranslationRequest_Model) MergeCreateTranslationRequestModel0(v CreateTranslationRequestModel0) error
MergeCreateTranslationRequestModel0 performs a merge with any union data inside the CreateTranslationRequest_Model, using the provided CreateTranslationRequestModel0
func (*CreateTranslationRequest_Model) MergeCreateTranslationRequestModel1 ¶
func (t *CreateTranslationRequest_Model) MergeCreateTranslationRequestModel1(v CreateTranslationRequestModel1) error
MergeCreateTranslationRequestModel1 performs a merge with any union data inside the CreateTranslationRequest_Model, using the provided CreateTranslationRequestModel1
func (*CreateTranslationRequest_Model) UnmarshalJSON ¶
func (t *CreateTranslationRequest_Model) UnmarshalJSON(b []byte) error
type CreateTranslationResponseJson ¶
type CreateTranslationResponseJson struct {
Text string `json:"text"`
}
CreateTranslationResponseJson defines model for CreateTranslationResponseJson.
type CreateTranslationResponseVerboseJson ¶
type CreateTranslationResponseVerboseJson struct { // Duration The duration of the input audio. Duration string `json:"duration"` // Language The language of the output translation (always `english`). Language string `json:"language"` // Segments Segments of the translated text and their corresponding details. Segments *[]TranscriptionSegment `json:"segments,omitempty"` // Text The translated text. Text string `json:"text"` }
CreateTranslationResponseVerboseJson defines model for CreateTranslationResponseVerboseJson.
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.
type DeleteAssistantFileResponseObject ¶
type DeleteAssistantFileResponseObject string
DeleteAssistantFileResponseObject defines model for DeleteAssistantFileResponse.Object.
const (
AssistantFileDeleted DeleteAssistantFileResponseObject = "assistant.file.deleted"
)
Defines values for DeleteAssistantFileResponseObject.
type DeleteAssistantResponse ¶
type DeleteAssistantResponse struct { Deleted bool `json:"deleted"` Id string `json:"id"` Object DeleteAssistantResponseObject `json:"object"` }
DeleteAssistantResponse defines model for DeleteAssistantResponse.
type DeleteAssistantResponseObject ¶
type DeleteAssistantResponseObject string
DeleteAssistantResponseObject defines model for DeleteAssistantResponse.Object.
const (
AssistantDeleted DeleteAssistantResponseObject = "assistant.deleted"
)
Defines values for DeleteAssistantResponseObject.
type DeleteFileResponse ¶
type DeleteFileResponse struct { Deleted bool `json:"deleted"` Id string `json:"id"` Object DeleteFileResponseObject `json:"object"` }
DeleteFileResponse defines model for DeleteFileResponse.
type DeleteFileResponseObject ¶
type DeleteFileResponseObject string
DeleteFileResponseObject defines model for DeleteFileResponse.Object.
const (
DeleteFileResponseObjectFile DeleteFileResponseObject = "file"
)
Defines values for DeleteFileResponseObject.
type DeleteMessageResponse ¶
type DeleteMessageResponse struct { Deleted bool `json:"deleted"` Id string `json:"id"` Object DeleteMessageResponseObject `json:"object"` }
DeleteMessageResponse defines model for DeleteMessageResponse.
type DeleteMessageResponseObject ¶
type DeleteMessageResponseObject string
DeleteMessageResponseObject defines model for DeleteMessageResponse.Object.
const (
ThreadMessageDeleted DeleteMessageResponseObject = "thread.message.deleted"
)
Defines values for DeleteMessageResponseObject.
type DeleteModelResponse ¶
type DeleteModelResponse struct { Deleted bool `json:"deleted"` Id string `json:"id"` Object string `json:"object"` }
DeleteModelResponse defines model for DeleteModelResponse.
type DeleteThreadResponse ¶
type DeleteThreadResponse struct { Deleted bool `json:"deleted"` Id string `json:"id"` Object DeleteThreadResponseObject `json:"object"` }
DeleteThreadResponse defines model for DeleteThreadResponse.
type DeleteThreadResponseObject ¶
type DeleteThreadResponseObject string
DeleteThreadResponseObject defines model for DeleteThreadResponse.Object.
const (
ThreadDeleted DeleteThreadResponseObject = "thread.deleted"
)
Defines values for DeleteThreadResponseObject.
type DoneEvent ¶
type DoneEvent struct { Data DoneEventData `json:"data"` Event DoneEventEvent `json:"event"` }
DoneEvent Occurs when a stream ends.
type DoneEventData ¶
type DoneEventData string
DoneEventData defines model for DoneEvent.Data.
const (
DONE DoneEventData = "[DONE]"
)
Defines values for DoneEventData.
type DoneEventEvent ¶
type DoneEventEvent string
DoneEventEvent defines model for DoneEvent.Event.
const (
Done DoneEventEvent = "done"
)
Defines values for DoneEventEvent.
type Embedding ¶
type Embedding struct { // Embedding The embedding vector, which is a list of floats or a base64 encoded string, depending on the requested return type. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings). Embedding Embedding_Embedding `json:"embedding"` // Index The index of the embedding in the list of embeddings. Index int `json:"index"` // Object The object type, which is always "embedding". Object EmbeddingObject `json:"object"` }
Embedding Represents an embedding vector returned by embedding endpoint.
type EmbeddingEmbedding0 ¶
type EmbeddingEmbedding0 = []float32
EmbeddingEmbedding0 defines model for .
type EmbeddingEmbedding1 ¶
type EmbeddingEmbedding1 = string
EmbeddingEmbedding1 defines model for .
type EmbeddingObject ¶
type EmbeddingObject string
EmbeddingObject The object type, which is always "embedding".
const (
EmbeddingObjectEmbedding EmbeddingObject = "embedding"
)
Defines values for EmbeddingObject.
type Embedding_Embedding ¶
type Embedding_Embedding struct {
// contains filtered or unexported fields
}
Embedding_Embedding The embedding vector, which is a list of floats or a base64 encoded string, depending on the requested return type. The length of vector depends on the model as listed in the [embedding guide](/docs/guides/embeddings).
func (Embedding_Embedding) AsEmbeddingEmbedding0 ¶
func (t Embedding_Embedding) AsEmbeddingEmbedding0() (EmbeddingEmbedding0, error)
AsEmbeddingEmbedding0 returns the union data inside the Embedding_Embedding as a EmbeddingEmbedding0
func (Embedding_Embedding) AsEmbeddingEmbedding1 ¶
func (t Embedding_Embedding) AsEmbeddingEmbedding1() (EmbeddingEmbedding1, error)
AsEmbeddingEmbedding1 returns the union data inside the Embedding_Embedding as a EmbeddingEmbedding1
func (*Embedding_Embedding) FromEmbeddingEmbedding0 ¶
func (t *Embedding_Embedding) FromEmbeddingEmbedding0(v EmbeddingEmbedding0) error
FromEmbeddingEmbedding0 overwrites any union data inside the Embedding_Embedding as the provided EmbeddingEmbedding0
func (*Embedding_Embedding) FromEmbeddingEmbedding1 ¶
func (t *Embedding_Embedding) FromEmbeddingEmbedding1(v EmbeddingEmbedding1) error
FromEmbeddingEmbedding1 overwrites any union data inside the Embedding_Embedding as the provided EmbeddingEmbedding1
func (Embedding_Embedding) MarshalJSON ¶
func (t Embedding_Embedding) MarshalJSON() ([]byte, error)
func (*Embedding_Embedding) MergeEmbeddingEmbedding0 ¶
func (t *Embedding_Embedding) MergeEmbeddingEmbedding0(v EmbeddingEmbedding0) error
MergeEmbeddingEmbedding0 performs a merge with any union data inside the Embedding_Embedding, using the provided EmbeddingEmbedding0
func (*Embedding_Embedding) MergeEmbeddingEmbedding1 ¶
func (t *Embedding_Embedding) MergeEmbeddingEmbedding1(v EmbeddingEmbedding1) error
MergeEmbeddingEmbedding1 performs a merge with any union data inside the Embedding_Embedding, using the provided EmbeddingEmbedding1
func (*Embedding_Embedding) UnmarshalJSON ¶
func (t *Embedding_Embedding) UnmarshalJSON(b []byte) error
type Error ¶
type Error struct { Code *string `json:"code"` Message string `json:"message"` Param *string `json:"param"` Type string `json:"type"` }
Error defines model for Error.
type ErrorEvent ¶
type ErrorEvent struct { Data Error `json:"data"` Event ErrorEventEvent `json:"event"` }
ErrorEvent Occurs when an [error](/docs/guides/error-codes/api-errors) occurs. This can happen due to an internal server error or a timeout.
type ErrorEventEvent ¶
type ErrorEventEvent string
ErrorEventEvent defines model for ErrorEvent.Event.
const (
ErrorEventEventError ErrorEventEvent = "error"
)
Defines values for ErrorEventEvent.
type ErrorResponse ¶
type ErrorResponse struct {
Error Error `json:"error"`
}
ErrorResponse defines model for ErrorResponse.
type FineTuningJob ¶
type FineTuningJob struct { // CreatedAt The Unix timestamp (in seconds) for when the fine-tuning job was created. CreatedAt int `json:"created_at"` // Error For fine-tuning jobs that have `failed`, this will contain more information on the cause of the failure. Error *struct { // Code A machine-readable error code. Code string `json:"code"` // Message A human-readable error message. Message string `json:"message"` // Param 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"` } `json:"error"` // FineTunedModel 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"` // FinishedAt 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 *int `json:"finished_at"` // Hyperparameters The hyperparameters used for the fine-tuning job. See the [fine-tuning guide](/docs/guides/fine-tuning) for more details. Hyperparameters struct { // NEpochs 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 FineTuningJob_Hyperparameters_NEpochs `json:"n_epochs"` } `json:"hyperparameters"` // Id The object identifier, which can be referenced in the API endpoints. Id string `json:"id"` // Model The base model that is being fine-tuned. Model string `json:"model"` // Object The object type, which is always "fine_tuning.job". Object FineTuningJobObject `json:"object"` // OrganizationId The organization that owns the fine-tuning job. OrganizationId string `json:"organization_id"` // ResultFiles 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"` // Status The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`. Status FineTuningJobStatus `json:"status"` // TrainedTokens 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 *int `json:"trained_tokens"` // TrainingFile 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"` // ValidationFile 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.
type FineTuningJobEvent ¶
type FineTuningJobEvent struct { CreatedAt int `json:"created_at"` Id string `json:"id"` Level FineTuningJobEventLevel `json:"level"` Message string `json:"message"` Object FineTuningJobEventObject `json:"object"` }
FineTuningJobEvent Fine-tuning job event object
type FineTuningJobEventLevel ¶
type FineTuningJobEventLevel string
FineTuningJobEventLevel defines model for FineTuningJobEvent.Level.
const ( FineTuningJobEventLevelError FineTuningJobEventLevel = "error" FineTuningJobEventLevelInfo FineTuningJobEventLevel = "info" FineTuningJobEventLevelWarn FineTuningJobEventLevel = "warn" )
Defines values for FineTuningJobEventLevel.
type FineTuningJobEventObject ¶
type FineTuningJobEventObject string
FineTuningJobEventObject defines model for FineTuningJobEvent.Object.
const (
FineTuningJobEventObjectFineTuningJobEvent FineTuningJobEventObject = "fine_tuning.job.event"
)
Defines values for FineTuningJobEventObject.
type FineTuningJobHyperparametersNEpochs0 ¶
type FineTuningJobHyperparametersNEpochs0 string
FineTuningJobHyperparametersNEpochs0 defines model for FineTuningJob.Hyperparameters.NEpochs.0.
const (
Auto FineTuningJobHyperparametersNEpochs0 = "auto"
)
Defines values for FineTuningJobHyperparametersNEpochs0.
type FineTuningJobHyperparametersNEpochs1 ¶
type FineTuningJobHyperparametersNEpochs1 = int
FineTuningJobHyperparametersNEpochs1 defines model for .
type FineTuningJobObject ¶
type FineTuningJobObject string
FineTuningJobObject The object type, which is always "fine_tuning.job".
const (
FineTuningJobObjectFineTuningJob FineTuningJobObject = "fine_tuning.job"
)
Defines values for FineTuningJobObject.
type FineTuningJobStatus ¶
type FineTuningJobStatus string
FineTuningJobStatus The current status of the fine-tuning job, which can be either `validating_files`, `queued`, `running`, `succeeded`, `failed`, or `cancelled`.
const ( FineTuningJobStatusCancelled FineTuningJobStatus = "cancelled" FineTuningJobStatusFailed FineTuningJobStatus = "failed" FineTuningJobStatusQueued FineTuningJobStatus = "queued" FineTuningJobStatusRunning FineTuningJobStatus = "running" FineTuningJobStatusSucceeded FineTuningJobStatus = "succeeded" FineTuningJobStatusValidatingFiles FineTuningJobStatus = "validating_files" )
Defines values for FineTuningJobStatus.
type FineTuningJob_Hyperparameters_NEpochs ¶
type FineTuningJob_Hyperparameters_NEpochs struct {
// contains filtered or unexported fields
}
FineTuningJob_Hyperparameters_NEpochs 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 (FineTuningJob_Hyperparameters_NEpochs) AsFineTuningJobHyperparametersNEpochs0 ¶
func (t FineTuningJob_Hyperparameters_NEpochs) AsFineTuningJobHyperparametersNEpochs0() (FineTuningJobHyperparametersNEpochs0, error)
AsFineTuningJobHyperparametersNEpochs0 returns the union data inside the FineTuningJob_Hyperparameters_NEpochs as a FineTuningJobHyperparametersNEpochs0
func (FineTuningJob_Hyperparameters_NEpochs) AsFineTuningJobHyperparametersNEpochs1 ¶
func (t FineTuningJob_Hyperparameters_NEpochs) AsFineTuningJobHyperparametersNEpochs1() (FineTuningJobHyperparametersNEpochs1, error)
AsFineTuningJobHyperparametersNEpochs1 returns the union data inside the FineTuningJob_Hyperparameters_NEpochs as a FineTuningJobHyperparametersNEpochs1
func (*FineTuningJob_Hyperparameters_NEpochs) FromFineTuningJobHyperparametersNEpochs0 ¶
func (t *FineTuningJob_Hyperparameters_NEpochs) FromFineTuningJobHyperparametersNEpochs0(v FineTuningJobHyperparametersNEpochs0) error
FromFineTuningJobHyperparametersNEpochs0 overwrites any union data inside the FineTuningJob_Hyperparameters_NEpochs as the provided FineTuningJobHyperparametersNEpochs0
func (*FineTuningJob_Hyperparameters_NEpochs) FromFineTuningJobHyperparametersNEpochs1 ¶
func (t *FineTuningJob_Hyperparameters_NEpochs) FromFineTuningJobHyperparametersNEpochs1(v FineTuningJobHyperparametersNEpochs1) error
FromFineTuningJobHyperparametersNEpochs1 overwrites any union data inside the FineTuningJob_Hyperparameters_NEpochs as the provided FineTuningJobHyperparametersNEpochs1
func (FineTuningJob_Hyperparameters_NEpochs) MarshalJSON ¶
func (t FineTuningJob_Hyperparameters_NEpochs) MarshalJSON() ([]byte, error)
func (*FineTuningJob_Hyperparameters_NEpochs) MergeFineTuningJobHyperparametersNEpochs0 ¶
func (t *FineTuningJob_Hyperparameters_NEpochs) MergeFineTuningJobHyperparametersNEpochs0(v FineTuningJobHyperparametersNEpochs0) error
MergeFineTuningJobHyperparametersNEpochs0 performs a merge with any union data inside the FineTuningJob_Hyperparameters_NEpochs, using the provided FineTuningJobHyperparametersNEpochs0
func (*FineTuningJob_Hyperparameters_NEpochs) MergeFineTuningJobHyperparametersNEpochs1 ¶
func (t *FineTuningJob_Hyperparameters_NEpochs) MergeFineTuningJobHyperparametersNEpochs1(v FineTuningJobHyperparametersNEpochs1) error
MergeFineTuningJobHyperparametersNEpochs1 performs a merge with any union data inside the FineTuningJob_Hyperparameters_NEpochs, using the provided FineTuningJobHyperparametersNEpochs1
func (*FineTuningJob_Hyperparameters_NEpochs) UnmarshalJSON ¶
func (t *FineTuningJob_Hyperparameters_NEpochs) UnmarshalJSON(b []byte) error
type FunctionObject ¶
type FunctionObject struct { // Description 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"` // Name 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"` // Parameters 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 *FunctionParameters `json:"parameters"` }
FunctionObject defines model for FunctionObject.
type FunctionParameters ¶
type FunctionParameters map[string]interface{}
FunctionParameters 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.
type Image ¶
type Image struct { // B64Json The base64-encoded JSON of the generated image, if `response_format` is `b64_json`. B64Json *string `json:"b64_json,omitempty"` // RevisedPrompt The prompt that was used to generate the image, if there was any revision to the prompt. RevisedPrompt *string `json:"revised_prompt,omitempty"` // Url 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.
type ImagesResponse ¶
ImagesResponse defines model for ImagesResponse.
type InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
type ListAssistantFilesParams ¶
type ListAssistantFilesParams struct { // Limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Limit *int `form:"limit,omitempty" json:"limit,omitempty"` // Order Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. Order *ListAssistantFilesParamsOrder `form:"order,omitempty" json:"order,omitempty"` // After A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. After *string `form:"after,omitempty" json:"after,omitempty"` // Before A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. Before *string `form:"before,omitempty" json:"before,omitempty"` }
ListAssistantFilesParams defines parameters for ListAssistantFiles.
type ListAssistantFilesParamsOrder ¶
type ListAssistantFilesParamsOrder string
ListAssistantFilesParamsOrder defines parameters for ListAssistantFiles.
const ( ListAssistantFilesParamsOrderAsc ListAssistantFilesParamsOrder = "asc" ListAssistantFilesParamsOrderDesc ListAssistantFilesParamsOrder = "desc" )
Defines values for ListAssistantFilesParamsOrder.
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"` }
ListAssistantFilesResponse defines model for ListAssistantFilesResponse.
type ListAssistantsParams ¶
type ListAssistantsParams struct { // Limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Limit *int `form:"limit,omitempty" json:"limit,omitempty"` // Order Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. Order *ListAssistantsParamsOrder `form:"order,omitempty" json:"order,omitempty"` // After A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. After *string `form:"after,omitempty" json:"after,omitempty"` // Before A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. Before *string `form:"before,omitempty" json:"before,omitempty"` }
ListAssistantsParams defines parameters for ListAssistants.
type ListAssistantsParamsOrder ¶
type ListAssistantsParamsOrder string
ListAssistantsParamsOrder defines parameters for ListAssistants.
const ( ListAssistantsParamsOrderAsc ListAssistantsParamsOrder = "asc" ListAssistantsParamsOrderDesc ListAssistantsParamsOrder = "desc" )
Defines values for ListAssistantsParamsOrder.
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"` }
ListAssistantsResponse defines model for ListAssistantsResponse.
type ListFilesParams ¶
type ListFilesParams struct { // Purpose Only return files with the given purpose. Purpose *string `form:"purpose,omitempty" json:"purpose,omitempty"` }
ListFilesParams defines parameters for ListFiles.
type ListFilesResponse ¶
type ListFilesResponse struct { Data []OpenAIFile `json:"data"` Object ListFilesResponseObject `json:"object"` }
ListFilesResponse defines model for ListFilesResponse.
type ListFilesResponseObject ¶
type ListFilesResponseObject string
ListFilesResponseObject defines model for ListFilesResponse.Object.
const (
ListFilesResponseObjectList ListFilesResponseObject = "list"
)
Defines values for ListFilesResponseObject.
type ListFineTuningEventsParams ¶
type ListFineTuningEventsParams struct { // After Identifier for the last event from the previous pagination request. After *string `form:"after,omitempty" json:"after,omitempty"` // Limit Number of events to retrieve. Limit *int `form:"limit,omitempty" json:"limit,omitempty"` }
ListFineTuningEventsParams defines parameters for ListFineTuningEvents.
type ListFineTuningJobEventsResponse ¶
type ListFineTuningJobEventsResponse struct { Data []FineTuningJobEvent `json:"data"` Object ListFineTuningJobEventsResponseObject `json:"object"` }
ListFineTuningJobEventsResponse defines model for ListFineTuningJobEventsResponse.
type ListFineTuningJobEventsResponseObject ¶
type ListFineTuningJobEventsResponseObject string
ListFineTuningJobEventsResponseObject defines model for ListFineTuningJobEventsResponse.Object.
const (
ListFineTuningJobEventsResponseObjectList ListFineTuningJobEventsResponseObject = "list"
)
Defines values for ListFineTuningJobEventsResponseObject.
type ListMessageFilesParams ¶
type ListMessageFilesParams struct { // Limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Limit *int `form:"limit,omitempty" json:"limit,omitempty"` // Order Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. Order *ListMessageFilesParamsOrder `form:"order,omitempty" json:"order,omitempty"` // After A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. After *string `form:"after,omitempty" json:"after,omitempty"` // Before A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. Before *string `form:"before,omitempty" json:"before,omitempty"` }
ListMessageFilesParams defines parameters for ListMessageFiles.
type ListMessageFilesParamsOrder ¶
type ListMessageFilesParamsOrder string
ListMessageFilesParamsOrder defines parameters for ListMessageFiles.
const ( ListMessageFilesParamsOrderAsc ListMessageFilesParamsOrder = "asc" ListMessageFilesParamsOrderDesc ListMessageFilesParamsOrder = "desc" )
Defines values for ListMessageFilesParamsOrder.
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"` }
ListMessageFilesResponse defines model for ListMessageFilesResponse.
type ListMessagesParams ¶
type ListMessagesParams struct { // Limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Limit *int `form:"limit,omitempty" json:"limit,omitempty"` // Order Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. Order *ListMessagesParamsOrder `form:"order,omitempty" json:"order,omitempty"` // After A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. After *string `form:"after,omitempty" json:"after,omitempty"` // Before A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. Before *string `form:"before,omitempty" json:"before,omitempty"` }
ListMessagesParams defines parameters for ListMessages.
type ListMessagesParamsOrder ¶
type ListMessagesParamsOrder string
ListMessagesParamsOrder defines parameters for ListMessages.
const ( ListMessagesParamsOrderAsc ListMessagesParamsOrder = "asc" ListMessagesParamsOrderDesc ListMessagesParamsOrder = "desc" )
Defines values for ListMessagesParamsOrder.
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"` }
ListMessagesResponse defines model for ListMessagesResponse.
type ListModelsResponse ¶
type ListModelsResponse struct { Data []Model `json:"data"` Object ListModelsResponseObject `json:"object"` }
ListModelsResponse defines model for ListModelsResponse.
type ListModelsResponseObject ¶
type ListModelsResponseObject string
ListModelsResponseObject defines model for ListModelsResponse.Object.
const (
ListModelsResponseObjectList ListModelsResponseObject = "list"
)
Defines values for ListModelsResponseObject.
type ListPaginatedFineTuningJobsParams ¶
type ListPaginatedFineTuningJobsParams struct { // After Identifier for the last job from the previous pagination request. After *string `form:"after,omitempty" json:"after,omitempty"` // Limit Number of fine-tuning jobs to retrieve. Limit *int `form:"limit,omitempty" json:"limit,omitempty"` }
ListPaginatedFineTuningJobsParams defines parameters for ListPaginatedFineTuningJobs.
type ListPaginatedFineTuningJobsResponse ¶
type ListPaginatedFineTuningJobsResponse struct { Data []FineTuningJob `json:"data"` HasMore bool `json:"has_more"` Object ListPaginatedFineTuningJobsResponseObject `json:"object"` }
ListPaginatedFineTuningJobsResponse defines model for ListPaginatedFineTuningJobsResponse.
type ListPaginatedFineTuningJobsResponseObject ¶
type ListPaginatedFineTuningJobsResponseObject string
ListPaginatedFineTuningJobsResponseObject defines model for ListPaginatedFineTuningJobsResponse.Object.
const (
List ListPaginatedFineTuningJobsResponseObject = "list"
)
Defines values for ListPaginatedFineTuningJobsResponseObject.
type ListRunStepsParams ¶
type ListRunStepsParams struct { // Limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Limit *int `form:"limit,omitempty" json:"limit,omitempty"` // Order Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. Order *ListRunStepsParamsOrder `form:"order,omitempty" json:"order,omitempty"` // After A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. After *string `form:"after,omitempty" json:"after,omitempty"` // Before A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. Before *string `form:"before,omitempty" json:"before,omitempty"` }
ListRunStepsParams defines parameters for ListRunSteps.
type ListRunStepsParamsOrder ¶
type ListRunStepsParamsOrder string
ListRunStepsParamsOrder defines parameters for ListRunSteps.
const ( ListRunStepsParamsOrderAsc ListRunStepsParamsOrder = "asc" ListRunStepsParamsOrderDesc ListRunStepsParamsOrder = "desc" )
Defines values for ListRunStepsParamsOrder.
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"` }
ListRunStepsResponse defines model for ListRunStepsResponse.
type ListRunsParams ¶
type ListRunsParams struct { // Limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Limit *int `form:"limit,omitempty" json:"limit,omitempty"` // Order Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. Order *ListRunsParamsOrder `form:"order,omitempty" json:"order,omitempty"` // After A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. After *string `form:"after,omitempty" json:"after,omitempty"` // Before A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. Before *string `form:"before,omitempty" json:"before,omitempty"` }
ListRunsParams defines parameters for ListRuns.
type ListRunsParamsOrder ¶
type ListRunsParamsOrder string
ListRunsParamsOrder defines parameters for ListRuns.
const ( ListRunsParamsOrderAsc ListRunsParamsOrder = "asc" ListRunsParamsOrderDesc ListRunsParamsOrder = "desc" )
Defines values for ListRunsParamsOrder.
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"` }
ListRunsResponse defines model for ListRunsResponse.
type ListThreadsResponse ¶
type ListThreadsResponse struct { Data []ThreadObject `json:"data"` FirstId string `json:"first_id"` HasMore bool `json:"has_more"` LastId string `json:"last_id"` Object string `json:"object"` }
ListThreadsResponse defines model for ListThreadsResponse.
type MessageContentImageFileObject ¶
type MessageContentImageFileObject struct { ImageFile struct { // FileId The [File](/docs/api-reference/files) ID of the image in the message content. FileId string `json:"file_id"` } `json:"image_file"` // Type Always `image_file`. Type MessageContentImageFileObjectType `json:"type"` }
MessageContentImageFileObject References an image [File](/docs/api-reference/files) in the content of a message.
type MessageContentImageFileObjectType ¶
type MessageContentImageFileObjectType string
MessageContentImageFileObjectType Always `image_file`.
const (
MessageContentImageFileObjectTypeImageFile MessageContentImageFileObjectType = "image_file"
)
Defines values for MessageContentImageFileObjectType.
type MessageContentTextAnnotationsFileCitationObject ¶
type MessageContentTextAnnotationsFileCitationObject struct { EndIndex int `json:"end_index"` FileCitation struct { // FileId The ID of the specific File the citation is from. FileId string `json:"file_id"` // Quote The specific quote in the file. Quote string `json:"quote"` } `json:"file_citation"` StartIndex int `json:"start_index"` // Text The text in the message content that needs to be replaced. Text string `json:"text"` // Type 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.
type MessageContentTextAnnotationsFileCitationObjectType ¶
type MessageContentTextAnnotationsFileCitationObjectType string
MessageContentTextAnnotationsFileCitationObjectType Always `file_citation`.
const (
MessageContentTextAnnotationsFileCitationObjectTypeFileCitation MessageContentTextAnnotationsFileCitationObjectType = "file_citation"
)
Defines values for MessageContentTextAnnotationsFileCitationObjectType.
type MessageContentTextAnnotationsFilePathObject ¶
type MessageContentTextAnnotationsFilePathObject struct { EndIndex int `json:"end_index"` FilePath struct { // FileId The ID of the file that was generated. FileId string `json:"file_id"` } `json:"file_path"` StartIndex int `json:"start_index"` // Text The text in the message content that needs to be replaced. Text string `json:"text"` // Type 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.
type MessageContentTextAnnotationsFilePathObjectType ¶
type MessageContentTextAnnotationsFilePathObjectType string
MessageContentTextAnnotationsFilePathObjectType Always `file_path`.
const (
MessageContentTextAnnotationsFilePathObjectTypeFilePath MessageContentTextAnnotationsFilePathObjectType = "file_path"
)
Defines values for MessageContentTextAnnotationsFilePathObjectType.
type MessageContentTextObject ¶
type MessageContentTextObject struct { Text struct { Annotations []MessageContentTextObject_Text_Annotations_Item `json:"annotations"` // Value The data that makes up the text. Value string `json:"value"` } `json:"text"` // Type Always `text`. Type MessageContentTextObjectType `json:"type"` }
MessageContentTextObject The text content that is part of a message.
type MessageContentTextObjectType ¶
type MessageContentTextObjectType string
MessageContentTextObjectType Always `text`.
const (
MessageContentTextObjectTypeText MessageContentTextObjectType = "text"
)
Defines values for MessageContentTextObjectType.
type MessageContentTextObject_Text_Annotations_Item ¶
type MessageContentTextObject_Text_Annotations_Item struct {
// contains filtered or unexported fields
}
MessageContentTextObject_Text_Annotations_Item defines model for MessageContentTextObject.Text.Annotations.Item.
func (MessageContentTextObject_Text_Annotations_Item) AsMessageContentTextAnnotationsFileCitationObject ¶
func (t MessageContentTextObject_Text_Annotations_Item) AsMessageContentTextAnnotationsFileCitationObject() (MessageContentTextAnnotationsFileCitationObject, error)
AsMessageContentTextAnnotationsFileCitationObject returns the union data inside the MessageContentTextObject_Text_Annotations_Item as a MessageContentTextAnnotationsFileCitationObject
func (MessageContentTextObject_Text_Annotations_Item) AsMessageContentTextAnnotationsFilePathObject ¶
func (t MessageContentTextObject_Text_Annotations_Item) AsMessageContentTextAnnotationsFilePathObject() (MessageContentTextAnnotationsFilePathObject, error)
AsMessageContentTextAnnotationsFilePathObject returns the union data inside the MessageContentTextObject_Text_Annotations_Item as a MessageContentTextAnnotationsFilePathObject
func (*MessageContentTextObject_Text_Annotations_Item) FromMessageContentTextAnnotationsFileCitationObject ¶
func (t *MessageContentTextObject_Text_Annotations_Item) FromMessageContentTextAnnotationsFileCitationObject(v MessageContentTextAnnotationsFileCitationObject) error
FromMessageContentTextAnnotationsFileCitationObject overwrites any union data inside the MessageContentTextObject_Text_Annotations_Item as the provided MessageContentTextAnnotationsFileCitationObject
func (*MessageContentTextObject_Text_Annotations_Item) FromMessageContentTextAnnotationsFilePathObject ¶
func (t *MessageContentTextObject_Text_Annotations_Item) FromMessageContentTextAnnotationsFilePathObject(v MessageContentTextAnnotationsFilePathObject) error
FromMessageContentTextAnnotationsFilePathObject overwrites any union data inside the MessageContentTextObject_Text_Annotations_Item as the provided MessageContentTextAnnotationsFilePathObject
func (MessageContentTextObject_Text_Annotations_Item) MarshalJSON ¶
func (t MessageContentTextObject_Text_Annotations_Item) MarshalJSON() ([]byte, error)
func (*MessageContentTextObject_Text_Annotations_Item) MergeMessageContentTextAnnotationsFileCitationObject ¶
func (t *MessageContentTextObject_Text_Annotations_Item) MergeMessageContentTextAnnotationsFileCitationObject(v MessageContentTextAnnotationsFileCitationObject) error
MergeMessageContentTextAnnotationsFileCitationObject performs a merge with any union data inside the MessageContentTextObject_Text_Annotations_Item, using the provided MessageContentTextAnnotationsFileCitationObject
func (*MessageContentTextObject_Text_Annotations_Item) MergeMessageContentTextAnnotationsFilePathObject ¶
func (t *MessageContentTextObject_Text_Annotations_Item) MergeMessageContentTextAnnotationsFilePathObject(v MessageContentTextAnnotationsFilePathObject) error
MergeMessageContentTextAnnotationsFilePathObject performs a merge with any union data inside the MessageContentTextObject_Text_Annotations_Item, using the provided MessageContentTextAnnotationsFilePathObject
func (*MessageContentTextObject_Text_Annotations_Item) UnmarshalJSON ¶
func (t *MessageContentTextObject_Text_Annotations_Item) UnmarshalJSON(b []byte) error
type MessageDeltaContentImageFileObject ¶
type MessageDeltaContentImageFileObject struct { ImageFile *struct { // FileId The [File](/docs/api-reference/files) ID of the image in the message content. FileId *string `json:"file_id,omitempty"` } `json:"image_file,omitempty"` // Index The index of the content part in the message. Index int `json:"index"` // Type Always `image_file`. Type MessageDeltaContentImageFileObjectType `json:"type"` }
MessageDeltaContentImageFileObject References an image [File](/docs/api-reference/files) in the content of a message.
type MessageDeltaContentImageFileObjectType ¶
type MessageDeltaContentImageFileObjectType string
MessageDeltaContentImageFileObjectType Always `image_file`.
const (
MessageDeltaContentImageFileObjectTypeImageFile MessageDeltaContentImageFileObjectType = "image_file"
)
Defines values for MessageDeltaContentImageFileObjectType.
type MessageDeltaContentTextAnnotationsFileCitationObject ¶
type MessageDeltaContentTextAnnotationsFileCitationObject struct { EndIndex *int `json:"end_index,omitempty"` FileCitation *struct { // FileId The ID of the specific File the citation is from. FileId *string `json:"file_id,omitempty"` // Quote The specific quote in the file. Quote *string `json:"quote,omitempty"` } `json:"file_citation,omitempty"` // Index The index of the annotation in the text content part. Index int `json:"index"` StartIndex *int `json:"start_index,omitempty"` // Text The text in the message content that needs to be replaced. Text *string `json:"text,omitempty"` // Type Always `file_citation`. Type MessageDeltaContentTextAnnotationsFileCitationObjectType `json:"type"` }
MessageDeltaContentTextAnnotationsFileCitationObject 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.
type MessageDeltaContentTextAnnotationsFileCitationObjectType ¶
type MessageDeltaContentTextAnnotationsFileCitationObjectType string
MessageDeltaContentTextAnnotationsFileCitationObjectType Always `file_citation`.
const (
MessageDeltaContentTextAnnotationsFileCitationObjectTypeFileCitation MessageDeltaContentTextAnnotationsFileCitationObjectType = "file_citation"
)
Defines values for MessageDeltaContentTextAnnotationsFileCitationObjectType.
type MessageDeltaContentTextAnnotationsFilePathObject ¶
type MessageDeltaContentTextAnnotationsFilePathObject struct { EndIndex *int `json:"end_index,omitempty"` FilePath *struct { // FileId The ID of the file that was generated. FileId *string `json:"file_id,omitempty"` } `json:"file_path,omitempty"` // Index The index of the annotation in the text content part. Index int `json:"index"` StartIndex *int `json:"start_index,omitempty"` // Text The text in the message content that needs to be replaced. Text *string `json:"text,omitempty"` // Type Always `file_path`. Type MessageDeltaContentTextAnnotationsFilePathObjectType `json:"type"` }
MessageDeltaContentTextAnnotationsFilePathObject A URL for the file that's generated when the assistant used the `code_interpreter` tool to generate a file.
type MessageDeltaContentTextAnnotationsFilePathObjectType ¶
type MessageDeltaContentTextAnnotationsFilePathObjectType string
MessageDeltaContentTextAnnotationsFilePathObjectType Always `file_path`.
const (
MessageDeltaContentTextAnnotationsFilePathObjectTypeFilePath MessageDeltaContentTextAnnotationsFilePathObjectType = "file_path"
)
Defines values for MessageDeltaContentTextAnnotationsFilePathObjectType.
type MessageDeltaContentTextObject ¶
type MessageDeltaContentTextObject struct { // Index The index of the content part in the message. Index int `json:"index"` Text *struct { Annotations *[]MessageDeltaContentTextObject_Text_Annotations_Item `json:"annotations,omitempty"` // Value The data that makes up the text. Value *string `json:"value,omitempty"` } `json:"text,omitempty"` // Type Always `text`. Type MessageDeltaContentTextObjectType `json:"type"` }
MessageDeltaContentTextObject The text content that is part of a message.
type MessageDeltaContentTextObjectType ¶
type MessageDeltaContentTextObjectType string
MessageDeltaContentTextObjectType Always `text`.
const (
Text MessageDeltaContentTextObjectType = "text"
)
Defines values for MessageDeltaContentTextObjectType.
type MessageDeltaContentTextObject_Text_Annotations_Item ¶
type MessageDeltaContentTextObject_Text_Annotations_Item struct {
// contains filtered or unexported fields
}
MessageDeltaContentTextObject_Text_Annotations_Item defines model for MessageDeltaContentTextObject.Text.Annotations.Item.
func (MessageDeltaContentTextObject_Text_Annotations_Item) AsMessageDeltaContentTextAnnotationsFileCitationObject ¶
func (t MessageDeltaContentTextObject_Text_Annotations_Item) AsMessageDeltaContentTextAnnotationsFileCitationObject() (MessageDeltaContentTextAnnotationsFileCitationObject, error)
AsMessageDeltaContentTextAnnotationsFileCitationObject returns the union data inside the MessageDeltaContentTextObject_Text_Annotations_Item as a MessageDeltaContentTextAnnotationsFileCitationObject
func (MessageDeltaContentTextObject_Text_Annotations_Item) AsMessageDeltaContentTextAnnotationsFilePathObject ¶
func (t MessageDeltaContentTextObject_Text_Annotations_Item) AsMessageDeltaContentTextAnnotationsFilePathObject() (MessageDeltaContentTextAnnotationsFilePathObject, error)
AsMessageDeltaContentTextAnnotationsFilePathObject returns the union data inside the MessageDeltaContentTextObject_Text_Annotations_Item as a MessageDeltaContentTextAnnotationsFilePathObject
func (*MessageDeltaContentTextObject_Text_Annotations_Item) FromMessageDeltaContentTextAnnotationsFileCitationObject ¶
func (t *MessageDeltaContentTextObject_Text_Annotations_Item) FromMessageDeltaContentTextAnnotationsFileCitationObject(v MessageDeltaContentTextAnnotationsFileCitationObject) error
FromMessageDeltaContentTextAnnotationsFileCitationObject overwrites any union data inside the MessageDeltaContentTextObject_Text_Annotations_Item as the provided MessageDeltaContentTextAnnotationsFileCitationObject
func (*MessageDeltaContentTextObject_Text_Annotations_Item) FromMessageDeltaContentTextAnnotationsFilePathObject ¶
func (t *MessageDeltaContentTextObject_Text_Annotations_Item) FromMessageDeltaContentTextAnnotationsFilePathObject(v MessageDeltaContentTextAnnotationsFilePathObject) error
FromMessageDeltaContentTextAnnotationsFilePathObject overwrites any union data inside the MessageDeltaContentTextObject_Text_Annotations_Item as the provided MessageDeltaContentTextAnnotationsFilePathObject
func (MessageDeltaContentTextObject_Text_Annotations_Item) MarshalJSON ¶
func (t MessageDeltaContentTextObject_Text_Annotations_Item) MarshalJSON() ([]byte, error)
func (*MessageDeltaContentTextObject_Text_Annotations_Item) MergeMessageDeltaContentTextAnnotationsFileCitationObject ¶
func (t *MessageDeltaContentTextObject_Text_Annotations_Item) MergeMessageDeltaContentTextAnnotationsFileCitationObject(v MessageDeltaContentTextAnnotationsFileCitationObject) error
MergeMessageDeltaContentTextAnnotationsFileCitationObject performs a merge with any union data inside the MessageDeltaContentTextObject_Text_Annotations_Item, using the provided MessageDeltaContentTextAnnotationsFileCitationObject
func (*MessageDeltaContentTextObject_Text_Annotations_Item) MergeMessageDeltaContentTextAnnotationsFilePathObject ¶
func (t *MessageDeltaContentTextObject_Text_Annotations_Item) MergeMessageDeltaContentTextAnnotationsFilePathObject(v MessageDeltaContentTextAnnotationsFilePathObject) error
MergeMessageDeltaContentTextAnnotationsFilePathObject performs a merge with any union data inside the MessageDeltaContentTextObject_Text_Annotations_Item, using the provided MessageDeltaContentTextAnnotationsFilePathObject
func (*MessageDeltaContentTextObject_Text_Annotations_Item) UnmarshalJSON ¶
func (t *MessageDeltaContentTextObject_Text_Annotations_Item) UnmarshalJSON(b []byte) error
type MessageDeltaObject ¶
type MessageDeltaObject struct { // Delta The delta containing the fields that have changed on the Message. Delta struct { // Content The content of the message in array of text and/or images. Content *[]MessageDeltaObject_Delta_Content_Item `json:"content,omitempty"` // FileIds 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,omitempty"` // Role The entity that produced the message. One of `user` or `assistant`. Role *MessageDeltaObjectDeltaRole `json:"role,omitempty"` } `json:"delta"` // Id The identifier of the message, which can be referenced in API endpoints. Id string `json:"id"` // Object The object type, which is always `thread.message.delta`. Object MessageDeltaObjectObject `json:"object"` }
MessageDeltaObject Represents a message delta i.e. any changed fields on a message during streaming.
type MessageDeltaObjectDeltaRole ¶
type MessageDeltaObjectDeltaRole string
MessageDeltaObjectDeltaRole The entity that produced the message. One of `user` or `assistant`.
const ( MessageDeltaObjectDeltaRoleAssistant MessageDeltaObjectDeltaRole = "assistant" MessageDeltaObjectDeltaRoleUser MessageDeltaObjectDeltaRole = "user" )
Defines values for MessageDeltaObjectDeltaRole.
type MessageDeltaObjectObject ¶
type MessageDeltaObjectObject string
MessageDeltaObjectObject The object type, which is always `thread.message.delta`.
const (
MessageDeltaObjectObjectThreadMessageDelta MessageDeltaObjectObject = "thread.message.delta"
)
Defines values for MessageDeltaObjectObject.
type MessageDeltaObject_Delta_Content_Item ¶
type MessageDeltaObject_Delta_Content_Item struct {
// contains filtered or unexported fields
}
MessageDeltaObject_Delta_Content_Item defines model for MessageDeltaObject.Delta.Content.Item.
func (MessageDeltaObject_Delta_Content_Item) AsMessageDeltaContentImageFileObject ¶
func (t MessageDeltaObject_Delta_Content_Item) AsMessageDeltaContentImageFileObject() (MessageDeltaContentImageFileObject, error)
AsMessageDeltaContentImageFileObject returns the union data inside the MessageDeltaObject_Delta_Content_Item as a MessageDeltaContentImageFileObject
func (MessageDeltaObject_Delta_Content_Item) AsMessageDeltaContentTextObject ¶
func (t MessageDeltaObject_Delta_Content_Item) AsMessageDeltaContentTextObject() (MessageDeltaContentTextObject, error)
AsMessageDeltaContentTextObject returns the union data inside the MessageDeltaObject_Delta_Content_Item as a MessageDeltaContentTextObject
func (*MessageDeltaObject_Delta_Content_Item) FromMessageDeltaContentImageFileObject ¶
func (t *MessageDeltaObject_Delta_Content_Item) FromMessageDeltaContentImageFileObject(v MessageDeltaContentImageFileObject) error
FromMessageDeltaContentImageFileObject overwrites any union data inside the MessageDeltaObject_Delta_Content_Item as the provided MessageDeltaContentImageFileObject
func (*MessageDeltaObject_Delta_Content_Item) FromMessageDeltaContentTextObject ¶
func (t *MessageDeltaObject_Delta_Content_Item) FromMessageDeltaContentTextObject(v MessageDeltaContentTextObject) error
FromMessageDeltaContentTextObject overwrites any union data inside the MessageDeltaObject_Delta_Content_Item as the provided MessageDeltaContentTextObject
func (MessageDeltaObject_Delta_Content_Item) MarshalJSON ¶
func (t MessageDeltaObject_Delta_Content_Item) MarshalJSON() ([]byte, error)
func (*MessageDeltaObject_Delta_Content_Item) MergeMessageDeltaContentImageFileObject ¶
func (t *MessageDeltaObject_Delta_Content_Item) MergeMessageDeltaContentImageFileObject(v MessageDeltaContentImageFileObject) error
MergeMessageDeltaContentImageFileObject performs a merge with any union data inside the MessageDeltaObject_Delta_Content_Item, using the provided MessageDeltaContentImageFileObject
func (*MessageDeltaObject_Delta_Content_Item) MergeMessageDeltaContentTextObject ¶
func (t *MessageDeltaObject_Delta_Content_Item) MergeMessageDeltaContentTextObject(v MessageDeltaContentTextObject) error
MergeMessageDeltaContentTextObject performs a merge with any union data inside the MessageDeltaObject_Delta_Content_Item, using the provided MessageDeltaContentTextObject
func (*MessageDeltaObject_Delta_Content_Item) UnmarshalJSON ¶
func (t *MessageDeltaObject_Delta_Content_Item) UnmarshalJSON(b []byte) error
type MessageFileObject ¶
type MessageFileObject struct { // CreatedAt The Unix timestamp (in seconds) for when the message file was created. CreatedAt int `json:"created_at"` // Id The identifier, which can be referenced in API endpoints. Id string `json:"id"` // MessageId The ID of the [message](/docs/api-reference/messages) that the [File](/docs/api-reference/files) is attached to. MessageId string `json:"message_id"` // Object The object type, which is always `thread.message.file`. Object MessageFileObjectObject `json:"object"` }
MessageFileObject A list of files attached to a `message`.
type MessageFileObjectObject ¶
type MessageFileObjectObject string
MessageFileObjectObject The object type, which is always `thread.message.file`.
const (
ThreadMessageFile MessageFileObjectObject = "thread.message.file"
)
Defines values for MessageFileObjectObject.
type MessageObject ¶
type MessageObject struct { // AssistantId If applicable, the ID of the [assistant](/docs/api-reference/assistants) that authored this message. AssistantId *string `json:"assistant_id"` // CompletedAt The Unix timestamp (in seconds) for when the message was completed. CompletedAt *int `json:"completed_at"` // Content The content of the message in array of text and/or images. Content []MessageObject_Content_Item `json:"content"` // CreatedAt The Unix timestamp (in seconds) for when the message was created. CreatedAt int `json:"created_at"` // FileIds 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"` // Id The identifier, which can be referenced in API endpoints. Id string `json:"id"` // IncompleteAt The Unix timestamp (in seconds) for when the message was marked as incomplete. IncompleteAt *int `json:"incomplete_at"` // IncompleteDetails On an incomplete message, details about why the message is incomplete. IncompleteDetails *struct { // Reason The reason the message is incomplete. Reason MessageObjectIncompleteDetailsReason `json:"reason"` } `json:"incomplete_details"` // 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. Metadata *map[string]interface{} `json:"metadata"` // Object The object type, which is always `thread.message`. Object MessageObjectObject `json:"object"` // Role The entity that produced the message. One of `user` or `assistant`. Role MessageObjectRole `json:"role"` // RunId If applicable, the ID of the [run](/docs/api-reference/runs) associated with the authoring of this message. RunId *string `json:"run_id"` // Status The status of the message, which can be either `in_progress`, `incomplete`, or `completed`. Status MessageObjectStatus `json:"status"` // ThreadId 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).
type MessageObjectIncompleteDetailsReason ¶
type MessageObjectIncompleteDetailsReason string
MessageObjectIncompleteDetailsReason The reason the message is incomplete.
const ( ContentFilter MessageObjectIncompleteDetailsReason = "content_filter" MaxTokens MessageObjectIncompleteDetailsReason = "max_tokens" RunCancelled MessageObjectIncompleteDetailsReason = "run_cancelled" RunExpired MessageObjectIncompleteDetailsReason = "run_expired" RunFailed MessageObjectIncompleteDetailsReason = "run_failed" )
Defines values for MessageObjectIncompleteDetailsReason.
type MessageObjectObject ¶
type MessageObjectObject string
MessageObjectObject The object type, which is always `thread.message`.
const (
ThreadMessage MessageObjectObject = "thread.message"
)
Defines values for MessageObjectObject.
type MessageObjectRole ¶
type MessageObjectRole string
MessageObjectRole The entity that produced the message. One of `user` or `assistant`.
const ( Assistant MessageObjectRole = "assistant" User MessageObjectRole = "user" )
Defines values for MessageObjectRole.
type MessageObjectStatus ¶
type MessageObjectStatus string
MessageObjectStatus The status of the message, which can be either `in_progress`, `incomplete`, or `completed`.
const ( MessageObjectStatusCompleted MessageObjectStatus = "completed" MessageObjectStatusInProgress MessageObjectStatus = "in_progress" MessageObjectStatusIncomplete MessageObjectStatus = "incomplete" )
Defines values for MessageObjectStatus.
type MessageObject_Content_Item ¶
type MessageObject_Content_Item struct {
// contains filtered or unexported fields
}
MessageObject_Content_Item defines model for MessageObject.content.Item.
func (MessageObject_Content_Item) AsMessageContentImageFileObject ¶
func (t MessageObject_Content_Item) AsMessageContentImageFileObject() (MessageContentImageFileObject, error)
AsMessageContentImageFileObject returns the union data inside the MessageObject_Content_Item as a MessageContentImageFileObject
func (MessageObject_Content_Item) AsMessageContentTextObject ¶
func (t MessageObject_Content_Item) AsMessageContentTextObject() (MessageContentTextObject, error)
AsMessageContentTextObject returns the union data inside the MessageObject_Content_Item as a MessageContentTextObject
func (*MessageObject_Content_Item) FromMessageContentImageFileObject ¶
func (t *MessageObject_Content_Item) FromMessageContentImageFileObject(v MessageContentImageFileObject) error
FromMessageContentImageFileObject overwrites any union data inside the MessageObject_Content_Item as the provided MessageContentImageFileObject
func (*MessageObject_Content_Item) FromMessageContentTextObject ¶
func (t *MessageObject_Content_Item) FromMessageContentTextObject(v MessageContentTextObject) error
FromMessageContentTextObject overwrites any union data inside the MessageObject_Content_Item as the provided MessageContentTextObject
func (MessageObject_Content_Item) MarshalJSON ¶
func (t MessageObject_Content_Item) MarshalJSON() ([]byte, error)
func (*MessageObject_Content_Item) MergeMessageContentImageFileObject ¶
func (t *MessageObject_Content_Item) MergeMessageContentImageFileObject(v MessageContentImageFileObject) error
MergeMessageContentImageFileObject performs a merge with any union data inside the MessageObject_Content_Item, using the provided MessageContentImageFileObject
func (*MessageObject_Content_Item) MergeMessageContentTextObject ¶
func (t *MessageObject_Content_Item) MergeMessageContentTextObject(v MessageContentTextObject) error
MergeMessageContentTextObject performs a merge with any union data inside the MessageObject_Content_Item, using the provided MessageContentTextObject
func (*MessageObject_Content_Item) UnmarshalJSON ¶
func (t *MessageObject_Content_Item) UnmarshalJSON(b []byte) error
type MessageStreamEvent ¶
type MessageStreamEvent struct {
// contains filtered or unexported fields
}
MessageStreamEvent defines model for MessageStreamEvent.
func (MessageStreamEvent) AsMessageStreamEvent0 ¶
func (t MessageStreamEvent) AsMessageStreamEvent0() (MessageStreamEvent0, error)
AsMessageStreamEvent0 returns the union data inside the MessageStreamEvent as a MessageStreamEvent0
func (MessageStreamEvent) AsMessageStreamEvent1 ¶
func (t MessageStreamEvent) AsMessageStreamEvent1() (MessageStreamEvent1, error)
AsMessageStreamEvent1 returns the union data inside the MessageStreamEvent as a MessageStreamEvent1
func (MessageStreamEvent) AsMessageStreamEvent2 ¶
func (t MessageStreamEvent) AsMessageStreamEvent2() (MessageStreamEvent2, error)
AsMessageStreamEvent2 returns the union data inside the MessageStreamEvent as a MessageStreamEvent2
func (MessageStreamEvent) AsMessageStreamEvent3 ¶
func (t MessageStreamEvent) AsMessageStreamEvent3() (MessageStreamEvent3, error)
AsMessageStreamEvent3 returns the union data inside the MessageStreamEvent as a MessageStreamEvent3
func (MessageStreamEvent) AsMessageStreamEvent4 ¶
func (t MessageStreamEvent) AsMessageStreamEvent4() (MessageStreamEvent4, error)
AsMessageStreamEvent4 returns the union data inside the MessageStreamEvent as a MessageStreamEvent4
func (*MessageStreamEvent) FromMessageStreamEvent0 ¶
func (t *MessageStreamEvent) FromMessageStreamEvent0(v MessageStreamEvent0) error
FromMessageStreamEvent0 overwrites any union data inside the MessageStreamEvent as the provided MessageStreamEvent0
func (*MessageStreamEvent) FromMessageStreamEvent1 ¶
func (t *MessageStreamEvent) FromMessageStreamEvent1(v MessageStreamEvent1) error
FromMessageStreamEvent1 overwrites any union data inside the MessageStreamEvent as the provided MessageStreamEvent1
func (*MessageStreamEvent) FromMessageStreamEvent2 ¶
func (t *MessageStreamEvent) FromMessageStreamEvent2(v MessageStreamEvent2) error
FromMessageStreamEvent2 overwrites any union data inside the MessageStreamEvent as the provided MessageStreamEvent2
func (*MessageStreamEvent) FromMessageStreamEvent3 ¶
func (t *MessageStreamEvent) FromMessageStreamEvent3(v MessageStreamEvent3) error
FromMessageStreamEvent3 overwrites any union data inside the MessageStreamEvent as the provided MessageStreamEvent3
func (*MessageStreamEvent) FromMessageStreamEvent4 ¶
func (t *MessageStreamEvent) FromMessageStreamEvent4(v MessageStreamEvent4) error
FromMessageStreamEvent4 overwrites any union data inside the MessageStreamEvent as the provided MessageStreamEvent4
func (MessageStreamEvent) MarshalJSON ¶
func (t MessageStreamEvent) MarshalJSON() ([]byte, error)
func (*MessageStreamEvent) MergeMessageStreamEvent0 ¶
func (t *MessageStreamEvent) MergeMessageStreamEvent0(v MessageStreamEvent0) error
MergeMessageStreamEvent0 performs a merge with any union data inside the MessageStreamEvent, using the provided MessageStreamEvent0
func (*MessageStreamEvent) MergeMessageStreamEvent1 ¶
func (t *MessageStreamEvent) MergeMessageStreamEvent1(v MessageStreamEvent1) error
MergeMessageStreamEvent1 performs a merge with any union data inside the MessageStreamEvent, using the provided MessageStreamEvent1
func (*MessageStreamEvent) MergeMessageStreamEvent2 ¶
func (t *MessageStreamEvent) MergeMessageStreamEvent2(v MessageStreamEvent2) error
MergeMessageStreamEvent2 performs a merge with any union data inside the MessageStreamEvent, using the provided MessageStreamEvent2
func (*MessageStreamEvent) MergeMessageStreamEvent3 ¶
func (t *MessageStreamEvent) MergeMessageStreamEvent3(v MessageStreamEvent3) error
MergeMessageStreamEvent3 performs a merge with any union data inside the MessageStreamEvent, using the provided MessageStreamEvent3
func (*MessageStreamEvent) MergeMessageStreamEvent4 ¶
func (t *MessageStreamEvent) MergeMessageStreamEvent4(v MessageStreamEvent4) error
MergeMessageStreamEvent4 performs a merge with any union data inside the MessageStreamEvent, using the provided MessageStreamEvent4
func (*MessageStreamEvent) UnmarshalJSON ¶
func (t *MessageStreamEvent) UnmarshalJSON(b []byte) error
type MessageStreamEvent0 ¶
type MessageStreamEvent0 struct { // Data Represents a message within a [thread](/docs/api-reference/threads). Data MessageObject `json:"data"` Event MessageStreamEvent0Event `json:"event"` }
MessageStreamEvent0 Occurs when a [message](/docs/api-reference/messages/object) is created.
type MessageStreamEvent0Event ¶
type MessageStreamEvent0Event string
MessageStreamEvent0Event defines model for MessageStreamEvent.0.Event.
const (
ThreadMessageCreated MessageStreamEvent0Event = "thread.message.created"
)
Defines values for MessageStreamEvent0Event.
type MessageStreamEvent1 ¶
type MessageStreamEvent1 struct { // Data Represents a message within a [thread](/docs/api-reference/threads). Data MessageObject `json:"data"` Event MessageStreamEvent1Event `json:"event"` }
MessageStreamEvent1 Occurs when a [message](/docs/api-reference/messages/object) moves to an `in_progress` state.
type MessageStreamEvent1Event ¶
type MessageStreamEvent1Event string
MessageStreamEvent1Event defines model for MessageStreamEvent.1.Event.
const (
ThreadMessageInProgress MessageStreamEvent1Event = "thread.message.in_progress"
)
Defines values for MessageStreamEvent1Event.
type MessageStreamEvent2 ¶
type MessageStreamEvent2 struct { // Data Represents a message delta i.e. any changed fields on a message during streaming. Data MessageDeltaObject `json:"data"` Event MessageStreamEvent2Event `json:"event"` }
MessageStreamEvent2 Occurs when parts of a [Message](/docs/api-reference/messages/object) are being streamed.
type MessageStreamEvent2Event ¶
type MessageStreamEvent2Event string
MessageStreamEvent2Event defines model for MessageStreamEvent.2.Event.
const (
MessageStreamEvent2EventThreadMessageDelta MessageStreamEvent2Event = "thread.message.delta"
)
Defines values for MessageStreamEvent2Event.
type MessageStreamEvent3 ¶
type MessageStreamEvent3 struct { // Data Represents a message within a [thread](/docs/api-reference/threads). Data MessageObject `json:"data"` Event MessageStreamEvent3Event `json:"event"` }
MessageStreamEvent3 Occurs when a [message](/docs/api-reference/messages/object) is completed.
type MessageStreamEvent3Event ¶
type MessageStreamEvent3Event string
MessageStreamEvent3Event defines model for MessageStreamEvent.3.Event.
const (
ThreadMessageCompleted MessageStreamEvent3Event = "thread.message.completed"
)
Defines values for MessageStreamEvent3Event.
type MessageStreamEvent4 ¶
type MessageStreamEvent4 struct { // Data Represents a message within a [thread](/docs/api-reference/threads). Data MessageObject `json:"data"` Event MessageStreamEvent4Event `json:"event"` }
MessageStreamEvent4 Occurs when a [message](/docs/api-reference/messages/object) ends before it is completed.
type MessageStreamEvent4Event ¶
type MessageStreamEvent4Event string
MessageStreamEvent4Event defines model for MessageStreamEvent.4.Event.
const (
ThreadMessageIncomplete MessageStreamEvent4Event = "thread.message.incomplete"
)
Defines values for MessageStreamEvent4Event.
type Model ¶
type Model struct { // Created The Unix timestamp (in seconds) when the model was created. Created int `json:"created"` // Id The model identifier, which can be referenced in the API endpoints. Id string `json:"id"` // Object The object type, which is always "model". Object ModelObject `json:"object"` // OwnedBy The organization that owns the model. OwnedBy string `json:"owned_by"` }
Model Describes an OpenAI model offering that can be used with the API.
type ModelObject ¶
type ModelObject string
ModelObject The object type, which is always "model".
const (
ModelObjectModel ModelObject = "model"
)
Defines values for ModelObject.
type ModifyAssistantJSONRequestBody ¶
type ModifyAssistantJSONRequestBody = ModifyAssistantRequest
ModifyAssistantJSONRequestBody defines body for ModifyAssistant for application/json ContentType.
type ModifyAssistantRequest ¶
type ModifyAssistantRequest struct { // Description The description of the assistant. The maximum length is 512 characters. Description *string `json:"description"` // FileIds 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"` // Instructions The system instructions that the assistant uses. The maximum length is 32768 characters. Instructions *string `json:"instructions"` // 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. Metadata *map[string]interface{} `json:"metadata"` // Model 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 *ModifyAssistantRequest_Model `json:"model,omitempty"` // Name The name of the assistant. The maximum length is 256 characters. Name *string `json:"name"` // Tools 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`, `function`, or `gptscript`. Tools *[]ModifyAssistantRequest_Tools_Item `json:"tools,omitempty"` }
ModifyAssistantRequest defines model for ModifyAssistantRequest.
type ModifyAssistantRequestModel0 ¶
type ModifyAssistantRequestModel0 = string
ModifyAssistantRequestModel0 defines model for .
type ModifyAssistantRequest_Model ¶
type ModifyAssistantRequest_Model struct {
// contains filtered or unexported fields
}
ModifyAssistantRequest_Model 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 (ModifyAssistantRequest_Model) AsModifyAssistantRequestModel0 ¶
func (t ModifyAssistantRequest_Model) AsModifyAssistantRequestModel0() (ModifyAssistantRequestModel0, error)
AsModifyAssistantRequestModel0 returns the union data inside the ModifyAssistantRequest_Model as a ModifyAssistantRequestModel0
func (*ModifyAssistantRequest_Model) FromModifyAssistantRequestModel0 ¶
func (t *ModifyAssistantRequest_Model) FromModifyAssistantRequestModel0(v ModifyAssistantRequestModel0) error
FromModifyAssistantRequestModel0 overwrites any union data inside the ModifyAssistantRequest_Model as the provided ModifyAssistantRequestModel0
func (ModifyAssistantRequest_Model) MarshalJSON ¶
func (t ModifyAssistantRequest_Model) MarshalJSON() ([]byte, error)
func (*ModifyAssistantRequest_Model) MergeModifyAssistantRequestModel0 ¶
func (t *ModifyAssistantRequest_Model) MergeModifyAssistantRequestModel0(v ModifyAssistantRequestModel0) error
MergeModifyAssistantRequestModel0 performs a merge with any union data inside the ModifyAssistantRequest_Model, using the provided ModifyAssistantRequestModel0
func (*ModifyAssistantRequest_Model) UnmarshalJSON ¶
func (t *ModifyAssistantRequest_Model) UnmarshalJSON(b []byte) error
type ModifyAssistantRequest_Tools_Item ¶
type ModifyAssistantRequest_Tools_Item struct {
// contains filtered or unexported fields
}
ModifyAssistantRequest_Tools_Item defines model for ModifyAssistantRequest.tools.Item.
func (ModifyAssistantRequest_Tools_Item) AsAssistantToolsCode ¶
func (t ModifyAssistantRequest_Tools_Item) AsAssistantToolsCode() (AssistantToolsCode, error)
AsAssistantToolsCode returns the union data inside the ModifyAssistantRequest_Tools_Item as a AssistantToolsCode
func (ModifyAssistantRequest_Tools_Item) AsAssistantToolsFunction ¶
func (t ModifyAssistantRequest_Tools_Item) AsAssistantToolsFunction() (AssistantToolsFunction, error)
AsAssistantToolsFunction returns the union data inside the ModifyAssistantRequest_Tools_Item as a AssistantToolsFunction
func (ModifyAssistantRequest_Tools_Item) AsAssistantToolsRetrieval ¶
func (t ModifyAssistantRequest_Tools_Item) AsAssistantToolsRetrieval() (AssistantToolsRetrieval, error)
AsAssistantToolsRetrieval returns the union data inside the ModifyAssistantRequest_Tools_Item as a AssistantToolsRetrieval
func (ModifyAssistantRequest_Tools_Item) AsXAssistantToolsGPTScript ¶
func (t ModifyAssistantRequest_Tools_Item) AsXAssistantToolsGPTScript() (XAssistantToolsGPTScript, error)
AsXAssistantToolsGPTScript returns the union data inside the ModifyAssistantRequest_Tools_Item as a XAssistantToolsGPTScript
func (*ModifyAssistantRequest_Tools_Item) FromAssistantToolsCode ¶
func (t *ModifyAssistantRequest_Tools_Item) FromAssistantToolsCode(v AssistantToolsCode) error
FromAssistantToolsCode overwrites any union data inside the ModifyAssistantRequest_Tools_Item as the provided AssistantToolsCode
func (*ModifyAssistantRequest_Tools_Item) FromAssistantToolsFunction ¶
func (t *ModifyAssistantRequest_Tools_Item) FromAssistantToolsFunction(v AssistantToolsFunction) error
FromAssistantToolsFunction overwrites any union data inside the ModifyAssistantRequest_Tools_Item as the provided AssistantToolsFunction
func (*ModifyAssistantRequest_Tools_Item) FromAssistantToolsRetrieval ¶
func (t *ModifyAssistantRequest_Tools_Item) FromAssistantToolsRetrieval(v AssistantToolsRetrieval) error
FromAssistantToolsRetrieval overwrites any union data inside the ModifyAssistantRequest_Tools_Item as the provided AssistantToolsRetrieval
func (*ModifyAssistantRequest_Tools_Item) FromXAssistantToolsGPTScript ¶
func (t *ModifyAssistantRequest_Tools_Item) FromXAssistantToolsGPTScript(v XAssistantToolsGPTScript) error
FromXAssistantToolsGPTScript overwrites any union data inside the ModifyAssistantRequest_Tools_Item as the provided XAssistantToolsGPTScript
func (ModifyAssistantRequest_Tools_Item) MarshalJSON ¶
func (t ModifyAssistantRequest_Tools_Item) MarshalJSON() ([]byte, error)
func (*ModifyAssistantRequest_Tools_Item) MergeAssistantToolsCode ¶
func (t *ModifyAssistantRequest_Tools_Item) MergeAssistantToolsCode(v AssistantToolsCode) error
MergeAssistantToolsCode performs a merge with any union data inside the ModifyAssistantRequest_Tools_Item, using the provided AssistantToolsCode
func (*ModifyAssistantRequest_Tools_Item) MergeAssistantToolsFunction ¶
func (t *ModifyAssistantRequest_Tools_Item) MergeAssistantToolsFunction(v AssistantToolsFunction) error
MergeAssistantToolsFunction performs a merge with any union data inside the ModifyAssistantRequest_Tools_Item, using the provided AssistantToolsFunction
func (*ModifyAssistantRequest_Tools_Item) MergeAssistantToolsRetrieval ¶
func (t *ModifyAssistantRequest_Tools_Item) MergeAssistantToolsRetrieval(v AssistantToolsRetrieval) error
MergeAssistantToolsRetrieval performs a merge with any union data inside the ModifyAssistantRequest_Tools_Item, using the provided AssistantToolsRetrieval
func (*ModifyAssistantRequest_Tools_Item) MergeXAssistantToolsGPTScript ¶
func (t *ModifyAssistantRequest_Tools_Item) MergeXAssistantToolsGPTScript(v XAssistantToolsGPTScript) error
MergeXAssistantToolsGPTScript performs a merge with any union data inside the ModifyAssistantRequest_Tools_Item, using the provided XAssistantToolsGPTScript
func (*ModifyAssistantRequest_Tools_Item) UnmarshalJSON ¶
func (t *ModifyAssistantRequest_Tools_Item) UnmarshalJSON(b []byte) error
type ModifyMessageJSONRequestBody ¶
type ModifyMessageJSONRequestBody = ModifyMessageRequest
ModifyMessageJSONRequestBody defines body for ModifyMessage for application/json ContentType.
type ModifyMessageRequest ¶
type ModifyMessageRequest 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. Metadata *map[string]interface{} `json:"metadata"` }
ModifyMessageRequest defines model for ModifyMessageRequest.
type ModifyRunJSONRequestBody ¶
type ModifyRunJSONRequestBody = ModifyRunRequest
ModifyRunJSONRequestBody defines body for ModifyRun for application/json ContentType.
type ModifyRunRequest ¶
type ModifyRunRequest 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. Metadata *map[string]interface{} `json:"metadata"` }
ModifyRunRequest defines model for ModifyRunRequest.
type ModifyThreadJSONRequestBody ¶
type ModifyThreadJSONRequestBody = ModifyThreadRequest
ModifyThreadJSONRequestBody defines body for ModifyThread for application/json ContentType.
type ModifyThreadRequest ¶
type ModifyThreadRequest 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. Metadata *map[string]interface{} `json:"metadata"` }
ModifyThreadRequest defines model for ModifyThreadRequest.
type OpenAIFile ¶
type OpenAIFile struct { // Bytes The size of the file, in bytes. Bytes int `json:"bytes"` // CreatedAt The Unix timestamp (in seconds) for when the file was created. CreatedAt int `json:"created_at"` // Filename The name of the file. Filename string `json:"filename"` // Id The file identifier, which can be referenced in the API endpoints. Id string `json:"id"` // Object The object type, which is always `file`. Object OpenAIFileObject `json:"object"` // Purpose The intended purpose of the file. Supported values are `fine-tune`, `fine-tune-results`, `assistants`, and `assistants_output`. Purpose OpenAIFilePurpose `json:"purpose"` // Status Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`. // Deprecated: Status OpenAIFileStatus `json:"status"` // StatusDetails Deprecated. For details on why a fine-tuning training file failed validation, see the `error` field on `fine_tuning.job`. // Deprecated: StatusDetails *string `json:"status_details,omitempty"` }
OpenAIFile The `File` object represents a document that has been uploaded to OpenAI.
type OpenAIFileObject ¶
type OpenAIFileObject string
OpenAIFileObject The object type, which is always `file`.
const (
OpenAIFileObjectFile OpenAIFileObject = "file"
)
Defines values for OpenAIFileObject.
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 ( OpenAIFilePurposeAssistants OpenAIFilePurpose = "assistants" OpenAIFilePurposeAssistantsOutput OpenAIFilePurpose = "assistants_output" OpenAIFilePurposeFineTune OpenAIFilePurpose = "fine-tune" OpenAIFilePurposeFineTuneResults OpenAIFilePurpose = "fine-tune-results" )
Defines values for OpenAIFilePurpose.
type OpenAIFileStatus ¶
type OpenAIFileStatus string
OpenAIFileStatus Deprecated. The current status of the file, which can be either `uploaded`, `processed`, or `error`.
const ( OpenAIFileStatusError OpenAIFileStatus = "error" OpenAIFileStatusProcessed OpenAIFileStatus = "processed" OpenAIFileStatusUploaded OpenAIFileStatus = "uploaded" )
Defines values for OpenAIFileStatus.
type RequiredHeaderError ¶
func (*RequiredHeaderError) Error ¶
func (e *RequiredHeaderError) Error() string
func (*RequiredHeaderError) Unwrap ¶
func (e *RequiredHeaderError) Unwrap() error
type RequiredParamError ¶
type RequiredParamError struct {
ParamName string
}
func (*RequiredParamError) Error ¶
func (e *RequiredParamError) Error() string
type RunCompletionUsage ¶
type RunCompletionUsage struct { // CompletionTokens Number of completion tokens used over the course of the run. CompletionTokens int `json:"completion_tokens"` // PromptTokens Number of prompt tokens used over the course of the run. PromptTokens int `json:"prompt_tokens"` // TotalTokens Total number of tokens used (prompt + completion). TotalTokens int `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.).
type RunObject ¶
type RunObject struct { // AssistantId The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run. AssistantId string `json:"assistant_id"` // CancelledAt The Unix timestamp (in seconds) for when the run was cancelled. CancelledAt *int `json:"cancelled_at"` // CompletedAt The Unix timestamp (in seconds) for when the run was completed. CompletedAt *int `json:"completed_at"` // CreatedAt The Unix timestamp (in seconds) for when the run was created. CreatedAt int `json:"created_at"` // ExpiresAt The Unix timestamp (in seconds) for when the run will expire. ExpiresAt *int `json:"expires_at"` // FailedAt The Unix timestamp (in seconds) for when the run failed. FailedAt *int `json:"failed_at"` // FileIds The list of [File](/docs/api-reference/files) IDs the [assistant](/docs/api-reference/assistants) used for this run. FileIds []string `json:"file_ids"` // Id The identifier, which can be referenced in API endpoints. Id string `json:"id"` // Instructions The instructions that the [assistant](/docs/api-reference/assistants) used for this run. Instructions string `json:"instructions"` // LastError The last error associated with this run. Will be `null` if there are no errors. LastError *struct { // Code One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`. Code RunObjectLastErrorCode `json:"code"` // Message A human-readable description of the error. Message string `json:"message"` } `json:"last_error"` // 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. Metadata *map[string]interface{} `json:"metadata"` // Model The model that the [assistant](/docs/api-reference/assistants) used for this run. Model string `json:"model"` // Object The object type, which is always `thread.run`. Object RunObjectObject `json:"object"` // RequiredAction Details on the action required to continue the run. Will be `null` if no action is required. RequiredAction *struct { // SubmitToolOutputs Details on the tool outputs needed for this run to continue. SubmitToolOutputs *struct { // ToolCalls A list of the relevant tool calls. ToolCalls *[]RunToolCallObject `json:"tool_calls,omitempty"` } `json:"submit_tool_outputs,omitempty"` // Type For now, this is either `submit_tool_outputs` or `confirm`. Type RunObjectRequiredActionType `json:"type"` // XConfirm Confirm an action can be taken. XConfirm *struct { // Action The action the tool would like to take. Action string `json:"action"` // Id The ID of the tool call. Id string `json:"id"` } `json:"x-confirm,omitempty"` } `json:"required_action"` // StartedAt The Unix timestamp (in seconds) for when the run was started. StartedAt *int `json:"started_at"` // Status The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `requires_confirmation`, `cancelling`, `cancelled`, `failed`, `completed`, or `expired`. Status RunObjectStatus `json:"status"` // ThreadId The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run. ThreadId string `json:"thread_id"` // Tools The list of tools that the [assistant](/docs/api-reference/assistants) used for this run. Tools []RunObject_Tools_Item `json:"tools"` // Usage 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).
type RunObjectLastErrorCode ¶
type RunObjectLastErrorCode string
RunObjectLastErrorCode One of `server_error`, `rate_limit_exceeded`, or `invalid_prompt`.
const ( RunObjectLastErrorCodeInvalidPrompt RunObjectLastErrorCode = "invalid_prompt" RunObjectLastErrorCodeRateLimitExceeded RunObjectLastErrorCode = "rate_limit_exceeded" RunObjectLastErrorCodeServerError RunObjectLastErrorCode = "server_error" )
Defines values for RunObjectLastErrorCode.
type RunObjectObject ¶
type RunObjectObject string
RunObjectObject The object type, which is always `thread.run`.
const (
ThreadRun RunObjectObject = "thread.run"
)
Defines values for RunObjectObject.
type RunObjectRequiredActionType ¶
type RunObjectRequiredActionType string
RunObjectRequiredActionType For now, this is either `submit_tool_outputs` or `confirm`.
const ( Confirm RunObjectRequiredActionType = "confirm" SubmitToolOutputs RunObjectRequiredActionType = "submit_tool_outputs" )
Defines values for RunObjectRequiredActionType.
type RunObjectStatus ¶
type RunObjectStatus string
RunObjectStatus The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `requires_confirmation`, `cancelling`, `cancelled`, `failed`, `completed`, or `expired`.
const ( RunObjectStatusCancelled RunObjectStatus = "cancelled" RunObjectStatusCancelling RunObjectStatus = "cancelling" RunObjectStatusCompleted RunObjectStatus = "completed" RunObjectStatusExpired RunObjectStatus = "expired" RunObjectStatusFailed RunObjectStatus = "failed" RunObjectStatusInProgress RunObjectStatus = "in_progress" RunObjectStatusQueued RunObjectStatus = "queued" RunObjectStatusRequiresAction RunObjectStatus = "requires_action" RunObjectStatusRequiresConfirmation RunObjectStatus = "requires_confirmation" )
Defines values for RunObjectStatus.
type RunObject_Tools_Item ¶
type RunObject_Tools_Item struct {
// contains filtered or unexported fields
}
RunObject_Tools_Item defines model for RunObject.tools.Item.
func (RunObject_Tools_Item) AsAssistantToolsCode ¶
func (t RunObject_Tools_Item) AsAssistantToolsCode() (AssistantToolsCode, error)
AsAssistantToolsCode returns the union data inside the RunObject_Tools_Item as a AssistantToolsCode
func (RunObject_Tools_Item) AsAssistantToolsFunction ¶
func (t RunObject_Tools_Item) AsAssistantToolsFunction() (AssistantToolsFunction, error)
AsAssistantToolsFunction returns the union data inside the RunObject_Tools_Item as a AssistantToolsFunction
func (RunObject_Tools_Item) AsAssistantToolsRetrieval ¶
func (t RunObject_Tools_Item) AsAssistantToolsRetrieval() (AssistantToolsRetrieval, error)
AsAssistantToolsRetrieval returns the union data inside the RunObject_Tools_Item as a AssistantToolsRetrieval
func (*RunObject_Tools_Item) FromAssistantToolsCode ¶
func (t *RunObject_Tools_Item) FromAssistantToolsCode(v AssistantToolsCode) error
FromAssistantToolsCode overwrites any union data inside the RunObject_Tools_Item as the provided AssistantToolsCode
func (*RunObject_Tools_Item) FromAssistantToolsFunction ¶
func (t *RunObject_Tools_Item) FromAssistantToolsFunction(v AssistantToolsFunction) error
FromAssistantToolsFunction overwrites any union data inside the RunObject_Tools_Item as the provided AssistantToolsFunction
func (*RunObject_Tools_Item) FromAssistantToolsRetrieval ¶
func (t *RunObject_Tools_Item) FromAssistantToolsRetrieval(v AssistantToolsRetrieval) error
FromAssistantToolsRetrieval overwrites any union data inside the RunObject_Tools_Item as the provided AssistantToolsRetrieval
func (RunObject_Tools_Item) MarshalJSON ¶
func (t RunObject_Tools_Item) MarshalJSON() ([]byte, error)
func (*RunObject_Tools_Item) MergeAssistantToolsCode ¶
func (t *RunObject_Tools_Item) MergeAssistantToolsCode(v AssistantToolsCode) error
MergeAssistantToolsCode performs a merge with any union data inside the RunObject_Tools_Item, using the provided AssistantToolsCode
func (*RunObject_Tools_Item) MergeAssistantToolsFunction ¶
func (t *RunObject_Tools_Item) MergeAssistantToolsFunction(v AssistantToolsFunction) error
MergeAssistantToolsFunction performs a merge with any union data inside the RunObject_Tools_Item, using the provided AssistantToolsFunction
func (*RunObject_Tools_Item) MergeAssistantToolsRetrieval ¶
func (t *RunObject_Tools_Item) MergeAssistantToolsRetrieval(v AssistantToolsRetrieval) error
MergeAssistantToolsRetrieval performs a merge with any union data inside the RunObject_Tools_Item, using the provided AssistantToolsRetrieval
func (*RunObject_Tools_Item) UnmarshalJSON ¶
func (t *RunObject_Tools_Item) UnmarshalJSON(b []byte) error
type RunStepCompletionUsage ¶
type RunStepCompletionUsage struct { // CompletionTokens Number of completion tokens used over the course of the run step. CompletionTokens int `json:"completion_tokens"` // PromptTokens Number of prompt tokens used over the course of the run step. PromptTokens int `json:"prompt_tokens"` // TotalTokens Total number of tokens used (prompt + completion). TotalTokens int `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`.
type RunStepDeltaObject ¶
type RunStepDeltaObject struct { // Delta The delta containing the fields that have changed on the run step. Delta struct { // StepDetails The details of the run step. StepDetails *RunStepDeltaObject_Delta_StepDetails `json:"step_details,omitempty"` } `json:"delta"` // Id The identifier of the run step, which can be referenced in API endpoints. Id string `json:"id"` // Object The object type, which is always `thread.run.step.delta`. Object RunStepDeltaObjectObject `json:"object"` }
RunStepDeltaObject Represents a run step delta i.e. any changed fields on a run step during streaming.
type RunStepDeltaObjectObject ¶
type RunStepDeltaObjectObject string
RunStepDeltaObjectObject The object type, which is always `thread.run.step.delta`.
const (
RunStepDeltaObjectObjectThreadRunStepDelta RunStepDeltaObjectObject = "thread.run.step.delta"
)
Defines values for RunStepDeltaObjectObject.
type RunStepDeltaObject_Delta_StepDetails ¶
type RunStepDeltaObject_Delta_StepDetails struct {
// contains filtered or unexported fields
}
RunStepDeltaObject_Delta_StepDetails The details of the run step.
func (RunStepDeltaObject_Delta_StepDetails) AsRunStepDeltaStepDetailsMessageCreationObject ¶
func (t RunStepDeltaObject_Delta_StepDetails) AsRunStepDeltaStepDetailsMessageCreationObject() (RunStepDeltaStepDetailsMessageCreationObject, error)
AsRunStepDeltaStepDetailsMessageCreationObject returns the union data inside the RunStepDeltaObject_Delta_StepDetails as a RunStepDeltaStepDetailsMessageCreationObject
func (RunStepDeltaObject_Delta_StepDetails) AsRunStepDeltaStepDetailsToolCallsObject ¶
func (t RunStepDeltaObject_Delta_StepDetails) AsRunStepDeltaStepDetailsToolCallsObject() (RunStepDeltaStepDetailsToolCallsObject, error)
AsRunStepDeltaStepDetailsToolCallsObject returns the union data inside the RunStepDeltaObject_Delta_StepDetails as a RunStepDeltaStepDetailsToolCallsObject
func (*RunStepDeltaObject_Delta_StepDetails) FromRunStepDeltaStepDetailsMessageCreationObject ¶
func (t *RunStepDeltaObject_Delta_StepDetails) FromRunStepDeltaStepDetailsMessageCreationObject(v RunStepDeltaStepDetailsMessageCreationObject) error
FromRunStepDeltaStepDetailsMessageCreationObject overwrites any union data inside the RunStepDeltaObject_Delta_StepDetails as the provided RunStepDeltaStepDetailsMessageCreationObject
func (*RunStepDeltaObject_Delta_StepDetails) FromRunStepDeltaStepDetailsToolCallsObject ¶
func (t *RunStepDeltaObject_Delta_StepDetails) FromRunStepDeltaStepDetailsToolCallsObject(v RunStepDeltaStepDetailsToolCallsObject) error
FromRunStepDeltaStepDetailsToolCallsObject overwrites any union data inside the RunStepDeltaObject_Delta_StepDetails as the provided RunStepDeltaStepDetailsToolCallsObject
func (RunStepDeltaObject_Delta_StepDetails) MarshalJSON ¶
func (t RunStepDeltaObject_Delta_StepDetails) MarshalJSON() ([]byte, error)
func (*RunStepDeltaObject_Delta_StepDetails) MergeRunStepDeltaStepDetailsMessageCreationObject ¶
func (t *RunStepDeltaObject_Delta_StepDetails) MergeRunStepDeltaStepDetailsMessageCreationObject(v RunStepDeltaStepDetailsMessageCreationObject) error
MergeRunStepDeltaStepDetailsMessageCreationObject performs a merge with any union data inside the RunStepDeltaObject_Delta_StepDetails, using the provided RunStepDeltaStepDetailsMessageCreationObject
func (*RunStepDeltaObject_Delta_StepDetails) MergeRunStepDeltaStepDetailsToolCallsObject ¶
func (t *RunStepDeltaObject_Delta_StepDetails) MergeRunStepDeltaStepDetailsToolCallsObject(v RunStepDeltaStepDetailsToolCallsObject) error
MergeRunStepDeltaStepDetailsToolCallsObject performs a merge with any union data inside the RunStepDeltaObject_Delta_StepDetails, using the provided RunStepDeltaStepDetailsToolCallsObject
func (*RunStepDeltaObject_Delta_StepDetails) UnmarshalJSON ¶
func (t *RunStepDeltaObject_Delta_StepDetails) UnmarshalJSON(b []byte) error
type RunStepDeltaStepDetailsMessageCreationObject ¶
type RunStepDeltaStepDetailsMessageCreationObject struct { MessageCreation *struct { // MessageId The ID of the message that was created by this run step. MessageId *string `json:"message_id,omitempty"` } `json:"message_creation,omitempty"` // Type Always `message_creation`. Type RunStepDeltaStepDetailsMessageCreationObjectType `json:"type"` }
RunStepDeltaStepDetailsMessageCreationObject Details of the message creation by the run step.
type RunStepDeltaStepDetailsMessageCreationObjectType ¶
type RunStepDeltaStepDetailsMessageCreationObjectType string
RunStepDeltaStepDetailsMessageCreationObjectType Always `message_creation`.
const (
RunStepDeltaStepDetailsMessageCreationObjectTypeMessageCreation RunStepDeltaStepDetailsMessageCreationObjectType = "message_creation"
)
Defines values for RunStepDeltaStepDetailsMessageCreationObjectType.
type RunStepDeltaStepDetailsToolCallsCodeObject ¶
type RunStepDeltaStepDetailsToolCallsCodeObject struct { // CodeInterpreter The Code Interpreter tool call definition. CodeInterpreter *struct { // Input The input to the Code Interpreter tool call. Input *string `json:"input,omitempty"` // Outputs 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 *[]RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item `json:"outputs,omitempty"` } `json:"code_interpreter,omitempty"` // Id The ID of the tool call. Id *string `json:"id,omitempty"` // Index The index of the tool call in the tool calls array. Index int `json:"index"` // Type The type of tool call. This is always going to be `code_interpreter` for this type of tool call. Type RunStepDeltaStepDetailsToolCallsCodeObjectType `json:"type"` }
RunStepDeltaStepDetailsToolCallsCodeObject Details of the Code Interpreter tool call the run step was involved in.
type RunStepDeltaStepDetailsToolCallsCodeObjectType ¶
type RunStepDeltaStepDetailsToolCallsCodeObjectType string
RunStepDeltaStepDetailsToolCallsCodeObjectType The type of tool call. This is always going to be `code_interpreter` for this type of tool call.
const (
RunStepDeltaStepDetailsToolCallsCodeObjectTypeCodeInterpreter RunStepDeltaStepDetailsToolCallsCodeObjectType = "code_interpreter"
)
Defines values for RunStepDeltaStepDetailsToolCallsCodeObjectType.
type RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item ¶
type RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item struct {
// contains filtered or unexported fields
}
RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item defines model for RunStepDeltaStepDetailsToolCallsCodeObject.CodeInterpreter.Outputs.Item.
func (RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) AsRunStepDeltaStepDetailsToolCallsCodeOutputImageObject ¶
func (t RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) AsRunStepDeltaStepDetailsToolCallsCodeOutputImageObject() (RunStepDeltaStepDetailsToolCallsCodeOutputImageObject, error)
AsRunStepDeltaStepDetailsToolCallsCodeOutputImageObject returns the union data inside the RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item as a RunStepDeltaStepDetailsToolCallsCodeOutputImageObject
func (RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) AsRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject ¶
func (t RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) AsRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject() (RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject, error)
AsRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject returns the union data inside the RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item as a RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject
func (*RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) FromRunStepDeltaStepDetailsToolCallsCodeOutputImageObject ¶
func (t *RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) FromRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(v RunStepDeltaStepDetailsToolCallsCodeOutputImageObject) error
FromRunStepDeltaStepDetailsToolCallsCodeOutputImageObject overwrites any union data inside the RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item as the provided RunStepDeltaStepDetailsToolCallsCodeOutputImageObject
func (*RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) FromRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject ¶
func (t *RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) FromRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(v RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject) error
FromRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject overwrites any union data inside the RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item as the provided RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject
func (RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MarshalJSON ¶
func (t RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MarshalJSON() ([]byte, error)
func (*RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MergeRunStepDeltaStepDetailsToolCallsCodeOutputImageObject ¶
func (t *RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MergeRunStepDeltaStepDetailsToolCallsCodeOutputImageObject(v RunStepDeltaStepDetailsToolCallsCodeOutputImageObject) error
MergeRunStepDeltaStepDetailsToolCallsCodeOutputImageObject performs a merge with any union data inside the RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item, using the provided RunStepDeltaStepDetailsToolCallsCodeOutputImageObject
func (*RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MergeRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject ¶
func (t *RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MergeRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject(v RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject) error
MergeRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject performs a merge with any union data inside the RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item, using the provided RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject
func (*RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) UnmarshalJSON ¶
func (t *RunStepDeltaStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) UnmarshalJSON(b []byte) error
type RunStepDeltaStepDetailsToolCallsCodeOutputImageObject ¶
type RunStepDeltaStepDetailsToolCallsCodeOutputImageObject struct { Image *struct { // FileId The [file](/docs/api-reference/files) ID of the image. FileId *string `json:"file_id,omitempty"` } `json:"image,omitempty"` // Index The index of the output in the outputs array. Index int `json:"index"` // Type Always `image`. Type RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType `json:"type"` }
RunStepDeltaStepDetailsToolCallsCodeOutputImageObject defines model for RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.
type RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType ¶
type RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType string
RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType Always `image`.
const (
RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectTypeImage RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType = "image"
)
Defines values for RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectType.
type RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject ¶
type RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject struct { // Index The index of the output in the outputs array. Index int `json:"index"` // Logs The text output from the Code Interpreter tool call. Logs *string `json:"logs,omitempty"` // Type Always `logs`. Type RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType `json:"type"` }
RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject Text output from the Code Interpreter tool call as part of a run step.
type RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType ¶
type RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType string
RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType Always `logs`.
const (
RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectTypeLogs RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType = "logs"
)
Defines values for RunStepDeltaStepDetailsToolCallsCodeOutputLogsObjectType.
type RunStepDeltaStepDetailsToolCallsFunctionObject ¶
type RunStepDeltaStepDetailsToolCallsFunctionObject struct { // Function The definition of the function that was called. Function *struct { // Arguments The arguments passed to the function. Arguments *string `json:"arguments,omitempty"` // Name The name of the function. Name *string `json:"name,omitempty"` // Output 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"` } `json:"function,omitempty"` // Id The ID of the tool call object. Id *string `json:"id,omitempty"` // Index The index of the tool call in the tool calls array. Index int `json:"index"` // Type The type of tool call. This is always going to be `function` for this type of tool call. Type RunStepDeltaStepDetailsToolCallsFunctionObjectType `json:"type"` }
RunStepDeltaStepDetailsToolCallsFunctionObject defines model for RunStepDeltaStepDetailsToolCallsFunctionObject.
type RunStepDeltaStepDetailsToolCallsFunctionObjectType ¶
type RunStepDeltaStepDetailsToolCallsFunctionObjectType string
RunStepDeltaStepDetailsToolCallsFunctionObjectType The type of tool call. This is always going to be `function` for this type of tool call.
const (
RunStepDeltaStepDetailsToolCallsFunctionObjectTypeFunction RunStepDeltaStepDetailsToolCallsFunctionObjectType = "function"
)
Defines values for RunStepDeltaStepDetailsToolCallsFunctionObjectType.
type RunStepDeltaStepDetailsToolCallsObject ¶
type RunStepDeltaStepDetailsToolCallsObject struct { // ToolCalls 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 *[]RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item `json:"tool_calls,omitempty"` // Type Always `tool_calls`. Type RunStepDeltaStepDetailsToolCallsObjectType `json:"type"` }
RunStepDeltaStepDetailsToolCallsObject Details of the tool call.
type RunStepDeltaStepDetailsToolCallsObjectType ¶
type RunStepDeltaStepDetailsToolCallsObjectType string
RunStepDeltaStepDetailsToolCallsObjectType Always `tool_calls`.
const (
RunStepDeltaStepDetailsToolCallsObjectTypeToolCalls RunStepDeltaStepDetailsToolCallsObjectType = "tool_calls"
)
Defines values for RunStepDeltaStepDetailsToolCallsObjectType.
type RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item ¶
type RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item struct {
// contains filtered or unexported fields
}
RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item defines model for RunStepDeltaStepDetailsToolCallsObject.tool_calls.Item.
func (RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDeltaStepDetailsToolCallsCodeObject ¶
func (t RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDeltaStepDetailsToolCallsCodeObject() (RunStepDeltaStepDetailsToolCallsCodeObject, error)
AsRunStepDeltaStepDetailsToolCallsCodeObject returns the union data inside the RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item as a RunStepDeltaStepDetailsToolCallsCodeObject
func (RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDeltaStepDetailsToolCallsFunctionObject ¶
func (t RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDeltaStepDetailsToolCallsFunctionObject() (RunStepDeltaStepDetailsToolCallsFunctionObject, error)
AsRunStepDeltaStepDetailsToolCallsFunctionObject returns the union data inside the RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item as a RunStepDeltaStepDetailsToolCallsFunctionObject
func (RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDeltaStepDetailsToolCallsRetrievalObject ¶
func (t RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDeltaStepDetailsToolCallsRetrievalObject() (RunStepDeltaStepDetailsToolCallsRetrievalObject, error)
AsRunStepDeltaStepDetailsToolCallsRetrievalObject returns the union data inside the RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item as a RunStepDeltaStepDetailsToolCallsRetrievalObject
func (*RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDeltaStepDetailsToolCallsCodeObject ¶
func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDeltaStepDetailsToolCallsCodeObject(v RunStepDeltaStepDetailsToolCallsCodeObject) error
FromRunStepDeltaStepDetailsToolCallsCodeObject overwrites any union data inside the RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item as the provided RunStepDeltaStepDetailsToolCallsCodeObject
func (*RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDeltaStepDetailsToolCallsFunctionObject ¶
func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDeltaStepDetailsToolCallsFunctionObject(v RunStepDeltaStepDetailsToolCallsFunctionObject) error
FromRunStepDeltaStepDetailsToolCallsFunctionObject overwrites any union data inside the RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item as the provided RunStepDeltaStepDetailsToolCallsFunctionObject
func (*RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDeltaStepDetailsToolCallsRetrievalObject ¶
func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDeltaStepDetailsToolCallsRetrievalObject(v RunStepDeltaStepDetailsToolCallsRetrievalObject) error
FromRunStepDeltaStepDetailsToolCallsRetrievalObject overwrites any union data inside the RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item as the provided RunStepDeltaStepDetailsToolCallsRetrievalObject
func (RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) MarshalJSON ¶
func (t RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) MarshalJSON() ([]byte, error)
func (*RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDeltaStepDetailsToolCallsCodeObject ¶
func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDeltaStepDetailsToolCallsCodeObject(v RunStepDeltaStepDetailsToolCallsCodeObject) error
MergeRunStepDeltaStepDetailsToolCallsCodeObject performs a merge with any union data inside the RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item, using the provided RunStepDeltaStepDetailsToolCallsCodeObject
func (*RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDeltaStepDetailsToolCallsFunctionObject ¶
func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDeltaStepDetailsToolCallsFunctionObject(v RunStepDeltaStepDetailsToolCallsFunctionObject) error
MergeRunStepDeltaStepDetailsToolCallsFunctionObject performs a merge with any union data inside the RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item, using the provided RunStepDeltaStepDetailsToolCallsFunctionObject
func (*RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDeltaStepDetailsToolCallsRetrievalObject ¶
func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDeltaStepDetailsToolCallsRetrievalObject(v RunStepDeltaStepDetailsToolCallsRetrievalObject) error
MergeRunStepDeltaStepDetailsToolCallsRetrievalObject performs a merge with any union data inside the RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item, using the provided RunStepDeltaStepDetailsToolCallsRetrievalObject
func (*RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) UnmarshalJSON ¶
func (t *RunStepDeltaStepDetailsToolCallsObject_ToolCalls_Item) UnmarshalJSON(b []byte) error
type RunStepDeltaStepDetailsToolCallsRetrievalObject ¶
type RunStepDeltaStepDetailsToolCallsRetrievalObject struct { // Id The ID of the tool call object. Id *string `json:"id,omitempty"` // Index The index of the tool call in the tool calls array. Index int `json:"index"` // Retrieval For now, this is always going to be an empty object. Retrieval *map[string]interface{} `json:"retrieval,omitempty"` // Type The type of tool call. This is always going to be `retrieval` for this type of tool call. Type RunStepDeltaStepDetailsToolCallsRetrievalObjectType `json:"type"` }
RunStepDeltaStepDetailsToolCallsRetrievalObject defines model for RunStepDeltaStepDetailsToolCallsRetrievalObject.
type RunStepDeltaStepDetailsToolCallsRetrievalObjectType ¶
type RunStepDeltaStepDetailsToolCallsRetrievalObjectType string
RunStepDeltaStepDetailsToolCallsRetrievalObjectType The type of tool call. This is always going to be `retrieval` for this type of tool call.
const (
RunStepDeltaStepDetailsToolCallsRetrievalObjectTypeRetrieval RunStepDeltaStepDetailsToolCallsRetrievalObjectType = "retrieval"
)
Defines values for RunStepDeltaStepDetailsToolCallsRetrievalObjectType.
type RunStepDetailsMessageCreationObject ¶
type RunStepDetailsMessageCreationObject struct { MessageCreation struct { // MessageId The ID of the message that was created by this run step. MessageId string `json:"message_id"` } `json:"message_creation"` // Type Always `message_creation`. Type RunStepDetailsMessageCreationObjectType `json:"type"` }
RunStepDetailsMessageCreationObject Details of the message creation by the run step.
type RunStepDetailsMessageCreationObjectType ¶
type RunStepDetailsMessageCreationObjectType string
RunStepDetailsMessageCreationObjectType Always `message_creation`.
const (
RunStepDetailsMessageCreationObjectTypeMessageCreation RunStepDetailsMessageCreationObjectType = "message_creation"
)
Defines values for RunStepDetailsMessageCreationObjectType.
type RunStepDetailsToolCallsCodeObject ¶
type RunStepDetailsToolCallsCodeObject struct { // CodeInterpreter The Code Interpreter tool call definition. CodeInterpreter struct { // Input The input to the Code Interpreter tool call. Input string `json:"input"` // Outputs 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 []RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item `json:"outputs"` } `json:"code_interpreter"` // Id The ID of the tool call. Id string `json:"id"` // Type 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.
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 (
CodeInterpreter RunStepDetailsToolCallsCodeObjectType = "code_interpreter"
)
Defines values for RunStepDetailsToolCallsCodeObjectType.
type RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item ¶
type RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item struct {
// contains filtered or unexported fields
}
RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item defines model for RunStepDetailsToolCallsCodeObject.CodeInterpreter.Outputs.Item.
func (RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) AsRunStepDetailsToolCallsCodeOutputImageObject ¶
func (t RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) AsRunStepDetailsToolCallsCodeOutputImageObject() (RunStepDetailsToolCallsCodeOutputImageObject, error)
AsRunStepDetailsToolCallsCodeOutputImageObject returns the union data inside the RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item as a RunStepDetailsToolCallsCodeOutputImageObject
func (RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) AsRunStepDetailsToolCallsCodeOutputLogsObject ¶
func (t RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) AsRunStepDetailsToolCallsCodeOutputLogsObject() (RunStepDetailsToolCallsCodeOutputLogsObject, error)
AsRunStepDetailsToolCallsCodeOutputLogsObject returns the union data inside the RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item as a RunStepDetailsToolCallsCodeOutputLogsObject
func (*RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) FromRunStepDetailsToolCallsCodeOutputImageObject ¶
func (t *RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) FromRunStepDetailsToolCallsCodeOutputImageObject(v RunStepDetailsToolCallsCodeOutputImageObject) error
FromRunStepDetailsToolCallsCodeOutputImageObject overwrites any union data inside the RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item as the provided RunStepDetailsToolCallsCodeOutputImageObject
func (*RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) FromRunStepDetailsToolCallsCodeOutputLogsObject ¶
func (t *RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) FromRunStepDetailsToolCallsCodeOutputLogsObject(v RunStepDetailsToolCallsCodeOutputLogsObject) error
FromRunStepDetailsToolCallsCodeOutputLogsObject overwrites any union data inside the RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item as the provided RunStepDetailsToolCallsCodeOutputLogsObject
func (RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MarshalJSON ¶
func (t RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MarshalJSON() ([]byte, error)
func (*RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MergeRunStepDetailsToolCallsCodeOutputImageObject ¶
func (t *RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MergeRunStepDetailsToolCallsCodeOutputImageObject(v RunStepDetailsToolCallsCodeOutputImageObject) error
MergeRunStepDetailsToolCallsCodeOutputImageObject performs a merge with any union data inside the RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item, using the provided RunStepDetailsToolCallsCodeOutputImageObject
func (*RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MergeRunStepDetailsToolCallsCodeOutputLogsObject ¶
func (t *RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) MergeRunStepDetailsToolCallsCodeOutputLogsObject(v RunStepDetailsToolCallsCodeOutputLogsObject) error
MergeRunStepDetailsToolCallsCodeOutputLogsObject performs a merge with any union data inside the RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item, using the provided RunStepDetailsToolCallsCodeOutputLogsObject
func (*RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) UnmarshalJSON ¶
func (t *RunStepDetailsToolCallsCodeObject_CodeInterpreter_Outputs_Item) UnmarshalJSON(b []byte) error
type RunStepDetailsToolCallsCodeOutputImageObject ¶
type RunStepDetailsToolCallsCodeOutputImageObject struct { Image struct { // FileId The [file](/docs/api-reference/files) ID of the image. FileId string `json:"file_id"` } `json:"image"` // Type Always `image`. Type RunStepDetailsToolCallsCodeOutputImageObjectType `json:"type"` }
RunStepDetailsToolCallsCodeOutputImageObject defines model for RunStepDetailsToolCallsCodeOutputImageObject.
type RunStepDetailsToolCallsCodeOutputImageObjectType ¶
type RunStepDetailsToolCallsCodeOutputImageObjectType string
RunStepDetailsToolCallsCodeOutputImageObjectType Always `image`.
const (
RunStepDetailsToolCallsCodeOutputImageObjectTypeImage RunStepDetailsToolCallsCodeOutputImageObjectType = "image"
)
Defines values for RunStepDetailsToolCallsCodeOutputImageObjectType.
type RunStepDetailsToolCallsCodeOutputLogsObject ¶
type RunStepDetailsToolCallsCodeOutputLogsObject struct { // Logs The text output from the Code Interpreter tool call. Logs string `json:"logs"` // Type Always `logs`. Type RunStepDetailsToolCallsCodeOutputLogsObjectType `json:"type"` }
RunStepDetailsToolCallsCodeOutputLogsObject Text output from the Code Interpreter tool call as part of a run step.
type RunStepDetailsToolCallsCodeOutputLogsObjectType ¶
type RunStepDetailsToolCallsCodeOutputLogsObjectType string
RunStepDetailsToolCallsCodeOutputLogsObjectType Always `logs`.
const (
RunStepDetailsToolCallsCodeOutputLogsObjectTypeLogs RunStepDetailsToolCallsCodeOutputLogsObjectType = "logs"
)
Defines values for RunStepDetailsToolCallsCodeOutputLogsObjectType.
type RunStepDetailsToolCallsFunctionObject ¶
type RunStepDetailsToolCallsFunctionObject struct { // Function The name of the function to call. Function struct { // Arguments The arguments to pass to the function. Arguments string `json:"arguments"` // Name The name of the function to call. Name string `json:"name"` // Output 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"` // XConfirmation Whether or not the function should be called. XConfirmation *bool `json:"x-confirmation,omitempty"` } `json:"function"` // Id The ID of the tool call object. Id string `json:"id"` // Type The type of tool call. This is always going to be `function` for this type of tool call. Type RunStepDetailsToolCallsFunctionObjectType `json:"type"` }
RunStepDetailsToolCallsFunctionObject defines model for RunStepDetailsToolCallsFunctionObject.
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"
)
Defines values for RunStepDetailsToolCallsFunctionObjectType.
type RunStepDetailsToolCallsObject ¶
type RunStepDetailsToolCallsObject struct { // ToolCalls 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 []RunStepDetailsToolCallsObject_ToolCalls_Item `json:"tool_calls"` // Type Always `tool_calls`. Type RunStepDetailsToolCallsObjectType `json:"type"` }
RunStepDetailsToolCallsObject Details of the tool call.
type RunStepDetailsToolCallsObjectType ¶
type RunStepDetailsToolCallsObjectType string
RunStepDetailsToolCallsObjectType Always `tool_calls`.
const (
RunStepDetailsToolCallsObjectTypeToolCalls RunStepDetailsToolCallsObjectType = "tool_calls"
)
Defines values for RunStepDetailsToolCallsObjectType.
type RunStepDetailsToolCallsObject_ToolCalls_Item ¶
type RunStepDetailsToolCallsObject_ToolCalls_Item struct {
// contains filtered or unexported fields
}
RunStepDetailsToolCallsObject_ToolCalls_Item defines model for RunStepDetailsToolCallsObject.tool_calls.Item.
func (RunStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDetailsToolCallsCodeObject ¶
func (t RunStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDetailsToolCallsCodeObject() (RunStepDetailsToolCallsCodeObject, error)
AsRunStepDetailsToolCallsCodeObject returns the union data inside the RunStepDetailsToolCallsObject_ToolCalls_Item as a RunStepDetailsToolCallsCodeObject
func (RunStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDetailsToolCallsFunctionObject ¶
func (t RunStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDetailsToolCallsFunctionObject() (RunStepDetailsToolCallsFunctionObject, error)
AsRunStepDetailsToolCallsFunctionObject returns the union data inside the RunStepDetailsToolCallsObject_ToolCalls_Item as a RunStepDetailsToolCallsFunctionObject
func (RunStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDetailsToolCallsRetrievalObject ¶
func (t RunStepDetailsToolCallsObject_ToolCalls_Item) AsRunStepDetailsToolCallsRetrievalObject() (RunStepDetailsToolCallsRetrievalObject, error)
AsRunStepDetailsToolCallsRetrievalObject returns the union data inside the RunStepDetailsToolCallsObject_ToolCalls_Item as a RunStepDetailsToolCallsRetrievalObject
func (*RunStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDetailsToolCallsCodeObject ¶
func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDetailsToolCallsCodeObject(v RunStepDetailsToolCallsCodeObject) error
FromRunStepDetailsToolCallsCodeObject overwrites any union data inside the RunStepDetailsToolCallsObject_ToolCalls_Item as the provided RunStepDetailsToolCallsCodeObject
func (*RunStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDetailsToolCallsFunctionObject ¶
func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDetailsToolCallsFunctionObject(v RunStepDetailsToolCallsFunctionObject) error
FromRunStepDetailsToolCallsFunctionObject overwrites any union data inside the RunStepDetailsToolCallsObject_ToolCalls_Item as the provided RunStepDetailsToolCallsFunctionObject
func (*RunStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDetailsToolCallsRetrievalObject ¶
func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) FromRunStepDetailsToolCallsRetrievalObject(v RunStepDetailsToolCallsRetrievalObject) error
FromRunStepDetailsToolCallsRetrievalObject overwrites any union data inside the RunStepDetailsToolCallsObject_ToolCalls_Item as the provided RunStepDetailsToolCallsRetrievalObject
func (RunStepDetailsToolCallsObject_ToolCalls_Item) MarshalJSON ¶
func (t RunStepDetailsToolCallsObject_ToolCalls_Item) MarshalJSON() ([]byte, error)
func (*RunStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDetailsToolCallsCodeObject ¶
func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDetailsToolCallsCodeObject(v RunStepDetailsToolCallsCodeObject) error
MergeRunStepDetailsToolCallsCodeObject performs a merge with any union data inside the RunStepDetailsToolCallsObject_ToolCalls_Item, using the provided RunStepDetailsToolCallsCodeObject
func (*RunStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDetailsToolCallsFunctionObject ¶
func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDetailsToolCallsFunctionObject(v RunStepDetailsToolCallsFunctionObject) error
MergeRunStepDetailsToolCallsFunctionObject performs a merge with any union data inside the RunStepDetailsToolCallsObject_ToolCalls_Item, using the provided RunStepDetailsToolCallsFunctionObject
func (*RunStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDetailsToolCallsRetrievalObject ¶
func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) MergeRunStepDetailsToolCallsRetrievalObject(v RunStepDetailsToolCallsRetrievalObject) error
MergeRunStepDetailsToolCallsRetrievalObject performs a merge with any union data inside the RunStepDetailsToolCallsObject_ToolCalls_Item, using the provided RunStepDetailsToolCallsRetrievalObject
func (*RunStepDetailsToolCallsObject_ToolCalls_Item) UnmarshalJSON ¶
func (t *RunStepDetailsToolCallsObject_ToolCalls_Item) UnmarshalJSON(b []byte) error
type RunStepDetailsToolCallsRetrievalObject ¶
type RunStepDetailsToolCallsRetrievalObject struct { // Id The ID of the tool call object. Id string `json:"id"` // Retrieval For now, this is always going to be an empty object. Retrieval map[string]interface{} `json:"retrieval"` // Type The type of tool call. This is always going to be `retrieval` for this type of tool call. Type RunStepDetailsToolCallsRetrievalObjectType `json:"type"` }
RunStepDetailsToolCallsRetrievalObject defines model for RunStepDetailsToolCallsRetrievalObject.
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 (
Retrieval RunStepDetailsToolCallsRetrievalObjectType = "retrieval"
)
Defines values for RunStepDetailsToolCallsRetrievalObjectType.
type RunStepObject ¶
type RunStepObject struct { // AssistantId The ID of the [assistant](/docs/api-reference/assistants) associated with the run step. AssistantId string `json:"assistant_id"` // CancelledAt The Unix timestamp (in seconds) for when the run step was cancelled. CancelledAt *int `json:"cancelled_at"` // CompletedAt The Unix timestamp (in seconds) for when the run step completed. CompletedAt *int `json:"completed_at"` // CreatedAt The Unix timestamp (in seconds) for when the run step was created. CreatedAt int `json:"created_at"` // ExpiredAt The Unix timestamp (in seconds) for when the run step expired. A step is considered expired if the parent run is expired. ExpiredAt *int `json:"expired_at"` // FailedAt The Unix timestamp (in seconds) for when the run step failed. FailedAt *int `json:"failed_at"` // Id The identifier of the run step, which can be referenced in API endpoints. Id string `json:"id"` // LastError The last error associated with this run step. Will be `null` if there are no errors. LastError *struct { // Code One of `server_error` or `rate_limit_exceeded`. Code RunStepObjectLastErrorCode `json:"code"` // Message A human-readable description of the error. Message string `json:"message"` } `json:"last_error"` // 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. Metadata *map[string]interface{} `json:"metadata"` // Object The object type, which is always `thread.run.step`. Object RunStepObjectObject `json:"object"` // RunId The ID of the [run](/docs/api-reference/runs) that this run step is a part of. RunId string `json:"run_id"` // Status The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`. Status RunStepObjectStatus `json:"status"` // StepDetails The details of the run step. StepDetails RunStepObject_StepDetails `json:"step_details"` // ThreadId The ID of the [thread](/docs/api-reference/threads) that was run. ThreadId string `json:"thread_id"` // Type The type of run step, which can be either `message_creation` or `tool_calls`. Type RunStepObjectType `json:"type"` // Usage 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.
type RunStepObjectLastErrorCode ¶
type RunStepObjectLastErrorCode string
RunStepObjectLastErrorCode One of `server_error` or `rate_limit_exceeded`.
const ( RunStepObjectLastErrorCodeRateLimitExceeded RunStepObjectLastErrorCode = "rate_limit_exceeded" RunStepObjectLastErrorCodeServerError RunStepObjectLastErrorCode = "server_error" )
Defines values for RunStepObjectLastErrorCode.
type RunStepObjectObject ¶
type RunStepObjectObject string
RunStepObjectObject The object type, which is always `thread.run.step`.
const (
ThreadRunStep RunStepObjectObject = "thread.run.step"
)
Defines values for RunStepObjectObject.
type RunStepObjectStatus ¶
type RunStepObjectStatus string
RunStepObjectStatus The status of the run step, which can be either `in_progress`, `cancelled`, `failed`, `completed`, or `expired`.
const ( RunStepObjectStatusCancelled RunStepObjectStatus = "cancelled" RunStepObjectStatusCompleted RunStepObjectStatus = "completed" RunStepObjectStatusExpired RunStepObjectStatus = "expired" RunStepObjectStatusFailed RunStepObjectStatus = "failed" RunStepObjectStatusInProgress RunStepObjectStatus = "in_progress" )
Defines values for RunStepObjectStatus.
type RunStepObjectType ¶
type RunStepObjectType string
RunStepObjectType The type of run step, which can be either `message_creation` or `tool_calls`.
const ( MessageCreation RunStepObjectType = "message_creation" ToolCalls RunStepObjectType = "tool_calls" )
Defines values for RunStepObjectType.
type RunStepObject_StepDetails ¶
type RunStepObject_StepDetails struct {
// contains filtered or unexported fields
}
RunStepObject_StepDetails The details of the run step.
func (RunStepObject_StepDetails) AsRunStepDetailsMessageCreationObject ¶
func (t RunStepObject_StepDetails) AsRunStepDetailsMessageCreationObject() (RunStepDetailsMessageCreationObject, error)
AsRunStepDetailsMessageCreationObject returns the union data inside the RunStepObject_StepDetails as a RunStepDetailsMessageCreationObject
func (RunStepObject_StepDetails) AsRunStepDetailsToolCallsObject ¶
func (t RunStepObject_StepDetails) AsRunStepDetailsToolCallsObject() (RunStepDetailsToolCallsObject, error)
AsRunStepDetailsToolCallsObject returns the union data inside the RunStepObject_StepDetails as a RunStepDetailsToolCallsObject
func (*RunStepObject_StepDetails) FromRunStepDetailsMessageCreationObject ¶
func (t *RunStepObject_StepDetails) FromRunStepDetailsMessageCreationObject(v RunStepDetailsMessageCreationObject) error
FromRunStepDetailsMessageCreationObject overwrites any union data inside the RunStepObject_StepDetails as the provided RunStepDetailsMessageCreationObject
func (*RunStepObject_StepDetails) FromRunStepDetailsToolCallsObject ¶
func (t *RunStepObject_StepDetails) FromRunStepDetailsToolCallsObject(v RunStepDetailsToolCallsObject) error
FromRunStepDetailsToolCallsObject overwrites any union data inside the RunStepObject_StepDetails as the provided RunStepDetailsToolCallsObject
func (RunStepObject_StepDetails) MarshalJSON ¶
func (t RunStepObject_StepDetails) MarshalJSON() ([]byte, error)
func (*RunStepObject_StepDetails) MergeRunStepDetailsMessageCreationObject ¶
func (t *RunStepObject_StepDetails) MergeRunStepDetailsMessageCreationObject(v RunStepDetailsMessageCreationObject) error
MergeRunStepDetailsMessageCreationObject performs a merge with any union data inside the RunStepObject_StepDetails, using the provided RunStepDetailsMessageCreationObject
func (*RunStepObject_StepDetails) MergeRunStepDetailsToolCallsObject ¶
func (t *RunStepObject_StepDetails) MergeRunStepDetailsToolCallsObject(v RunStepDetailsToolCallsObject) error
MergeRunStepDetailsToolCallsObject performs a merge with any union data inside the RunStepObject_StepDetails, using the provided RunStepDetailsToolCallsObject
func (*RunStepObject_StepDetails) UnmarshalJSON ¶
func (t *RunStepObject_StepDetails) UnmarshalJSON(b []byte) error
type RunStepStreamEvent ¶
type RunStepStreamEvent struct {
// contains filtered or unexported fields
}
RunStepStreamEvent defines model for RunStepStreamEvent.
func (RunStepStreamEvent) AsRunStepStreamEvent0 ¶
func (t RunStepStreamEvent) AsRunStepStreamEvent0() (RunStepStreamEvent0, error)
AsRunStepStreamEvent0 returns the union data inside the RunStepStreamEvent as a RunStepStreamEvent0
func (RunStepStreamEvent) AsRunStepStreamEvent1 ¶
func (t RunStepStreamEvent) AsRunStepStreamEvent1() (RunStepStreamEvent1, error)
AsRunStepStreamEvent1 returns the union data inside the RunStepStreamEvent as a RunStepStreamEvent1
func (RunStepStreamEvent) AsRunStepStreamEvent2 ¶
func (t RunStepStreamEvent) AsRunStepStreamEvent2() (RunStepStreamEvent2, error)
AsRunStepStreamEvent2 returns the union data inside the RunStepStreamEvent as a RunStepStreamEvent2
func (RunStepStreamEvent) AsRunStepStreamEvent3 ¶
func (t RunStepStreamEvent) AsRunStepStreamEvent3() (RunStepStreamEvent3, error)
AsRunStepStreamEvent3 returns the union data inside the RunStepStreamEvent as a RunStepStreamEvent3
func (RunStepStreamEvent) AsRunStepStreamEvent4 ¶
func (t RunStepStreamEvent) AsRunStepStreamEvent4() (RunStepStreamEvent4, error)
AsRunStepStreamEvent4 returns the union data inside the RunStepStreamEvent as a RunStepStreamEvent4
func (RunStepStreamEvent) AsRunStepStreamEvent5 ¶
func (t RunStepStreamEvent) AsRunStepStreamEvent5() (RunStepStreamEvent5, error)
AsRunStepStreamEvent5 returns the union data inside the RunStepStreamEvent as a RunStepStreamEvent5
func (RunStepStreamEvent) AsRunStepStreamEvent6 ¶
func (t RunStepStreamEvent) AsRunStepStreamEvent6() (RunStepStreamEvent6, error)
AsRunStepStreamEvent6 returns the union data inside the RunStepStreamEvent as a RunStepStreamEvent6
func (*RunStepStreamEvent) FromRunStepStreamEvent0 ¶
func (t *RunStepStreamEvent) FromRunStepStreamEvent0(v RunStepStreamEvent0) error
FromRunStepStreamEvent0 overwrites any union data inside the RunStepStreamEvent as the provided RunStepStreamEvent0
func (*RunStepStreamEvent) FromRunStepStreamEvent1 ¶
func (t *RunStepStreamEvent) FromRunStepStreamEvent1(v RunStepStreamEvent1) error
FromRunStepStreamEvent1 overwrites any union data inside the RunStepStreamEvent as the provided RunStepStreamEvent1
func (*RunStepStreamEvent) FromRunStepStreamEvent2 ¶
func (t *RunStepStreamEvent) FromRunStepStreamEvent2(v RunStepStreamEvent2) error
FromRunStepStreamEvent2 overwrites any union data inside the RunStepStreamEvent as the provided RunStepStreamEvent2
func (*RunStepStreamEvent) FromRunStepStreamEvent3 ¶
func (t *RunStepStreamEvent) FromRunStepStreamEvent3(v RunStepStreamEvent3) error
FromRunStepStreamEvent3 overwrites any union data inside the RunStepStreamEvent as the provided RunStepStreamEvent3
func (*RunStepStreamEvent) FromRunStepStreamEvent4 ¶
func (t *RunStepStreamEvent) FromRunStepStreamEvent4(v RunStepStreamEvent4) error
FromRunStepStreamEvent4 overwrites any union data inside the RunStepStreamEvent as the provided RunStepStreamEvent4
func (*RunStepStreamEvent) FromRunStepStreamEvent5 ¶
func (t *RunStepStreamEvent) FromRunStepStreamEvent5(v RunStepStreamEvent5) error
FromRunStepStreamEvent5 overwrites any union data inside the RunStepStreamEvent as the provided RunStepStreamEvent5
func (*RunStepStreamEvent) FromRunStepStreamEvent6 ¶
func (t *RunStepStreamEvent) FromRunStepStreamEvent6(v RunStepStreamEvent6) error
FromRunStepStreamEvent6 overwrites any union data inside the RunStepStreamEvent as the provided RunStepStreamEvent6
func (RunStepStreamEvent) MarshalJSON ¶
func (t RunStepStreamEvent) MarshalJSON() ([]byte, error)
func (*RunStepStreamEvent) MergeRunStepStreamEvent0 ¶
func (t *RunStepStreamEvent) MergeRunStepStreamEvent0(v RunStepStreamEvent0) error
MergeRunStepStreamEvent0 performs a merge with any union data inside the RunStepStreamEvent, using the provided RunStepStreamEvent0
func (*RunStepStreamEvent) MergeRunStepStreamEvent1 ¶
func (t *RunStepStreamEvent) MergeRunStepStreamEvent1(v RunStepStreamEvent1) error
MergeRunStepStreamEvent1 performs a merge with any union data inside the RunStepStreamEvent, using the provided RunStepStreamEvent1
func (*RunStepStreamEvent) MergeRunStepStreamEvent2 ¶
func (t *RunStepStreamEvent) MergeRunStepStreamEvent2(v RunStepStreamEvent2) error
MergeRunStepStreamEvent2 performs a merge with any union data inside the RunStepStreamEvent, using the provided RunStepStreamEvent2
func (*RunStepStreamEvent) MergeRunStepStreamEvent3 ¶
func (t *RunStepStreamEvent) MergeRunStepStreamEvent3(v RunStepStreamEvent3) error
MergeRunStepStreamEvent3 performs a merge with any union data inside the RunStepStreamEvent, using the provided RunStepStreamEvent3
func (*RunStepStreamEvent) MergeRunStepStreamEvent4 ¶
func (t *RunStepStreamEvent) MergeRunStepStreamEvent4(v RunStepStreamEvent4) error
MergeRunStepStreamEvent4 performs a merge with any union data inside the RunStepStreamEvent, using the provided RunStepStreamEvent4
func (*RunStepStreamEvent) MergeRunStepStreamEvent5 ¶
func (t *RunStepStreamEvent) MergeRunStepStreamEvent5(v RunStepStreamEvent5) error
MergeRunStepStreamEvent5 performs a merge with any union data inside the RunStepStreamEvent, using the provided RunStepStreamEvent5
func (*RunStepStreamEvent) MergeRunStepStreamEvent6 ¶
func (t *RunStepStreamEvent) MergeRunStepStreamEvent6(v RunStepStreamEvent6) error
MergeRunStepStreamEvent6 performs a merge with any union data inside the RunStepStreamEvent, using the provided RunStepStreamEvent6
func (*RunStepStreamEvent) UnmarshalJSON ¶
func (t *RunStepStreamEvent) UnmarshalJSON(b []byte) error
type RunStepStreamEvent0 ¶
type RunStepStreamEvent0 struct { // Data Represents a step in execution of a run. Data RunStepObject `json:"data"` Event RunStepStreamEvent0Event `json:"event"` }
RunStepStreamEvent0 Occurs when a [run step](/docs/api-reference/runs/step-object) is created.
type RunStepStreamEvent0Event ¶
type RunStepStreamEvent0Event string
RunStepStreamEvent0Event defines model for RunStepStreamEvent.0.Event.
const (
ThreadRunStepCreated RunStepStreamEvent0Event = "thread.run.step.created"
)
Defines values for RunStepStreamEvent0Event.
type RunStepStreamEvent1 ¶
type RunStepStreamEvent1 struct { // Data Represents a step in execution of a run. Data RunStepObject `json:"data"` Event RunStepStreamEvent1Event `json:"event"` }
RunStepStreamEvent1 Occurs when a [run step](/docs/api-reference/runs/step-object) moves to an `in_progress` state.
type RunStepStreamEvent1Event ¶
type RunStepStreamEvent1Event string
RunStepStreamEvent1Event defines model for RunStepStreamEvent.1.Event.
const (
ThreadRunStepInProgress RunStepStreamEvent1Event = "thread.run.step.in_progress"
)
Defines values for RunStepStreamEvent1Event.
type RunStepStreamEvent2 ¶
type RunStepStreamEvent2 struct { // Data Represents a run step delta i.e. any changed fields on a run step during streaming. Data RunStepDeltaObject `json:"data"` Event RunStepStreamEvent2Event `json:"event"` }
RunStepStreamEvent2 Occurs when parts of a [run step](/docs/api-reference/runs/step-object) are being streamed.
type RunStepStreamEvent2Event ¶
type RunStepStreamEvent2Event string
RunStepStreamEvent2Event defines model for RunStepStreamEvent.2.Event.
const (
RunStepStreamEvent2EventThreadRunStepDelta RunStepStreamEvent2Event = "thread.run.step.delta"
)
Defines values for RunStepStreamEvent2Event.
type RunStepStreamEvent3 ¶
type RunStepStreamEvent3 struct { // Data Represents a step in execution of a run. Data RunStepObject `json:"data"` Event RunStepStreamEvent3Event `json:"event"` }
RunStepStreamEvent3 Occurs when a [run step](/docs/api-reference/runs/step-object) is completed.
type RunStepStreamEvent3Event ¶
type RunStepStreamEvent3Event string
RunStepStreamEvent3Event defines model for RunStepStreamEvent.3.Event.
const (
ThreadRunStepCompleted RunStepStreamEvent3Event = "thread.run.step.completed"
)
Defines values for RunStepStreamEvent3Event.
type RunStepStreamEvent4 ¶
type RunStepStreamEvent4 struct { // Data Represents a step in execution of a run. Data RunStepObject `json:"data"` Event RunStepStreamEvent4Event `json:"event"` }
RunStepStreamEvent4 Occurs when a [run step](/docs/api-reference/runs/step-object) fails.
type RunStepStreamEvent4Event ¶
type RunStepStreamEvent4Event string
RunStepStreamEvent4Event defines model for RunStepStreamEvent.4.Event.
const (
ThreadRunStepFailed RunStepStreamEvent4Event = "thread.run.step.failed"
)
Defines values for RunStepStreamEvent4Event.
type RunStepStreamEvent5 ¶
type RunStepStreamEvent5 struct { // Data Represents a step in execution of a run. Data RunStepObject `json:"data"` Event RunStepStreamEvent5Event `json:"event"` }
RunStepStreamEvent5 Occurs when a [run step](/docs/api-reference/runs/step-object) is cancelled.
type RunStepStreamEvent5Event ¶
type RunStepStreamEvent5Event string
RunStepStreamEvent5Event defines model for RunStepStreamEvent.5.Event.
const (
ThreadRunStepCancelled RunStepStreamEvent5Event = "thread.run.step.cancelled"
)
Defines values for RunStepStreamEvent5Event.
type RunStepStreamEvent6 ¶
type RunStepStreamEvent6 struct { // Data Represents a step in execution of a run. Data RunStepObject `json:"data"` Event RunStepStreamEvent6Event `json:"event"` }
RunStepStreamEvent6 Occurs when a [run step](/docs/api-reference/runs/step-object) expires.
type RunStepStreamEvent6Event ¶
type RunStepStreamEvent6Event string
RunStepStreamEvent6Event defines model for RunStepStreamEvent.6.Event.
const (
ThreadRunStepExpired RunStepStreamEvent6Event = "thread.run.step.expired"
)
Defines values for RunStepStreamEvent6Event.
type RunStreamEvent ¶
type RunStreamEvent struct {
// contains filtered or unexported fields
}
RunStreamEvent defines model for RunStreamEvent.
func (RunStreamEvent) AsRunStreamEvent0 ¶
func (t RunStreamEvent) AsRunStreamEvent0() (RunStreamEvent0, error)
AsRunStreamEvent0 returns the union data inside the RunStreamEvent as a RunStreamEvent0
func (RunStreamEvent) AsRunStreamEvent1 ¶
func (t RunStreamEvent) AsRunStreamEvent1() (RunStreamEvent1, error)
AsRunStreamEvent1 returns the union data inside the RunStreamEvent as a RunStreamEvent1
func (RunStreamEvent) AsRunStreamEvent2 ¶
func (t RunStreamEvent) AsRunStreamEvent2() (RunStreamEvent2, error)
AsRunStreamEvent2 returns the union data inside the RunStreamEvent as a RunStreamEvent2
func (RunStreamEvent) AsRunStreamEvent3 ¶
func (t RunStreamEvent) AsRunStreamEvent3() (RunStreamEvent3, error)
AsRunStreamEvent3 returns the union data inside the RunStreamEvent as a RunStreamEvent3
func (RunStreamEvent) AsRunStreamEvent4 ¶
func (t RunStreamEvent) AsRunStreamEvent4() (RunStreamEvent4, error)
AsRunStreamEvent4 returns the union data inside the RunStreamEvent as a RunStreamEvent4
func (RunStreamEvent) AsRunStreamEvent5 ¶
func (t RunStreamEvent) AsRunStreamEvent5() (RunStreamEvent5, error)
AsRunStreamEvent5 returns the union data inside the RunStreamEvent as a RunStreamEvent5
func (RunStreamEvent) AsRunStreamEvent6 ¶
func (t RunStreamEvent) AsRunStreamEvent6() (RunStreamEvent6, error)
AsRunStreamEvent6 returns the union data inside the RunStreamEvent as a RunStreamEvent6
func (RunStreamEvent) AsRunStreamEvent7 ¶
func (t RunStreamEvent) AsRunStreamEvent7() (RunStreamEvent7, error)
AsRunStreamEvent7 returns the union data inside the RunStreamEvent as a RunStreamEvent7
func (RunStreamEvent) AsRunStreamEvent8 ¶
func (t RunStreamEvent) AsRunStreamEvent8() (RunStreamEvent8, error)
AsRunStreamEvent8 returns the union data inside the RunStreamEvent as a RunStreamEvent8
func (*RunStreamEvent) FromRunStreamEvent0 ¶
func (t *RunStreamEvent) FromRunStreamEvent0(v RunStreamEvent0) error
FromRunStreamEvent0 overwrites any union data inside the RunStreamEvent as the provided RunStreamEvent0
func (*RunStreamEvent) FromRunStreamEvent1 ¶
func (t *RunStreamEvent) FromRunStreamEvent1(v RunStreamEvent1) error
FromRunStreamEvent1 overwrites any union data inside the RunStreamEvent as the provided RunStreamEvent1
func (*RunStreamEvent) FromRunStreamEvent2 ¶
func (t *RunStreamEvent) FromRunStreamEvent2(v RunStreamEvent2) error
FromRunStreamEvent2 overwrites any union data inside the RunStreamEvent as the provided RunStreamEvent2
func (*RunStreamEvent) FromRunStreamEvent3 ¶
func (t *RunStreamEvent) FromRunStreamEvent3(v RunStreamEvent3) error
FromRunStreamEvent3 overwrites any union data inside the RunStreamEvent as the provided RunStreamEvent3
func (*RunStreamEvent) FromRunStreamEvent4 ¶
func (t *RunStreamEvent) FromRunStreamEvent4(v RunStreamEvent4) error
FromRunStreamEvent4 overwrites any union data inside the RunStreamEvent as the provided RunStreamEvent4
func (*RunStreamEvent) FromRunStreamEvent5 ¶
func (t *RunStreamEvent) FromRunStreamEvent5(v RunStreamEvent5) error
FromRunStreamEvent5 overwrites any union data inside the RunStreamEvent as the provided RunStreamEvent5
func (*RunStreamEvent) FromRunStreamEvent6 ¶
func (t *RunStreamEvent) FromRunStreamEvent6(v RunStreamEvent6) error
FromRunStreamEvent6 overwrites any union data inside the RunStreamEvent as the provided RunStreamEvent6
func (*RunStreamEvent) FromRunStreamEvent7 ¶
func (t *RunStreamEvent) FromRunStreamEvent7(v RunStreamEvent7) error
FromRunStreamEvent7 overwrites any union data inside the RunStreamEvent as the provided RunStreamEvent7
func (*RunStreamEvent) FromRunStreamEvent8 ¶
func (t *RunStreamEvent) FromRunStreamEvent8(v RunStreamEvent8) error
FromRunStreamEvent8 overwrites any union data inside the RunStreamEvent as the provided RunStreamEvent8
func (RunStreamEvent) MarshalJSON ¶
func (t RunStreamEvent) MarshalJSON() ([]byte, error)
func (*RunStreamEvent) MergeRunStreamEvent0 ¶
func (t *RunStreamEvent) MergeRunStreamEvent0(v RunStreamEvent0) error
MergeRunStreamEvent0 performs a merge with any union data inside the RunStreamEvent, using the provided RunStreamEvent0
func (*RunStreamEvent) MergeRunStreamEvent1 ¶
func (t *RunStreamEvent) MergeRunStreamEvent1(v RunStreamEvent1) error
MergeRunStreamEvent1 performs a merge with any union data inside the RunStreamEvent, using the provided RunStreamEvent1
func (*RunStreamEvent) MergeRunStreamEvent2 ¶
func (t *RunStreamEvent) MergeRunStreamEvent2(v RunStreamEvent2) error
MergeRunStreamEvent2 performs a merge with any union data inside the RunStreamEvent, using the provided RunStreamEvent2
func (*RunStreamEvent) MergeRunStreamEvent3 ¶
func (t *RunStreamEvent) MergeRunStreamEvent3(v RunStreamEvent3) error
MergeRunStreamEvent3 performs a merge with any union data inside the RunStreamEvent, using the provided RunStreamEvent3
func (*RunStreamEvent) MergeRunStreamEvent4 ¶
func (t *RunStreamEvent) MergeRunStreamEvent4(v RunStreamEvent4) error
MergeRunStreamEvent4 performs a merge with any union data inside the RunStreamEvent, using the provided RunStreamEvent4
func (*RunStreamEvent) MergeRunStreamEvent5 ¶
func (t *RunStreamEvent) MergeRunStreamEvent5(v RunStreamEvent5) error
MergeRunStreamEvent5 performs a merge with any union data inside the RunStreamEvent, using the provided RunStreamEvent5
func (*RunStreamEvent) MergeRunStreamEvent6 ¶
func (t *RunStreamEvent) MergeRunStreamEvent6(v RunStreamEvent6) error
MergeRunStreamEvent6 performs a merge with any union data inside the RunStreamEvent, using the provided RunStreamEvent6
func (*RunStreamEvent) MergeRunStreamEvent7 ¶
func (t *RunStreamEvent) MergeRunStreamEvent7(v RunStreamEvent7) error
MergeRunStreamEvent7 performs a merge with any union data inside the RunStreamEvent, using the provided RunStreamEvent7
func (*RunStreamEvent) MergeRunStreamEvent8 ¶
func (t *RunStreamEvent) MergeRunStreamEvent8(v RunStreamEvent8) error
MergeRunStreamEvent8 performs a merge with any union data inside the RunStreamEvent, using the provided RunStreamEvent8
func (*RunStreamEvent) UnmarshalJSON ¶
func (t *RunStreamEvent) UnmarshalJSON(b []byte) error
type RunStreamEvent0 ¶
type RunStreamEvent0 struct { // Data Represents an execution run on a [thread](/docs/api-reference/threads). Data RunObject `json:"data"` Event RunStreamEvent0Event `json:"event"` }
RunStreamEvent0 Occurs when a new [run](/docs/api-reference/runs/object) is created.
type RunStreamEvent0Event ¶
type RunStreamEvent0Event string
RunStreamEvent0Event defines model for RunStreamEvent.0.Event.
const (
ThreadRunCreated RunStreamEvent0Event = "thread.run.created"
)
Defines values for RunStreamEvent0Event.
type RunStreamEvent1 ¶
type RunStreamEvent1 struct { // Data Represents an execution run on a [thread](/docs/api-reference/threads). Data RunObject `json:"data"` Event RunStreamEvent1Event `json:"event"` }
RunStreamEvent1 Occurs when a [run](/docs/api-reference/runs/object) moves to a `queued` status.
type RunStreamEvent1Event ¶
type RunStreamEvent1Event string
RunStreamEvent1Event defines model for RunStreamEvent.1.Event.
const (
ThreadRunQueued RunStreamEvent1Event = "thread.run.queued"
)
Defines values for RunStreamEvent1Event.
type RunStreamEvent2 ¶
type RunStreamEvent2 struct { // Data Represents an execution run on a [thread](/docs/api-reference/threads). Data RunObject `json:"data"` Event RunStreamEvent2Event `json:"event"` }
RunStreamEvent2 Occurs when a [run](/docs/api-reference/runs/object) moves to an `in_progress` status.
type RunStreamEvent2Event ¶
type RunStreamEvent2Event string
RunStreamEvent2Event defines model for RunStreamEvent.2.Event.
const (
ThreadRunInProgress RunStreamEvent2Event = "thread.run.in_progress"
)
Defines values for RunStreamEvent2Event.
type RunStreamEvent3 ¶
type RunStreamEvent3 struct { // Data Represents an execution run on a [thread](/docs/api-reference/threads). Data RunObject `json:"data"` Event RunStreamEvent3Event `json:"event"` }
RunStreamEvent3 Occurs when a [run](/docs/api-reference/runs/object) moves to a `requires_action` status.
type RunStreamEvent3Event ¶
type RunStreamEvent3Event string
RunStreamEvent3Event defines model for RunStreamEvent.3.Event.
const (
ThreadRunRequiresAction RunStreamEvent3Event = "thread.run.requires_action"
)
Defines values for RunStreamEvent3Event.
type RunStreamEvent4 ¶
type RunStreamEvent4 struct { // Data Represents an execution run on a [thread](/docs/api-reference/threads). Data RunObject `json:"data"` Event RunStreamEvent4Event `json:"event"` }
RunStreamEvent4 Occurs when a [run](/docs/api-reference/runs/object) is completed.
type RunStreamEvent4Event ¶
type RunStreamEvent4Event string
RunStreamEvent4Event defines model for RunStreamEvent.4.Event.
const (
ThreadRunCompleted RunStreamEvent4Event = "thread.run.completed"
)
Defines values for RunStreamEvent4Event.
type RunStreamEvent5 ¶
type RunStreamEvent5 struct { // Data Represents an execution run on a [thread](/docs/api-reference/threads). Data RunObject `json:"data"` Event RunStreamEvent5Event `json:"event"` }
RunStreamEvent5 Occurs when a [run](/docs/api-reference/runs/object) fails.
type RunStreamEvent5Event ¶
type RunStreamEvent5Event string
RunStreamEvent5Event defines model for RunStreamEvent.5.Event.
const (
ThreadRunFailed RunStreamEvent5Event = "thread.run.failed"
)
Defines values for RunStreamEvent5Event.
type RunStreamEvent6 ¶
type RunStreamEvent6 struct { // Data Represents an execution run on a [thread](/docs/api-reference/threads). Data RunObject `json:"data"` Event RunStreamEvent6Event `json:"event"` }
RunStreamEvent6 Occurs when a [run](/docs/api-reference/runs/object) moves to a `cancelling` status.
type RunStreamEvent6Event ¶
type RunStreamEvent6Event string
RunStreamEvent6Event defines model for RunStreamEvent.6.Event.
const (
ThreadRunCancelling RunStreamEvent6Event = "thread.run.cancelling"
)
Defines values for RunStreamEvent6Event.
type RunStreamEvent7 ¶
type RunStreamEvent7 struct { // Data Represents an execution run on a [thread](/docs/api-reference/threads). Data RunObject `json:"data"` Event RunStreamEvent7Event `json:"event"` }
RunStreamEvent7 Occurs when a [run](/docs/api-reference/runs/object) is cancelled.
type RunStreamEvent7Event ¶
type RunStreamEvent7Event string
RunStreamEvent7Event defines model for RunStreamEvent.7.Event.
const (
ThreadRunCancelled RunStreamEvent7Event = "thread.run.cancelled"
)
Defines values for RunStreamEvent7Event.
type RunStreamEvent8 ¶
type RunStreamEvent8 struct { // Data Represents an execution run on a [thread](/docs/api-reference/threads). Data RunObject `json:"data"` Event RunStreamEvent8Event `json:"event"` }
RunStreamEvent8 Occurs when a [run](/docs/api-reference/runs/object) expires.
type RunStreamEvent8Event ¶
type RunStreamEvent8Event string
RunStreamEvent8Event defines model for RunStreamEvent.8.Event.
const (
ThreadRunExpired RunStreamEvent8Event = "thread.run.expired"
)
Defines values for RunStreamEvent8Event.
type RunToolCallObject ¶
type RunToolCallObject struct { // Function The function definition. Function struct { // Arguments The arguments that the model expects you to pass to the function. Arguments string `json:"arguments"` // Name The name of the function. Name string `json:"name"` } `json:"function"` // Id 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"` // Type The type of tool call the output is required for. For now, this is always `function`. Type RunToolCallObjectType `json:"type"` }
RunToolCallObject Tool call objects
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"
)
Defines values for RunToolCallObjectType.
type ServerInterface ¶
type ServerInterface interface { // Returns a list of assistants. // (GET /assistants) ListAssistants(w http.ResponseWriter, r *http.Request, params ListAssistantsParams) // Create an assistant with a model and instructions. // (POST /assistants) CreateAssistant(w http.ResponseWriter, r *http.Request) // Delete an assistant. // (DELETE /assistants/{assistant_id}) DeleteAssistant(w http.ResponseWriter, r *http.Request, assistantId string) // Retrieves an assistant. // (GET /assistants/{assistant_id}) GetAssistant(w http.ResponseWriter, r *http.Request, assistantId string) // Modifies an assistant. // (POST /assistants/{assistant_id}) ModifyAssistant(w http.ResponseWriter, r *http.Request, assistantId string) // Returns a list of assistant files. // (GET /assistants/{assistant_id}/files) ListAssistantFiles(w http.ResponseWriter, r *http.Request, assistantId string, params ListAssistantFilesParams) // Create an assistant file by attaching a [File](/docs/api-reference/files) to an [assistant](/docs/api-reference/assistants). // (POST /assistants/{assistant_id}/files) CreateAssistantFile(w http.ResponseWriter, r *http.Request, assistantId string) // Delete an assistant file. // (DELETE /assistants/{assistant_id}/files/{file_id}) DeleteAssistantFile(w http.ResponseWriter, r *http.Request, assistantId string, fileId string) // Retrieves an AssistantFile. // (GET /assistants/{assistant_id}/files/{file_id}) GetAssistantFile(w http.ResponseWriter, r *http.Request, assistantId string, fileId string) // Generates audio from the input text. // (POST /audio/speech) CreateSpeech(w http.ResponseWriter, r *http.Request) // Transcribes audio into the input language. // (POST /audio/transcriptions) CreateTranscription(w http.ResponseWriter, r *http.Request) // Translates audio into English. // (POST /audio/translations) CreateTranslation(w http.ResponseWriter, r *http.Request) // Creates a model response for the given chat conversation. // (POST /chat/completions) CreateChatCompletion(w http.ResponseWriter, r *http.Request) // Creates a completion for the provided prompt and parameters. // (POST /completions) CreateCompletion(w http.ResponseWriter, r *http.Request) // Creates an embedding vector representing the input text. // (POST /embeddings) CreateEmbedding(w http.ResponseWriter, r *http.Request) // Returns a list of files that belong to the user's organization. // (GET /files) ListFiles(w http.ResponseWriter, r *http.Request, params ListFilesParams) // Upload a file that can be used across various endpoints. The size of all the files uploaded by one organization can be up to 100 GB. // // The size of individual files can be a maximum of 512 MB or 2 million tokens for Assistants. See the [Assistants Tools guide](/docs/assistants/tools) to learn more about the types of files supported. The Fine-tuning API only supports `.jsonl` files. // // Please [contact us](https://help.openai.com/) if you need to increase these storage limits. // (POST /files) CreateFile(w http.ResponseWriter, r *http.Request) // Delete a file. // (DELETE /files/{file_id}) DeleteFile(w http.ResponseWriter, r *http.Request, fileId string) // Returns information about a specific file. // (GET /files/{file_id}) RetrieveFile(w http.ResponseWriter, r *http.Request, fileId string) // Returns the contents of the specified file. // (GET /files/{file_id}/content) DownloadFile(w http.ResponseWriter, r *http.Request, fileId string) // List your organization's fine-tuning jobs // (GET /fine_tuning/jobs) ListPaginatedFineTuningJobs(w http.ResponseWriter, r *http.Request, params ListPaginatedFineTuningJobsParams) // Creates a fine-tuning job which begins the process of creating a new model from a given dataset. // // Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. // // [Learn more about fine-tuning](/docs/guides/fine-tuning) // (POST /fine_tuning/jobs) CreateFineTuningJob(w http.ResponseWriter, r *http.Request) // Get info about a fine-tuning job. // // [Learn more about fine-tuning](/docs/guides/fine-tuning) // (GET /fine_tuning/jobs/{fine_tuning_job_id}) RetrieveFineTuningJob(w http.ResponseWriter, r *http.Request, fineTuningJobId string) // Immediately cancel a fine-tune job. // (POST /fine_tuning/jobs/{fine_tuning_job_id}/cancel) CancelFineTuningJob(w http.ResponseWriter, r *http.Request, fineTuningJobId string) // Get status updates for a fine-tuning job. // (GET /fine_tuning/jobs/{fine_tuning_job_id}/events) ListFineTuningEvents(w http.ResponseWriter, r *http.Request, fineTuningJobId string, params ListFineTuningEventsParams) // Creates an edited or extended image given an original image and a prompt. // (POST /images/edits) CreateImageEdit(w http.ResponseWriter, r *http.Request) // Creates an image given a prompt. // (POST /images/generations) CreateImage(w http.ResponseWriter, r *http.Request) // Creates a variation of a given image. // (POST /images/variations) CreateImageVariation(w http.ResponseWriter, r *http.Request) // Lists the currently available models, and provides basic information about each one such as the owner and availability. // (GET /models) ListModels(w http.ResponseWriter, r *http.Request) // Delete a fine-tuned model. You must have the Owner role in your organization to delete a model. // (DELETE /models/{model}) DeleteModel(w http.ResponseWriter, r *http.Request, model string) // Retrieves a model instance, providing basic information about the model such as the owner and permissioning. // (GET /models/{model}) RetrieveModel(w http.ResponseWriter, r *http.Request, model string) // Classifies if text is potentially harmful. // (POST /moderations) CreateModeration(w http.ResponseWriter, r *http.Request) // Create a thread. // (POST /threads) CreateThread(w http.ResponseWriter, r *http.Request) // Create a thread and run it in one request. // (POST /threads/runs) CreateThreadAndRun(w http.ResponseWriter, r *http.Request) // Delete a thread. // (DELETE /threads/{thread_id}) DeleteThread(w http.ResponseWriter, r *http.Request, threadId string) // Retrieves a thread. // (GET /threads/{thread_id}) GetThread(w http.ResponseWriter, r *http.Request, threadId string) // Modifies a thread. // (POST /threads/{thread_id}) ModifyThread(w http.ResponseWriter, r *http.Request, threadId string) // Returns a list of messages for a given thread. // (GET /threads/{thread_id}/messages) ListMessages(w http.ResponseWriter, r *http.Request, threadId string, params ListMessagesParams) // Create a message. // (POST /threads/{thread_id}/messages) CreateMessage(w http.ResponseWriter, r *http.Request, threadId string) // Retrieve a message. // (GET /threads/{thread_id}/messages/{message_id}) GetMessage(w http.ResponseWriter, r *http.Request, threadId string, messageId string) // Modifies a message. // (POST /threads/{thread_id}/messages/{message_id}) ModifyMessage(w http.ResponseWriter, r *http.Request, threadId string, messageId string) // Returns a list of message files. // (GET /threads/{thread_id}/messages/{message_id}/files) ListMessageFiles(w http.ResponseWriter, r *http.Request, threadId string, messageId string, params ListMessageFilesParams) // Retrieves a message file. // (GET /threads/{thread_id}/messages/{message_id}/files/{file_id}) GetMessageFile(w http.ResponseWriter, r *http.Request, threadId string, messageId string, fileId string) // Returns a list of runs belonging to a thread. // (GET /threads/{thread_id}/runs) ListRuns(w http.ResponseWriter, r *http.Request, threadId string, params ListRunsParams) // Create a run. // (POST /threads/{thread_id}/runs) CreateRun(w http.ResponseWriter, r *http.Request, threadId string) // Retrieves a run. // (GET /threads/{thread_id}/runs/{run_id}) GetRun(w http.ResponseWriter, r *http.Request, threadId string, runId string) // Modifies a run. // (POST /threads/{thread_id}/runs/{run_id}) ModifyRun(w http.ResponseWriter, r *http.Request, threadId string, runId string) // Cancels a run that is `in_progress`. // (POST /threads/{thread_id}/runs/{run_id}/cancel) CancelRun(w http.ResponseWriter, r *http.Request, threadId string, runId string) // Returns a list of run steps belonging to a run. // (GET /threads/{thread_id}/runs/{run_id}/steps) ListRunSteps(w http.ResponseWriter, r *http.Request, threadId string, runId string, params ListRunStepsParams) // Retrieves a run step. // (GET /threads/{thread_id}/runs/{run_id}/steps/{step_id}) GetRunStep(w http.ResponseWriter, r *http.Request, threadId string, runId string, stepId string) // List run step events // (GET /threads/{thread_id}/runs/{run_id}/steps/{step_id}/x-events) XListRunStepEvents(w http.ResponseWriter, r *http.Request, threadId string, runId string, stepId string, params XListRunStepEventsParams) // When a run has the `status: "requires_action"` and `required_action.type` is `submit_tool_outputs`, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request. // (POST /threads/{thread_id}/runs/{run_id}/submit_tool_outputs) SubmitToolOuputsToRun(w http.ResponseWriter, r *http.Request, threadId string, runId string) // When a run has the `status: "requires_confirmation"` and `required_action.type` is `confirm`, this endpoint can be used to confirm or deny the tool call. // (POST /threads/{thread_id}/runs/{run_id}/x-confirm) XConfirmRun(w http.ResponseWriter, r *http.Request, threadId string, runId string) // Stream run events when the run is in progress // (GET /threads/{thread_id}/runs/{run_id}/x-stream) XStreamRun(w http.ResponseWriter, r *http.Request, threadId string, runId string, params XStreamRunParams) // List threads // (GET /x-threads) XListThreads(w http.ResponseWriter, r *http.Request, params XListThreadsParams) // List tools // (GET /x-tools) XListTools(w http.ResponseWriter, r *http.Request, params XListToolsParams) // Creates a tool for use with gptscript engine. // (POST /x-tools) XCreateTool(w http.ResponseWriter, r *http.Request) // Inspect tool // (POST /x-tools/inspect) XInspectTool(w http.ResponseWriter, r *http.Request) // Run tool // (POST /x-tools/run) XRunTool(w http.ResponseWriter, r *http.Request) // Delete tool // (DELETE /x-tools/{id}) XDeleteTool(w http.ResponseWriter, r *http.Request, id string) // Get tool // (GET /x-tools/{id}) XGetTool(w http.ResponseWriter, r *http.Request, id string) // Modify tool // (POST /x-tools/{id}) XModifyTool(w http.ResponseWriter, r *http.Request, id string) // Confirm tool run // (POST /x-tools/{tool_id}/confirm) XConfirmToolRun(w http.ResponseWriter, r *http.Request, toolId string) }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct { Handler ServerInterface HandlerMiddlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
ServerInterfaceWrapper converts contexts to parameters.
func (*ServerInterfaceWrapper) CancelFineTuningJob ¶
func (siw *ServerInterfaceWrapper) CancelFineTuningJob(w http.ResponseWriter, r *http.Request)
CancelFineTuningJob operation middleware
func (*ServerInterfaceWrapper) CancelRun ¶
func (siw *ServerInterfaceWrapper) CancelRun(w http.ResponseWriter, r *http.Request)
CancelRun operation middleware
func (*ServerInterfaceWrapper) CreateAssistant ¶
func (siw *ServerInterfaceWrapper) CreateAssistant(w http.ResponseWriter, r *http.Request)
CreateAssistant operation middleware
func (*ServerInterfaceWrapper) CreateAssistantFile ¶
func (siw *ServerInterfaceWrapper) CreateAssistantFile(w http.ResponseWriter, r *http.Request)
CreateAssistantFile operation middleware
func (*ServerInterfaceWrapper) CreateChatCompletion ¶
func (siw *ServerInterfaceWrapper) CreateChatCompletion(w http.ResponseWriter, r *http.Request)
CreateChatCompletion operation middleware
func (*ServerInterfaceWrapper) CreateCompletion ¶
func (siw *ServerInterfaceWrapper) CreateCompletion(w http.ResponseWriter, r *http.Request)
CreateCompletion operation middleware
func (*ServerInterfaceWrapper) CreateEmbedding ¶
func (siw *ServerInterfaceWrapper) CreateEmbedding(w http.ResponseWriter, r *http.Request)
CreateEmbedding operation middleware
func (*ServerInterfaceWrapper) CreateFile ¶
func (siw *ServerInterfaceWrapper) CreateFile(w http.ResponseWriter, r *http.Request)
CreateFile operation middleware
func (*ServerInterfaceWrapper) CreateFineTuningJob ¶
func (siw *ServerInterfaceWrapper) CreateFineTuningJob(w http.ResponseWriter, r *http.Request)
CreateFineTuningJob operation middleware
func (*ServerInterfaceWrapper) CreateImage ¶
func (siw *ServerInterfaceWrapper) CreateImage(w http.ResponseWriter, r *http.Request)
CreateImage operation middleware
func (*ServerInterfaceWrapper) CreateImageEdit ¶
func (siw *ServerInterfaceWrapper) CreateImageEdit(w http.ResponseWriter, r *http.Request)
CreateImageEdit operation middleware
func (*ServerInterfaceWrapper) CreateImageVariation ¶
func (siw *ServerInterfaceWrapper) CreateImageVariation(w http.ResponseWriter, r *http.Request)
CreateImageVariation operation middleware
func (*ServerInterfaceWrapper) CreateMessage ¶
func (siw *ServerInterfaceWrapper) CreateMessage(w http.ResponseWriter, r *http.Request)
CreateMessage operation middleware
func (*ServerInterfaceWrapper) CreateModeration ¶
func (siw *ServerInterfaceWrapper) CreateModeration(w http.ResponseWriter, r *http.Request)
CreateModeration operation middleware
func (*ServerInterfaceWrapper) CreateRun ¶
func (siw *ServerInterfaceWrapper) CreateRun(w http.ResponseWriter, r *http.Request)
CreateRun operation middleware
func (*ServerInterfaceWrapper) CreateSpeech ¶
func (siw *ServerInterfaceWrapper) CreateSpeech(w http.ResponseWriter, r *http.Request)
CreateSpeech operation middleware
func (*ServerInterfaceWrapper) CreateThread ¶
func (siw *ServerInterfaceWrapper) CreateThread(w http.ResponseWriter, r *http.Request)
CreateThread operation middleware
func (*ServerInterfaceWrapper) CreateThreadAndRun ¶
func (siw *ServerInterfaceWrapper) CreateThreadAndRun(w http.ResponseWriter, r *http.Request)
CreateThreadAndRun operation middleware
func (*ServerInterfaceWrapper) CreateTranscription ¶
func (siw *ServerInterfaceWrapper) CreateTranscription(w http.ResponseWriter, r *http.Request)
CreateTranscription operation middleware
func (*ServerInterfaceWrapper) CreateTranslation ¶
func (siw *ServerInterfaceWrapper) CreateTranslation(w http.ResponseWriter, r *http.Request)
CreateTranslation operation middleware
func (*ServerInterfaceWrapper) DeleteAssistant ¶
func (siw *ServerInterfaceWrapper) DeleteAssistant(w http.ResponseWriter, r *http.Request)
DeleteAssistant operation middleware
func (*ServerInterfaceWrapper) DeleteAssistantFile ¶
func (siw *ServerInterfaceWrapper) DeleteAssistantFile(w http.ResponseWriter, r *http.Request)
DeleteAssistantFile operation middleware
func (*ServerInterfaceWrapper) DeleteFile ¶
func (siw *ServerInterfaceWrapper) DeleteFile(w http.ResponseWriter, r *http.Request)
DeleteFile operation middleware
func (*ServerInterfaceWrapper) DeleteModel ¶
func (siw *ServerInterfaceWrapper) DeleteModel(w http.ResponseWriter, r *http.Request)
DeleteModel operation middleware
func (*ServerInterfaceWrapper) DeleteThread ¶
func (siw *ServerInterfaceWrapper) DeleteThread(w http.ResponseWriter, r *http.Request)
DeleteThread operation middleware
func (*ServerInterfaceWrapper) DownloadFile ¶
func (siw *ServerInterfaceWrapper) DownloadFile(w http.ResponseWriter, r *http.Request)
DownloadFile operation middleware
func (*ServerInterfaceWrapper) GetAssistant ¶
func (siw *ServerInterfaceWrapper) GetAssistant(w http.ResponseWriter, r *http.Request)
GetAssistant operation middleware
func (*ServerInterfaceWrapper) GetAssistantFile ¶
func (siw *ServerInterfaceWrapper) GetAssistantFile(w http.ResponseWriter, r *http.Request)
GetAssistantFile operation middleware
func (*ServerInterfaceWrapper) GetMessage ¶
func (siw *ServerInterfaceWrapper) GetMessage(w http.ResponseWriter, r *http.Request)
GetMessage operation middleware
func (*ServerInterfaceWrapper) GetMessageFile ¶
func (siw *ServerInterfaceWrapper) GetMessageFile(w http.ResponseWriter, r *http.Request)
GetMessageFile operation middleware
func (*ServerInterfaceWrapper) GetRun ¶
func (siw *ServerInterfaceWrapper) GetRun(w http.ResponseWriter, r *http.Request)
GetRun operation middleware
func (*ServerInterfaceWrapper) GetRunStep ¶
func (siw *ServerInterfaceWrapper) GetRunStep(w http.ResponseWriter, r *http.Request)
GetRunStep operation middleware
func (*ServerInterfaceWrapper) GetThread ¶
func (siw *ServerInterfaceWrapper) GetThread(w http.ResponseWriter, r *http.Request)
GetThread operation middleware
func (*ServerInterfaceWrapper) ListAssistantFiles ¶
func (siw *ServerInterfaceWrapper) ListAssistantFiles(w http.ResponseWriter, r *http.Request)
ListAssistantFiles operation middleware
func (*ServerInterfaceWrapper) ListAssistants ¶
func (siw *ServerInterfaceWrapper) ListAssistants(w http.ResponseWriter, r *http.Request)
ListAssistants operation middleware
func (*ServerInterfaceWrapper) ListFiles ¶
func (siw *ServerInterfaceWrapper) ListFiles(w http.ResponseWriter, r *http.Request)
ListFiles operation middleware
func (*ServerInterfaceWrapper) ListFineTuningEvents ¶
func (siw *ServerInterfaceWrapper) ListFineTuningEvents(w http.ResponseWriter, r *http.Request)
ListFineTuningEvents operation middleware
func (*ServerInterfaceWrapper) ListMessageFiles ¶
func (siw *ServerInterfaceWrapper) ListMessageFiles(w http.ResponseWriter, r *http.Request)
ListMessageFiles operation middleware
func (*ServerInterfaceWrapper) ListMessages ¶
func (siw *ServerInterfaceWrapper) ListMessages(w http.ResponseWriter, r *http.Request)
ListMessages operation middleware
func (*ServerInterfaceWrapper) ListModels ¶
func (siw *ServerInterfaceWrapper) ListModels(w http.ResponseWriter, r *http.Request)
ListModels operation middleware
func (*ServerInterfaceWrapper) ListPaginatedFineTuningJobs ¶
func (siw *ServerInterfaceWrapper) ListPaginatedFineTuningJobs(w http.ResponseWriter, r *http.Request)
ListPaginatedFineTuningJobs operation middleware
func (*ServerInterfaceWrapper) ListRunSteps ¶
func (siw *ServerInterfaceWrapper) ListRunSteps(w http.ResponseWriter, r *http.Request)
ListRunSteps operation middleware
func (*ServerInterfaceWrapper) ListRuns ¶
func (siw *ServerInterfaceWrapper) ListRuns(w http.ResponseWriter, r *http.Request)
ListRuns operation middleware
func (*ServerInterfaceWrapper) ModifyAssistant ¶
func (siw *ServerInterfaceWrapper) ModifyAssistant(w http.ResponseWriter, r *http.Request)
ModifyAssistant operation middleware
func (*ServerInterfaceWrapper) ModifyMessage ¶
func (siw *ServerInterfaceWrapper) ModifyMessage(w http.ResponseWriter, r *http.Request)
ModifyMessage operation middleware
func (*ServerInterfaceWrapper) ModifyRun ¶
func (siw *ServerInterfaceWrapper) ModifyRun(w http.ResponseWriter, r *http.Request)
ModifyRun operation middleware
func (*ServerInterfaceWrapper) ModifyThread ¶
func (siw *ServerInterfaceWrapper) ModifyThread(w http.ResponseWriter, r *http.Request)
ModifyThread operation middleware
func (*ServerInterfaceWrapper) RetrieveFile ¶
func (siw *ServerInterfaceWrapper) RetrieveFile(w http.ResponseWriter, r *http.Request)
RetrieveFile operation middleware
func (*ServerInterfaceWrapper) RetrieveFineTuningJob ¶
func (siw *ServerInterfaceWrapper) RetrieveFineTuningJob(w http.ResponseWriter, r *http.Request)
RetrieveFineTuningJob operation middleware
func (*ServerInterfaceWrapper) RetrieveModel ¶
func (siw *ServerInterfaceWrapper) RetrieveModel(w http.ResponseWriter, r *http.Request)
RetrieveModel operation middleware
func (*ServerInterfaceWrapper) SubmitToolOuputsToRun ¶
func (siw *ServerInterfaceWrapper) SubmitToolOuputsToRun(w http.ResponseWriter, r *http.Request)
SubmitToolOuputsToRun operation middleware
func (*ServerInterfaceWrapper) XConfirmRun ¶
func (siw *ServerInterfaceWrapper) XConfirmRun(w http.ResponseWriter, r *http.Request)
XConfirmRun operation middleware
func (*ServerInterfaceWrapper) XConfirmToolRun ¶
func (siw *ServerInterfaceWrapper) XConfirmToolRun(w http.ResponseWriter, r *http.Request)
XConfirmToolRun operation middleware
func (*ServerInterfaceWrapper) XCreateTool ¶
func (siw *ServerInterfaceWrapper) XCreateTool(w http.ResponseWriter, r *http.Request)
XCreateTool operation middleware
func (*ServerInterfaceWrapper) XDeleteTool ¶
func (siw *ServerInterfaceWrapper) XDeleteTool(w http.ResponseWriter, r *http.Request)
XDeleteTool operation middleware
func (*ServerInterfaceWrapper) XGetTool ¶
func (siw *ServerInterfaceWrapper) XGetTool(w http.ResponseWriter, r *http.Request)
XGetTool operation middleware
func (*ServerInterfaceWrapper) XInspectTool ¶
func (siw *ServerInterfaceWrapper) XInspectTool(w http.ResponseWriter, r *http.Request)
XInspectTool operation middleware
func (*ServerInterfaceWrapper) XListRunStepEvents ¶
func (siw *ServerInterfaceWrapper) XListRunStepEvents(w http.ResponseWriter, r *http.Request)
XListRunStepEvents operation middleware
func (*ServerInterfaceWrapper) XListThreads ¶
func (siw *ServerInterfaceWrapper) XListThreads(w http.ResponseWriter, r *http.Request)
XListThreads operation middleware
func (*ServerInterfaceWrapper) XListTools ¶
func (siw *ServerInterfaceWrapper) XListTools(w http.ResponseWriter, r *http.Request)
XListTools operation middleware
func (*ServerInterfaceWrapper) XModifyTool ¶
func (siw *ServerInterfaceWrapper) XModifyTool(w http.ResponseWriter, r *http.Request)
XModifyTool operation middleware
func (*ServerInterfaceWrapper) XRunTool ¶
func (siw *ServerInterfaceWrapper) XRunTool(w http.ResponseWriter, r *http.Request)
XRunTool operation middleware
func (*ServerInterfaceWrapper) XStreamRun ¶
func (siw *ServerInterfaceWrapper) XStreamRun(w http.ResponseWriter, r *http.Request)
XStreamRun operation middleware
type StdHTTPServerOptions ¶
type StdHTTPServerOptions struct { BaseURL string BaseRouter *http.ServeMux Middlewares []MiddlewareFunc ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error) }
type SubmitToolOuputsToRunJSONRequestBody ¶
type SubmitToolOuputsToRunJSONRequestBody = SubmitToolOutputsRunRequest
SubmitToolOuputsToRunJSONRequestBody defines body for SubmitToolOuputsToRun for application/json ContentType.
type SubmitToolOutputsRunRequest ¶
type SubmitToolOutputsRunRequest struct { // Stream If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. Stream *bool `json:"stream"` // ToolOutputs A list of tools for which the outputs are being submitted. ToolOutputs []struct { // Output The output of the tool call to be submitted to continue the run. Output *string `json:"output,omitempty"` // ToolCallId 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"` } `json:"tool_outputs"` }
SubmitToolOutputsRunRequest defines model for SubmitToolOutputsRunRequest.
type ThreadObject ¶
type ThreadObject struct { // CreatedAt The Unix timestamp (in seconds) for when the thread was created. CreatedAt int `json:"created_at"` // Id The identifier, which can be referenced in API endpoints. Id string `json:"id"` // 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. Metadata *map[string]interface{} `json:"metadata"` // Object The object type, which is always `thread`. Object ThreadObjectObject `json:"object"` }
ThreadObject Represents a thread that contains [messages](/docs/api-reference/messages).
type ThreadObjectObject ¶
type ThreadObjectObject string
ThreadObjectObject The object type, which is always `thread`.
const (
Thread ThreadObjectObject = "thread"
)
Defines values for ThreadObjectObject.
type ThreadStreamEvent ¶
type ThreadStreamEvent struct {
// contains filtered or unexported fields
}
ThreadStreamEvent defines model for ThreadStreamEvent.
func (ThreadStreamEvent) AsThreadStreamEvent0 ¶
func (t ThreadStreamEvent) AsThreadStreamEvent0() (ThreadStreamEvent0, error)
AsThreadStreamEvent0 returns the union data inside the ThreadStreamEvent as a ThreadStreamEvent0
func (*ThreadStreamEvent) FromThreadStreamEvent0 ¶
func (t *ThreadStreamEvent) FromThreadStreamEvent0(v ThreadStreamEvent0) error
FromThreadStreamEvent0 overwrites any union data inside the ThreadStreamEvent as the provided ThreadStreamEvent0
func (ThreadStreamEvent) MarshalJSON ¶
func (t ThreadStreamEvent) MarshalJSON() ([]byte, error)
func (*ThreadStreamEvent) MergeThreadStreamEvent0 ¶
func (t *ThreadStreamEvent) MergeThreadStreamEvent0(v ThreadStreamEvent0) error
MergeThreadStreamEvent0 performs a merge with any union data inside the ThreadStreamEvent, using the provided ThreadStreamEvent0
func (*ThreadStreamEvent) UnmarshalJSON ¶
func (t *ThreadStreamEvent) UnmarshalJSON(b []byte) error
type ThreadStreamEvent0 ¶
type ThreadStreamEvent0 struct { // Data Represents a thread that contains [messages](/docs/api-reference/messages). Data ThreadObject `json:"data"` Event ThreadStreamEvent0Event `json:"event"` }
ThreadStreamEvent0 Occurs when a new [thread](/docs/api-reference/threads/object) is created.
type ThreadStreamEvent0Event ¶
type ThreadStreamEvent0Event string
ThreadStreamEvent0Event defines model for ThreadStreamEvent.0.Event.
const (
ThreadCreated ThreadStreamEvent0Event = "thread.created"
)
Defines values for ThreadStreamEvent0Event.
type TooManyValuesForParamError ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type TranscriptionSegment ¶
type TranscriptionSegment struct { // AvgLogprob Average logprob of the segment. If the value is lower than -1, consider the logprobs failed. AvgLogprob float32 `json:"avg_logprob"` // CompressionRatio Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed. CompressionRatio float32 `json:"compression_ratio"` // End End time of the segment in seconds. End float32 `json:"end"` // Id Unique identifier of the segment. Id int `json:"id"` // NoSpeechProb Probability of no speech in the segment. If the value is higher than 1.0 and the `avg_logprob` is below -1, consider this segment silent. NoSpeechProb float32 `json:"no_speech_prob"` // Seek Seek offset of the segment. Seek int `json:"seek"` // Start Start time of the segment in seconds. Start float32 `json:"start"` // Temperature Temperature parameter used for generating the segment. Temperature float32 `json:"temperature"` // Text Text content of the segment. Text string `json:"text"` // Tokens Array of token IDs for the text content. Tokens []int `json:"tokens"` }
TranscriptionSegment defines model for TranscriptionSegment.
type TranscriptionWord ¶
type TranscriptionWord struct { // End End time of the word in seconds. End float32 `json:"end"` // Start Start time of the word in seconds. Start float32 `json:"start"` // Word The text content of the word. Word string `json:"word"` }
TranscriptionWord defines model for TranscriptionWord.
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshalingParamError ¶
func (*UnmarshalingParamError) Error ¶
func (e *UnmarshalingParamError) Error() string
func (*UnmarshalingParamError) Unwrap ¶
func (e *UnmarshalingParamError) Unwrap() error
type XAssistantToolsGPTScript ¶
type XAssistantToolsGPTScript struct { // Type The type of tool being defined: `gptscript` Type XAssistantToolsGPTScriptType `json:"type"` XTool string `json:"x-tool"` }
XAssistantToolsGPTScript defines model for XAssistantToolsGPTScript.
type XAssistantToolsGPTScriptType ¶
type XAssistantToolsGPTScriptType string
XAssistantToolsGPTScriptType The type of tool being defined: `gptscript`
const (
Gptscript XAssistantToolsGPTScriptType = "gptscript"
)
Defines values for XAssistantToolsGPTScriptType.
type XConfirmRunJSONRequestBody ¶
type XConfirmRunJSONRequestBody = XConfirmRunToolRequest
XConfirmRunJSONRequestBody defines body for XConfirmRun for application/json ContentType.
type XConfirmRunToolRequest ¶
type XConfirmRunToolRequest struct { // Confirmation The confirmation to submit. Confirmation struct { // Confirmation The whether to confirm or deny the request. Confirmation *bool `json:"confirmation,omitempty"` // ToolCallId 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"` } `json:"confirmation"` // Stream If `true`, returns a stream of events that happen during the Run as server-sent events, terminating when the Run enters a terminal state with a `data: [DONE]` message. Stream *bool `json:"stream"` }
XConfirmRunToolRequest defines model for XConfirmRunToolRequest.
type XConfirmToolRunJSONRequestBody ¶
type XConfirmToolRunJSONRequestBody = XConfirmToolRunRequest
XConfirmToolRunJSONRequestBody defines body for XConfirmToolRun for application/json ContentType.
type XConfirmToolRunRequest ¶
type XConfirmToolRunRequest struct { // Confirmation The confirmation to submit. Confirmation bool `json:"confirmation"` // Stream If `true`, returns a stream of events that happen during the tool run as server-sent events, terminating when the tool run enters a terminal state with a `data: [DONE]` message. Stream *bool `json:"stream"` }
XConfirmToolRunRequest defines model for XConfirmToolRunRequest.
type XCreateToolJSONRequestBody ¶
type XCreateToolJSONRequestBody = XCreateToolRequest
XCreateToolJSONRequestBody defines body for XCreateTool for application/json ContentType.
type XCreateToolRequest ¶
type XCreateToolRequest struct { // Contents Contents of the tool Contents *string `json:"contents"` // EnvVars Environment variables EnvVars *[]string `json:"env_vars,omitempty"` // Subtool The name of the sub tool to use rather than the first tool Subtool *string `json:"subtool"` // Url URL of the tool Url *string `json:"url"` }
XCreateToolRequest defines model for XCreateToolRequest.
type XDeleteToolResponse ¶
type XDeleteToolResponse struct { Deleted bool `json:"deleted"` Id string `json:"id"` Object XDeleteToolResponseObject `json:"object"` }
XDeleteToolResponse defines model for XDeleteToolResponse.
type XDeleteToolResponseObject ¶
type XDeleteToolResponseObject string
XDeleteToolResponseObject defines model for XDeleteToolResponse.Object.
const (
ToolDeleted XDeleteToolResponseObject = "tool.deleted"
)
Defines values for XDeleteToolResponseObject.
type XInspectToolJSONRequestBody ¶
type XInspectToolJSONRequestBody = XInspectToolRequest
XInspectToolJSONRequestBody defines body for XInspectTool for application/json ContentType.
type XInspectToolRequest ¶
type XInspectToolRequest struct { // Subtool The name of the sub tool to use rather than the first tool Subtool string `json:"subtool,omitempty"` // Url URL of the tool to inspect Url string `json:"url"` }
XInspectToolRequest defines model for XInspectToolRequest.
type XInspectToolResponse ¶
type XInspectToolResponse struct { // EntryToolId The id of the tool that is the entry point EntryToolId string `json:"entry_tool_id"` // Exports The exports of the tool Exports map[string]interface{} `json:"exports,omitempty"` // Name The name of the tool Name string `json:"name"` // ToolSet The set of tools in the tool ToolSet map[string]XToolSetTool `json:"tool_set"` }
XInspectToolResponse defines model for XInspectToolResponse.
type XListRunStepEventsParams ¶
type XListRunStepEventsParams struct { Stream *bool `form:"stream,omitempty" json:"stream,omitempty"` Index *int `form:"index,omitempty" json:"index,omitempty"` }
XListRunStepEventsParams defines parameters for XListRunStepEvents.
type XListRunStepEventsResponse ¶
type XListRunStepEventsResponse struct { Data []XRunStepEventObject `json:"data"` Object string `json:"object"` }
XListRunStepEventsResponse defines model for XListRunStepEventsResponse.
type XListThreadsParams ¶
type XListThreadsParams struct { // Limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Limit *int `form:"limit,omitempty" json:"limit,omitempty"` // Order Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. Order *XListThreadsParamsOrder `form:"order,omitempty" json:"order,omitempty"` // After A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. After *string `form:"after,omitempty" json:"after,omitempty"` // Before A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. Before *string `form:"before,omitempty" json:"before,omitempty"` }
XListThreadsParams defines parameters for XListThreads.
type XListThreadsParamsOrder ¶
type XListThreadsParamsOrder string
XListThreadsParamsOrder defines parameters for XListThreads.
const ( XListThreadsParamsOrderAsc XListThreadsParamsOrder = "asc" XListThreadsParamsOrderDesc XListThreadsParamsOrder = "desc" )
Defines values for XListThreadsParamsOrder.
type XListThreadsResponse ¶
type XListThreadsResponse struct { Data []ThreadObject `json:"data"` FirstId string `json:"first_id"` HasMore bool `json:"has_more"` LastId string `json:"last_id"` Object string `json:"object"` }
XListThreadsResponse defines model for XListThreadsResponse.
type XListToolsParams ¶
type XListToolsParams struct { // Limit A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Limit *int `form:"limit,omitempty" json:"limit,omitempty"` // Order Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. Order *XListToolsParamsOrder `form:"order,omitempty" json:"order,omitempty"` // After A cursor for use in pagination. `after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list. After *string `form:"after,omitempty" json:"after,omitempty"` // Before A cursor for use in pagination. `before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list. Before *string `form:"before,omitempty" json:"before,omitempty"` }
XListToolsParams defines parameters for XListTools.
type XListToolsParamsOrder ¶
type XListToolsParamsOrder string
XListToolsParamsOrder defines parameters for XListTools.
const ( XListToolsParamsOrderAsc XListToolsParamsOrder = "asc" XListToolsParamsOrderDesc XListToolsParamsOrder = "desc" )
Defines values for XListToolsParamsOrder.
type XListToolsResponse ¶
type XListToolsResponse struct { Data []XToolObject `json:"data"` FirstId string `json:"first_id"` HasMore bool `json:"has_more"` LastId string `json:"last_id"` Object string `json:"object"` }
XListToolsResponse defines model for XListToolsResponse.
type XModifyToolJSONRequestBody ¶
type XModifyToolJSONRequestBody = XModifyToolRequest
XModifyToolJSONRequestBody defines body for XModifyTool for application/json ContentType.
type XModifyToolRequest ¶
type XModifyToolRequest struct { // Contents Contents of the tool Contents *string `json:"contents"` // EnvVars Environment variables EnvVars *[]string `json:"env_vars,omitempty"` // Retool Pull the contents of the tool from the URL to redefine the tool Retool *bool `json:"retool,omitempty"` // Subtool The name of the sub tool to use rather than the first tool Subtool *string `json:"subtool"` // Url URL of the tool Url *string `json:"url"` }
XModifyToolRequest defines model for XModifyToolRequest.
type XRunStepEventObject ¶
type XRunStepEventObject struct { // CallContext The call context CallContext map[string]interface{} `json:"callContext,omitempty"` ChatCompletionId *string `json:"chatCompletionId,omitempty"` ChatRequest any `json:"chatRequest,omitempty"` ChatResponse any `json:"chatResponse,omitempty"` ChatResponseCached bool `json:"chatResponseCached,omitempty"` Content *string `json:"content,omitempty"` Err *string `json:"err,omitempty"` Input *string `json:"input,omitempty"` Output *string `json:"output,omitempty"` RunID string `json:"runID"` // RunStepID The id of the run step RunStepID string `json:"runStepID"` // Time The time of the event Time time.Time `json:"time"` ToolResults *int `json:"toolResults,omitempty"` // ToolSubCalls The tool sub calls ToolSubCalls map[string]interface{} `json:"toolSubCalls,omitempty"` Type *string `json:"type,omitempty"` }
XRunStepEventObject defines model for XRunStepEventObject.
type XRunToolJSONRequestBody ¶
type XRunToolJSONRequestBody = XRunToolRequest
XRunToolJSONRequestBody defines body for XRunTool for application/json ContentType.
type XRunToolRequest ¶
type XRunToolRequest struct { // Chdir The working directory to use when running the tool Chdir string `json:"chdir,omitempty"` // DangerousMode Dangerous mode enabled means that any tool calls will not be prompted for confirmation DangerousMode bool `json:"dangerous_mode,omitempty"` // DisableCache Disable cache when running the tool DisableCache bool `json:"disable_cache,omitempty"` // EnvVars Environment variables EnvVars []string `json:"env_vars,omitempty"` // File The file to run File string `json:"file"` Input string `json:"input,omitempty"` // Subtool The name of the sub tool to use rather than the first tool Subtool string `json:"subtool"` }
XRunToolRequest defines model for XRunToolRequest.
type XStreamRunParams ¶
type XStreamRunParams struct {
Index *int `form:"index,omitempty" json:"index,omitempty"`
}
XStreamRunParams defines parameters for XStreamRun.
type XToolObject ¶
type XToolObject struct { // Contents Contents of the tool Contents *string `json:"contents"` // CreatedAt The Unix timestamp (in seconds) for when the assistant file was created. CreatedAt int `json:"created_at"` // Description Description of the tool Description *string `json:"description,omitempty"` // EnvVars Environment variables EnvVars *[]string `json:"env_vars,omitempty"` // Id The id of the tool Id string `json:"id"` // Name The name of the tool Name *string `json:"name,omitempty"` // Object The object type, which is always `tool`. Object XToolObjectObject `json:"object"` // Subtool The name of the sub tool to use rather than the first tool Subtool *string `json:"subtool"` // Url URL of the tool Url *string `json:"url"` }
XToolObject defines model for XToolObject.
type XToolObjectObject ¶
type XToolObjectObject string
XToolObjectObject The object type, which is always `tool`.
const (
XToolObjectObjectTool XToolObjectObject = "tool"
)
Defines values for XToolObjectObject.
type XToolSetTool ¶
type XToolSetTool struct { Id *string `json:"id,omitempty"` // Instructions The instructions for the tool Instructions *string `json:"instructions,omitempty"` LocalTools *map[string]string `json:"local_tools,omitempty"` Source *struct { LineNo *int `json:"line_no,omitempty"` Location *string `json:"location,omitempty"` Repo *struct { // Name The filename of the source in the repo, relative to Path Name *string `json:"name,omitempty"` // Path The path in the repo of this source. This should refer to a directory and not the actual file Path *string `json:"path,omitempty"` // Revision The revision of this source Revision *string `json:"revision,omitempty"` // Root The URL where the VCS repo can be found Root *string `json:"root,omitempty"` // Vcs VCS The VCS type, such as "git" Vcs *string `json:"vcs,omitempty"` } `json:"repo,omitempty"` } `json:"source,omitempty"` ToolMapping *map[string]string `json:"tool_mapping,omitempty"` WorkingDir *string `json:"working_dir,omitempty"` }
XToolSetTool defines model for XToolSetTool.