Expand description
Types used in OpenAI API requests and responses. These types are created from component schemas in the OpenAPI spec
Structs§
- Assistant
File Object - A list of Files attached to an
assistant
. - Assistant
Object - Represents an
assistant
that can call the model and use tools. - Assistant
Tool Code Interpreter Resources - Assistant
Tool File Search Resources - Assistant
Tool Resources - Assistant
Tools File Search - Retrieval tool
- Assistant
Tools File Search Overrides - Assistant
Tools Function - Function tool
- Assistant
Vector Store - Assistants
Named Tool Choice - Specifies a tool the model should use. Use to force the model to call a specific tool.
- Audio
Input - Base64
Embedding - Represents an base64-encoded embedding vector returned by embedding endpoint.
- Base64
Embedding Vector - Batch
- Batch
Error - Batch
Errors - Batch
Request - Batch
Request Args - Builder for
BatchRequest
. - Batch
Request Counts - Batch
Request Input - The per-line object of the batch input file
- Batch
Request Output - The per-line object of the batch output and error files
- Batch
Request Output Error - Batch
Request Output Response - Category
- Category
Score - A list of the categories along with their scores as predicted by model.
- Chat
Choice - Chat
Choice Logprobs - Chat
Choice Stream - Chat
Completion Message Tool Call - Chat
Completion Message Tool Call Chunk - Chat
Completion Named Tool Choice - Specifies a tool the model should use. Use to force the model to call a specific function.
- Chat
Completion Request Assistant Message - Chat
Completion Request Assistant Message Args - Builder for
ChatCompletionRequestAssistantMessage
. - Chat
Completion Request Function Message - Chat
Completion Request Function Message Args - Builder for
ChatCompletionRequestFunctionMessage
. - Chat
Completion Request Message Content Part Image - Chat
Completion Request Message Content Part Image Args - Builder for
ChatCompletionRequestMessageContentPartImage
. - Chat
Completion Request Message Content Part Refusal - Chat
Completion Request Message Content Part Refusal Builder - Builder for
ChatCompletionRequestMessageContentPartRefusal
. - Chat
Completion Request Message Content Part Text - Chat
Completion Request Message Content Part Text Args - Builder for
ChatCompletionRequestMessageContentPartText
. - Chat
Completion Request System Message - Chat
Completion Request System Message Args - Builder for
ChatCompletionRequestSystemMessage
. - Chat
Completion Request Tool Message - Tool message
- Chat
Completion Request Tool Message Args - Builder for
ChatCompletionRequestToolMessage
. - Chat
Completion Request User Message - Chat
Completion Request User Message Args - Builder for
ChatCompletionRequestUserMessage
. - Chat
Completion Response Message - A chat completion message generated by the model.
- Chat
Completion Stream Options - Options for streaming response. Only set this when you set
stream: true
. - Chat
Completion Stream Response Delta - A chat completion delta generated by streamed model responses.
- Chat
Completion Token Logprob - Chat
Completion Tool - Chat
Completion Tool Args - Builder for
ChatCompletionTool
. - Choice
- Code
Interpreter - Completion
Usage - Usage statistics for the completion request.
- Content
Moderation Result - Create
Assistant File Request - Create
Assistant Request - Create
Assistant Request Args - Builder for
CreateAssistantRequest
. - Create
Assistant Tool File Search Resources - Create
Assistant Tool Resources - Create
Base64 Embedding Response - Create
Chat Completion Request - Create
Chat Completion Request Args - Builder for
CreateChatCompletionRequest
. - Create
Chat Completion Response - Represents a chat completion response returned by model, based on the provided input.
- Create
Chat Completion Stream Response - Represents a streamed chunk of a chat completion response returned by model, based on the provided input.
- Create
Completion Request - Create
Completion Request Args - Builder for
CreateCompletionRequest
. - Create
Completion Response - Create
Embedding Request - Create
Embedding Request Args - Builder for
CreateEmbeddingRequest
. - Create
Embedding Response - Create
File Request - Create
File Request Args - Builder for
CreateFileRequest
. - Create
Fine Tuning JobRequest - Create
Fine Tuning JobRequest Args - Builder for
CreateFineTuningJobRequest
. - Create
Image Edit Request - Create
Image Edit Request Args - Builder for
CreateImageEditRequest
. - Create
Image Request - Create
Image Request Args - Builder for
CreateImageRequest
. - Create
Image Variation Request - Create
Image Variation Request Args - Builder for
CreateImageVariationRequest
. - Create
Message Request - Create
Message Request Args - Builder for
CreateMessageRequest
. - Create
Moderation Request - Create
Moderation Request Args - Builder for
CreateModerationRequest
. - Create
Moderation Response - Represents if a given text input is potentially harmful.
- Create
RunRequest - Create
RunRequest Args - Builder for
CreateRunRequest
. - Create
Speech Request - Create
Speech Request Args - Builder for
CreateSpeechRequest
. - Create
Speech Response - Create
Thread AndRun Request - Create
Thread AndRun Request Args - Builder for
CreateThreadAndRunRequest
. - Create
Thread Request - Create
Thread Request Args - Builder for
CreateThreadRequest
. - Create
Transcription Request - Create
Transcription Request Args - Builder for
CreateTranscriptionRequest
. - Create
Transcription Response Json - Represents a transcription response returned by model, based on the provided input.
- Create
Transcription Response Verbose Json - Represents a verbose json transcription response returned by model, based on the provided input.
- Create
Translation Request - Create
Translation Request Args - Builder for
CreateTranslationRequest
. - Create
Translation Response Json - Create
Translation Response Verbose Json - Create
Vector Store File Batch Request - Create
Vector Store File Batch Request Args - Builder for
CreateVectorStoreFileBatchRequest
. - Create
Vector Store File Request - Create
Vector Store File Request Args - Builder for
CreateVectorStoreFileRequest
. - Create
Vector Store Request - Create
Vector Store Request Args - Builder for
CreateVectorStoreRequest
. - Delete
Assistant File Response - Deletes the association between the assistant and the file, but does not delete the File object itself.
- Delete
Assistant Response - Delete
File Response - Delete
Message Response - Delete
Model Response - Delete
Thread Response - Delete
Vector Store File Response - Delete
Vector Store Response - Delta
Code Interpreter - Embedding
- Represents an embedding vector returned by embedding endpoint.
- Embedding
Usage - File
Citation - File
Input - File
Path - File
Search Ranking Options - The ranking options for the file search.
- Fine
Tune JobError - For fine-tuning jobs that have
failed
, this will contain more information on the cause of the failure. - Fine
Tuning Integration - Fine
Tuning Job - The
fine_tuning.job
object represents a fine-tuning job that has been created through the API. - Fine
Tuning JobCheckpoint - The
fine_tuning.job.checkpoint
object represents a model checkpoint for a fine-tuning job that is ready to use. - Fine
Tuning JobCheckpoint Metrics - Fine
Tuning JobEvent - Fine-tuning job event object
- Function
Call - The name and arguments of a function that should be called, as generated by the model.
- Function
Call Stream - Function
Name - Function
Object - Function
Object Args - Builder for
FunctionObject
. - Hyperparameters
- Image
File - Image
Input - Image
Url - Image
UrlArgs - Builder for
ImageUrl
. - Images
Response - Last
Error - List
Assistant Files Response - List
Assistants Response - List
Batches Response - List
Files Response - List
Fine Tuning JobCheckpoints Response - List
Fine Tuning JobEvents Response - List
Message Files Response - List
Messages Response - List
Model Response - List
Paginated Fine Tuning Jobs Response - List
RunSteps Response - List
Runs Response - List
Vector Store Files Response - List
Vector Stores Response - Logprobs
- Message
Attachment - Message
Content Image File Object - References an image File in the content of a message.
- Message
Content Image UrlObject - References an image URL in the content of a message.
- Message
Content Refusal Object - Message
Content Text Annotations File Citation Object - 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 “file_search” tool to search files.
- Message
Content Text Annotations File Path Object - Message
Content Text Object - The text content that is part of a message.
- Message
Creation - Message
Delta - Message
Delta Content Image File Object - References an image File in the content of a message.
- Message
Delta Content Image UrlObject - Message
Delta Content Refusal Object - Message
Delta Content Text - Message
Delta Content Text Annotations File Citation Object - 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 “file_search” tool to search files.
- Message
Delta Content Text Annotations File Path Object - A URL for the file that’s generated when the assistant used the
code_interpreter
tool to generate a file. - Message
Delta Content Text Object - The text content that is part of a message.
- Message
Delta Object - Represents a message delta i.e. any changed fields on a message during streaming.
- Message
File Object - A list of files attached to a
message
. - Message
Incomplete Details - Message
Object - Represents a message within a thread.
- Message
Request Content Text Object - Model
- Describes an OpenAI model offering that can be used with the API.
- Modify
Assistant Request - Modify
Assistant Request Args - Builder for
ModifyAssistantRequest
. - Modify
Message Request - Modify
RunRequest - Modify
Thread Request - OpenAI
File - The
File
object represents a document that has been uploaded to OpenAI. - Required
Action - Response
Format Json Schema - RunCompletion
Usage - RunObject
- Represents an execution run on a thread.
- RunObject
Incomplete Details - RunStep
Completion Usage - RunStep
Delta - RunStep
Delta Object - Represents a run step delta i.e. any changed fields on a run step during streaming.
- RunStep
Delta Step Details Message Creation Object - Details of the message creation by the run step.
- RunStep
Delta Step Details Tool Calls Code Object - Details of the Code Interpreter tool call the run step was involved in.
- RunStep
Delta Step Details Tool Calls Code Output Image Object - Code interpreter image output
- RunStep
Delta Step Details Tool Calls Code Output Logs Object - Text output from the Code Interpreter tool call as part of a run step.
- RunStep
Delta Step Details Tool Calls File Search Object - RunStep
Delta Step Details Tool Calls Function Object - Function tool call
- RunStep
Delta Step Details Tool Calls Object - Details of the tool call.
- RunStep
Details Message Creation Object - Details of the message creation by the run step.
- RunStep
Details Tool Calls Code Object - Code interpreter tool call
- RunStep
Details Tool Calls Code Output Image Object - RunStep
Details Tool Calls Code Output Logs Object - Text output from the Code Interpreter tool call as part of a run step.
- RunStep
Details Tool Calls File Search Object - File search tool call
- RunStep
Details Tool Calls File Search Object File Search - RunStep
Details Tool Calls File Search Result Object - A result instance of the file search.
- RunStep
Details Tool Calls File Search Result Object Content - RunStep
Details Tool Calls Function Object - RunStep
Details Tool Calls Object - Details of the tool call.
- RunStep
Function Object - RunStep
Function Object Delta - RunStep
Object - Represents a step in execution of a run.
- RunTool
Call Object - Static
Chunking Strategy - Static Chunking Strategy
- Submit
Tool Outputs - Submit
Tool Outputs RunRequest - Text
Data - Thread
Object - Represents a thread that contains messages.
- Tools
Outputs - Tools
Outputs Args - Builder for
ToolsOutputs
. - TopLogprobs
- Transcription
Segment - Transcription
Word - Truncation
Object - Thread Truncation Controls
- Update
Vector Store Request - Update
Vector Store Request Args - Builder for
UpdateVectorStoreRequest
. - Vector
Store Expiration After - Vector store expiration policy
- Vector
Store File Batch Counts - Vector
Store File Batch Object - A batch of files attached to a vector store.
- Vector
Store File Counts - Vector
Store File Error - Vector
Store File Object - Vector
Store Object - A vector store is a collection of processed files can be used by the
file_search
tool. - WandB
Enums§
- Assistant
Stream Event - Represents an event emitted when streaming a Run.
- Assistant
Tool Type - Assistant
Tools - Assistant
Vector Store Chunking Strategy - Assistants
ApiResponse Format Option - Specifies the format that the model must output. Compatible with GPT-4o, GPT-4 Turbo, and all GPT-3.5 Turbo models since
gpt-3.5-turbo-1106
. - Assistants
ApiTool Choice Option - Controls which (if any) tool is called by the model.
none
means the model will not call any tools and instead generates a message.auto
is the default value and means the model can pick between generating a message or calling one or more tools.required
means the model must call one or more tools before responding to the user. Specifying a particular tool like{"type": "file_search"}
or{"type": "function", "function": {"name": "my_function"}}
forces the model to call that tool. - Audio
Response Format - Batch
Completion Window - Batch
Endpoint - Batch
Request Input Method - Batch
Size - Batch
Status - Chat
Completion Function Call - Chat
Completion Request Assistant Message Content - Chat
Completion Request Assistant Message Content Part - Chat
Completion Request Message - Chat
Completion Request Message Content Part Refusal Builder Error - Error type for ChatCompletionRequestMessageContentPartRefusalBuilder
- Chat
Completion Request System Message Content - Chat
Completion Request System Message Content Part - Chat
Completion Request Tool Message Content - Chat
Completion Request Tool Message Content Part - Chat
Completion Request User Message Content - Chat
Completion Request User Message Content Part - Chat
Completion Tool Choice Option - Controls which (if any) tool is called by the model.
none
means the model will not call any tool and instead generates a message.auto
means the model can pick between generating a message or calling one or more tools.required
means the model must call one or more tools. Specifying a particular tool via{"type": "function", "function": {"name": "my_function"}}
forces the model to call that tool. - Chat
Completion Tool Type - Code
Interpreter Output - Completion
Finish Reason - Create
Message Request Content - Dall
E2Image Size - Delta
Code Interpreter Output - Delta
Step Details - Embedding
Input - Encoding
Format - File
Purpose - File
Search Ranker - Fine
Tuning JobIntegration Type - Fine
Tuning JobStatus - Finish
Reason - Image
- Image
Detail - Image
Model - Image
Quality - Image
Response Format - Image
Size - Image
Style - Input
Source - Last
Error Code - Learning
Rate Multiplier - Level
- Message
Attachment Tool - Message
Content - Message
Content Input - Message
Content Text Annotations - Message
Delta Content - Message
Delta Content Text Annotations - Message
Incomplete Details Type - Message
Role - Message
Status - Moderation
Input - NEpochs
- OpenAI
File Purpose - Prompt
- Response
Format - Role
- RunObject
Incomplete Details Reason - RunStatus
- RunStep
Delta Step Details Tool Calls - RunStep
Details Tool Calls - RunStep
Type - Service
Tier - Service
Tier Response - Speech
Model - Speech
Response Format - Step
Details - Stop
- Text
Moderation Model - Timestamp
Granularity - Truncation
Object Type - Vector
Store Chunking Strategy - Vector
Store File Batch Status - Vector
Store File Error Code - Vector
Store File Object Chunking Strategy - Vector
Store File Status - Vector
Store Status - Voice
Type Aliases§
- Assistant
Event Stream - Chat
Completion Response Stream - Parsed server side events stream until an [DONE] is received from server.
- Completion
Response Stream - Parsed server side events stream until an [DONE] is received from server.