openai/openai-python
Publicmirrored from https://github.com/openai/openai-pythonAvailable
api.md
561lines · modeblame
a228a539Stainless Bot2 years ago | 1 | # Shared Types |
| 2 | | |
| 3 | ```python | |
bf1ca86cRobert Craigie1 years ago | 4 | from openai.types import ( |
| 5 | ErrorObject, | |
| 6 | FunctionDefinition, | |
| 7 | FunctionParameters, | |
fdd52476stainless-app[bot]1 years ago | 8 | Metadata, |
bf1ca86cRobert Craigie1 years ago | 9 | ResponseFormatJSONObject, |
| 10 | ResponseFormatJSONSchema, | |
| 11 | ResponseFormatText, | |
| 12 | ) | |
a228a539Stainless Bot2 years ago | 13 | ``` |
| 14 | | |
08b8179aDavid Schnurr2 years ago | 15 | # Completions |
| 16 | | |
| 17 | Types: | |
| 18 | | |
| 19 | ```python | |
| 20 | from openai.types import Completion, CompletionChoice, CompletionUsage | |
| 21 | ``` | |
| 22 | | |
| 23 | Methods: | |
| 24 | | |
| 25 | - <code title="post /completions">client.completions.<a href="./src/openai/resources/completions.py">create</a>(\*\*<a href="src/openai/types/completion_create_params.py">params</a>) -> <a href="./src/openai/types/completion.py">Completion</a></code> | |
| 26 | | |
| 27 | # Chat | |
| 28 | | |
1dc93403Stainless Bot2 years ago | 29 | Types: |
| 30 | | |
| 31 | ```python | |
| 32 | from openai.types import ChatModel | |
| 33 | ``` | |
| 34 | | |
08b8179aDavid Schnurr2 years ago | 35 | ## Completions |
| 36 | | |
| 37 | Types: | |
| 38 | | |
| 39 | ```python | |
| 40 | from openai.types.chat import ( | |
| 41 | ChatCompletion, | |
baa9f07fRobert Craigie2 years ago | 42 | ChatCompletionAssistantMessageParam, |
550b855fstainless-app[bot]1 years ago | 43 | ChatCompletionAudio, |
| 44 | ChatCompletionAudioParam, | |
08b8179aDavid Schnurr2 years ago | 45 | ChatCompletionChunk, |
baa9f07fRobert Craigie2 years ago | 46 | ChatCompletionContentPart, |
| 47 | ChatCompletionContentPartImage, | |
550b855fstainless-app[bot]1 years ago | 48 | ChatCompletionContentPartInputAudio, |
bf1ca86cRobert Craigie1 years ago | 49 | ChatCompletionContentPartRefusal, |
baa9f07fRobert Craigie2 years ago | 50 | ChatCompletionContentPartText, |
575ff607stainless-app[bot]1 years ago | 51 | ChatCompletionDeveloperMessageParam, |
baa9f07fRobert Craigie2 years ago | 52 | ChatCompletionFunctionCallOption, |
| 53 | ChatCompletionFunctionMessageParam, | |
08b8179aDavid Schnurr2 years ago | 54 | ChatCompletionMessage, |
| 55 | ChatCompletionMessageParam, | |
baa9f07fRobert Craigie2 years ago | 56 | ChatCompletionMessageToolCall, |
550b855fstainless-app[bot]1 years ago | 57 | ChatCompletionModality, |
baa9f07fRobert Craigie2 years ago | 58 | ChatCompletionNamedToolChoice, |
dfdcf571Stainless Bot1 years ago | 59 | ChatCompletionPredictionContent, |
575ff607stainless-app[bot]1 years ago | 60 | ChatCompletionReasoningEffort, |
08b8179aDavid Schnurr2 years ago | 61 | ChatCompletionRole, |
6cc51587Stainless Bot2 years ago | 62 | ChatCompletionStreamOptions, |
baa9f07fRobert Craigie2 years ago | 63 | ChatCompletionSystemMessageParam, |
ccae821bStainless Bot2 years ago | 64 | ChatCompletionTokenLogprob, |
baa9f07fRobert Craigie2 years ago | 65 | ChatCompletionTool, |
| 66 | ChatCompletionToolChoiceOption, | |
| 67 | ChatCompletionToolMessageParam, | |
| 68 | ChatCompletionUserMessageParam, | |
08b8179aDavid Schnurr2 years ago | 69 | ) |
| 70 | ``` | |
| 71 | | |
| 72 | Methods: | |
| 73 | | |
| 74 | - <code title="post /chat/completions">client.chat.completions.<a href="./src/openai/resources/chat/completions.py">create</a>(\*\*<a href="src/openai/types/chat/completion_create_params.py">params</a>) -> <a href="./src/openai/types/chat/chat_completion.py">ChatCompletion</a></code> | |
| 75 | | |
| 76 | # Embeddings | |
| 77 | | |
| 78 | Types: | |
| 79 | | |
| 80 | ```python | |
eab2e5a3Stainless Bot1 years ago | 81 | from openai.types import CreateEmbeddingResponse, Embedding, EmbeddingModel |
08b8179aDavid Schnurr2 years ago | 82 | ``` |
| 83 | | |
| 84 | Methods: | |
| 85 | | |
| 86 | - <code title="post /embeddings">client.embeddings.<a href="./src/openai/resources/embeddings.py">create</a>(\*\*<a href="src/openai/types/embedding_create_params.py">params</a>) -> <a href="./src/openai/types/create_embedding_response.py">CreateEmbeddingResponse</a></code> | |
| 87 | | |
| 88 | # Files | |
| 89 | | |
| 90 | Types: | |
| 91 | | |
| 92 | ```python | |
05f0132fstainless-app[bot]1 years ago | 93 | from openai.types import FileContent, FileDeleted, FileObject, FilePurpose |
08b8179aDavid Schnurr2 years ago | 94 | ``` |
| 95 | | |
| 96 | Methods: | |
| 97 | | |
| 98 | - <code title="post /files">client.files.<a href="./src/openai/resources/files.py">create</a>(\*\*<a href="src/openai/types/file_create_params.py">params</a>) -> <a href="./src/openai/types/file_object.py">FileObject</a></code> | |
| 99 | - <code title="get /files/{file_id}">client.files.<a href="./src/openai/resources/files.py">retrieve</a>(file_id) -> <a href="./src/openai/types/file_object.py">FileObject</a></code> | |
dfdcf571Stainless Bot1 years ago | 100 | - <code title="get /files">client.files.<a href="./src/openai/resources/files.py">list</a>(\*\*<a href="src/openai/types/file_list_params.py">params</a>) -> <a href="./src/openai/types/file_object.py">SyncCursorPage[FileObject]</a></code> |
08b8179aDavid Schnurr2 years ago | 101 | - <code title="delete /files/{file_id}">client.files.<a href="./src/openai/resources/files.py">delete</a>(file_id) -> <a href="./src/openai/types/file_deleted.py">FileDeleted</a></code> |
aa681899Stainless Bot2 years ago | 102 | - <code title="get /files/{file_id}/content">client.files.<a href="./src/openai/resources/files.py">content</a>(file_id) -> HttpxBinaryResponseContent</code> |
d779e40bstainless-app[bot]1 years ago | 103 | - <code title="get /files/{file_id}/content">client.files.<a href="./src/openai/resources/files.py">retrieve_content</a>(file_id) -> <a href="./src/openai/types/file_content.py">str</a></code> |
08b8179aDavid Schnurr2 years ago | 104 | - <code>client.files.<a href="./src/openai/resources/files.py">wait_for_processing</a>(\*args) -> FileObject</code> |
| 105 | | |
| 106 | # Images | |
| 107 | | |
| 108 | Types: | |
| 109 | | |
| 110 | ```python | |
ece795f0Stainless Bot1 years ago | 111 | from openai.types import Image, ImageModel, ImagesResponse |
08b8179aDavid Schnurr2 years ago | 112 | ``` |
| 113 | | |
| 114 | Methods: | |
| 115 | | |
| 116 | - <code title="post /images/variations">client.images.<a href="./src/openai/resources/images.py">create_variation</a>(\*\*<a href="src/openai/types/image_create_variation_params.py">params</a>) -> <a href="./src/openai/types/images_response.py">ImagesResponse</a></code> | |
| 117 | - <code title="post /images/edits">client.images.<a href="./src/openai/resources/images.py">edit</a>(\*\*<a href="src/openai/types/image_edit_params.py">params</a>) -> <a href="./src/openai/types/images_response.py">ImagesResponse</a></code> | |
| 118 | - <code title="post /images/generations">client.images.<a href="./src/openai/resources/images.py">generate</a>(\*\*<a href="src/openai/types/image_generate_params.py">params</a>) -> <a href="./src/openai/types/images_response.py">ImagesResponse</a></code> | |
| 119 | | |
| 120 | # Audio | |
| 121 | | |
ece795f0Stainless Bot1 years ago | 122 | Types: |
| 123 | | |
| 124 | ```python | |
102fce4fStainless Bot1 years ago | 125 | from openai.types import AudioModel, AudioResponseFormat |
ece795f0Stainless Bot1 years ago | 126 | ``` |
| 127 | | |
08b8179aDavid Schnurr2 years ago | 128 | ## Transcriptions |
| 129 | | |
| 130 | Types: | |
| 131 | | |
| 132 | ```python | |
adb6da3aRobert Craigie1 years ago | 133 | from openai.types.audio import ( |
| 134 | Transcription, | |
| 135 | TranscriptionSegment, | |
| 136 | TranscriptionVerbose, | |
| 137 | TranscriptionWord, | |
| 138 | TranscriptionCreateResponse, | |
| 139 | ) | |
08b8179aDavid Schnurr2 years ago | 140 | ``` |
| 141 | | |
| 142 | Methods: | |
| 143 | | |
adb6da3aRobert Craigie1 years ago | 144 | - <code title="post /audio/transcriptions">client.audio.transcriptions.<a href="./src/openai/resources/audio/transcriptions.py">create</a>(\*\*<a href="src/openai/types/audio/transcription_create_params.py">params</a>) -> <a href="./src/openai/types/audio/transcription_create_response.py">TranscriptionCreateResponse</a></code> |
08b8179aDavid Schnurr2 years ago | 145 | |
| 146 | ## Translations | |
| 147 | | |
| 148 | Types: | |
| 149 | | |
| 150 | ```python | |
adb6da3aRobert Craigie1 years ago | 151 | from openai.types.audio import Translation, TranslationVerbose, TranslationCreateResponse |
08b8179aDavid Schnurr2 years ago | 152 | ``` |
| 153 | | |
| 154 | Methods: | |
| 155 | | |
adb6da3aRobert Craigie1 years ago | 156 | - <code title="post /audio/translations">client.audio.translations.<a href="./src/openai/resources/audio/translations.py">create</a>(\*\*<a href="src/openai/types/audio/translation_create_params.py">params</a>) -> <a href="./src/openai/types/audio/translation_create_response.py">TranslationCreateResponse</a></code> |
08b8179aDavid Schnurr2 years ago | 157 | |
baa9f07fRobert Craigie2 years ago | 158 | ## Speech |
| 159 | | |
ece795f0Stainless Bot1 years ago | 160 | Types: |
| 161 | | |
| 162 | ```python | |
| 163 | from openai.types.audio import SpeechModel | |
| 164 | ``` | |
| 165 | | |
baa9f07fRobert Craigie2 years ago | 166 | Methods: |
| 167 | | |
| 168 | - <code title="post /audio/speech">client.audio.speech.<a href="./src/openai/resources/audio/speech.py">create</a>(\*\*<a href="src/openai/types/audio/speech_create_params.py">params</a>) -> HttpxBinaryResponseContent</code> | |
| 169 | | |
08b8179aDavid Schnurr2 years ago | 170 | # Moderations |
| 171 | | |
| 172 | Types: | |
| 173 | | |
| 174 | ```python | |
56e64d9astainless-app[bot]1 years ago | 175 | from openai.types import ( |
| 176 | Moderation, | |
| 177 | ModerationImageURLInput, | |
| 178 | ModerationModel, | |
| 179 | ModerationMultiModalInput, | |
| 180 | ModerationTextInput, | |
| 181 | ModerationCreateResponse, | |
| 182 | ) | |
08b8179aDavid Schnurr2 years ago | 183 | ``` |
| 184 | | |
| 185 | Methods: | |
| 186 | | |
| 187 | - <code title="post /moderations">client.moderations.<a href="./src/openai/resources/moderations.py">create</a>(\*\*<a href="src/openai/types/moderation_create_params.py">params</a>) -> <a href="./src/openai/types/moderation_create_response.py">ModerationCreateResponse</a></code> | |
| 188 | | |
| 189 | # Models | |
| 190 | | |
| 191 | Types: | |
| 192 | | |
| 193 | ```python | |
| 194 | from openai.types import Model, ModelDeleted | |
| 195 | ``` | |
| 196 | | |
| 197 | Methods: | |
| 198 | | |
| 199 | - <code title="get /models/{model}">client.models.<a href="./src/openai/resources/models.py">retrieve</a>(model) -> <a href="./src/openai/types/model.py">Model</a></code> | |
| 200 | - <code title="get /models">client.models.<a href="./src/openai/resources/models.py">list</a>() -> <a href="./src/openai/types/model.py">SyncPage[Model]</a></code> | |
| 201 | - <code title="delete /models/{model}">client.models.<a href="./src/openai/resources/models.py">delete</a>(model) -> <a href="./src/openai/types/model_deleted.py">ModelDeleted</a></code> | |
| 202 | | |
| 203 | # FineTuning | |
| 204 | | |
| 205 | ## Jobs | |
| 206 | | |
| 207 | Types: | |
| 208 | | |
| 209 | ```python | |
f5247e30Stainless Bot2 years ago | 210 | from openai.types.fine_tuning import ( |
| 211 | FineTuningJob, | |
| 212 | FineTuningJobEvent, | |
| 213 | FineTuningJobIntegration, | |
| 214 | FineTuningJobWandbIntegration, | |
| 215 | FineTuningJobWandbIntegrationObject, | |
| 216 | ) | |
| 217 | ``` | |
| 218 | | |
| 219 | Methods: | |
| 220 | | |
| 221 | - <code title="post /fine_tuning/jobs">client.fine_tuning.jobs.<a href="./src/openai/resources/fine_tuning/jobs/jobs.py">create</a>(\*\*<a href="src/openai/types/fine_tuning/job_create_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/fine_tuning_job.py">FineTuningJob</a></code> | |
| 222 | - <code title="get /fine_tuning/jobs/{fine_tuning_job_id}">client.fine_tuning.jobs.<a href="./src/openai/resources/fine_tuning/jobs/jobs.py">retrieve</a>(fine_tuning_job_id) -> <a href="./src/openai/types/fine_tuning/fine_tuning_job.py">FineTuningJob</a></code> | |
| 223 | - <code title="get /fine_tuning/jobs">client.fine_tuning.jobs.<a href="./src/openai/resources/fine_tuning/jobs/jobs.py">list</a>(\*\*<a href="src/openai/types/fine_tuning/job_list_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/fine_tuning_job.py">SyncCursorPage[FineTuningJob]</a></code> | |
| 224 | - <code title="post /fine_tuning/jobs/{fine_tuning_job_id}/cancel">client.fine_tuning.jobs.<a href="./src/openai/resources/fine_tuning/jobs/jobs.py">cancel</a>(fine_tuning_job_id) -> <a href="./src/openai/types/fine_tuning/fine_tuning_job.py">FineTuningJob</a></code> | |
| 225 | - <code title="get /fine_tuning/jobs/{fine_tuning_job_id}/events">client.fine_tuning.jobs.<a href="./src/openai/resources/fine_tuning/jobs/jobs.py">list_events</a>(fine_tuning_job_id, \*\*<a href="src/openai/types/fine_tuning/job_list_events_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/fine_tuning_job_event.py">SyncCursorPage[FineTuningJobEvent]</a></code> | |
| 226 | | |
| 227 | ### Checkpoints | |
| 228 | | |
| 229 | Types: | |
| 230 | | |
| 231 | ```python | |
| 232 | from openai.types.fine_tuning.jobs import FineTuningJobCheckpoint | |
08b8179aDavid Schnurr2 years ago | 233 | ``` |
| 234 | | |
| 235 | Methods: | |
| 236 | | |
f5247e30Stainless Bot2 years ago | 237 | - <code title="get /fine_tuning/jobs/{fine_tuning_job_id}/checkpoints">client.fine_tuning.jobs.checkpoints.<a href="./src/openai/resources/fine_tuning/jobs/checkpoints.py">list</a>(fine_tuning_job_id, \*\*<a href="src/openai/types/fine_tuning/jobs/checkpoint_list_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/jobs/fine_tuning_job_checkpoint.py">SyncCursorPage[FineTuningJobCheckpoint]</a></code> |
08b8179aDavid Schnurr2 years ago | 238 | |
baa9f07fRobert Craigie2 years ago | 239 | # Beta |
| 240 | | |
575ff607stainless-app[bot]1 years ago | 241 | ## Realtime |
| 242 | | |
5fdba486stainless-app[bot]1 years ago | 243 | Types: |
| 244 | | |
| 245 | ```python | |
| 246 | from openai.types.beta.realtime import ( | |
| 247 | ConversationCreatedEvent, | |
| 248 | ConversationItem, | |
| 249 | ConversationItemContent, | |
| 250 | ConversationItemCreateEvent, | |
| 251 | ConversationItemCreatedEvent, | |
| 252 | ConversationItemDeleteEvent, | |
| 253 | ConversationItemDeletedEvent, | |
| 254 | ConversationItemInputAudioTranscriptionCompletedEvent, | |
| 255 | ConversationItemInputAudioTranscriptionFailedEvent, | |
| 256 | ConversationItemTruncateEvent, | |
| 257 | ConversationItemTruncatedEvent, | |
| 258 | ErrorEvent, | |
| 259 | InputAudioBufferAppendEvent, | |
| 260 | InputAudioBufferClearEvent, | |
| 261 | InputAudioBufferClearedEvent, | |
| 262 | InputAudioBufferCommitEvent, | |
| 263 | InputAudioBufferCommittedEvent, | |
| 264 | InputAudioBufferSpeechStartedEvent, | |
| 265 | InputAudioBufferSpeechStoppedEvent, | |
| 266 | RateLimitsUpdatedEvent, | |
| 267 | RealtimeClientEvent, | |
| 268 | RealtimeResponse, | |
| 269 | RealtimeResponseStatus, | |
| 270 | RealtimeResponseUsage, | |
| 271 | RealtimeServerEvent, | |
| 272 | ResponseAudioDeltaEvent, | |
| 273 | ResponseAudioDoneEvent, | |
| 274 | ResponseAudioTranscriptDeltaEvent, | |
| 275 | ResponseAudioTranscriptDoneEvent, | |
| 276 | ResponseCancelEvent, | |
| 277 | ResponseContentPartAddedEvent, | |
| 278 | ResponseContentPartDoneEvent, | |
| 279 | ResponseCreateEvent, | |
| 280 | ResponseCreatedEvent, | |
| 281 | ResponseDoneEvent, | |
| 282 | ResponseFunctionCallArgumentsDeltaEvent, | |
| 283 | ResponseFunctionCallArgumentsDoneEvent, | |
| 284 | ResponseOutputItemAddedEvent, | |
| 285 | ResponseOutputItemDoneEvent, | |
| 286 | ResponseTextDeltaEvent, | |
| 287 | ResponseTextDoneEvent, | |
| 288 | SessionCreatedEvent, | |
| 289 | SessionUpdateEvent, | |
| 290 | SessionUpdatedEvent, | |
| 291 | ) | |
| 292 | ``` | |
| 293 | | |
575ff607stainless-app[bot]1 years ago | 294 | ### Sessions |
| 295 | | |
| 296 | Types: | |
| 297 | | |
| 298 | ```python | |
| 299 | from openai.types.beta.realtime import Session, SessionCreateResponse | |
| 300 | ``` | |
| 301 | | |
| 302 | Methods: | |
| 303 | | |
| 304 | - <code title="post /realtime/sessions">client.beta.realtime.sessions.<a href="./src/openai/resources/beta/realtime/sessions.py">create</a>(\*\*<a href="src/openai/types/beta/realtime/session_create_params.py">params</a>) -> <a href="./src/openai/types/beta/realtime/session_create_response.py">SessionCreateResponse</a></code> | |
| 305 | | |
5b20698dStainless Bot2 years ago | 306 | ## VectorStores |
| 307 | | |
| 308 | Types: | |
| 309 | | |
| 310 | ```python | |
f161000fStainless Bot1 years ago | 311 | from openai.types.beta import ( |
| 312 | AutoFileChunkingStrategyParam, | |
| 313 | FileChunkingStrategy, | |
| 314 | FileChunkingStrategyParam, | |
| 315 | OtherFileChunkingStrategyObject, | |
| 316 | StaticFileChunkingStrategy, | |
| 317 | StaticFileChunkingStrategyObject, | |
d256d835stainless-app[bot]1 years ago | 318 | StaticFileChunkingStrategyObjectParam, |
f161000fStainless Bot1 years ago | 319 | VectorStore, |
| 320 | VectorStoreDeleted, | |
| 321 | ) | |
5b20698dStainless Bot2 years ago | 322 | ``` |
| 323 | | |
| 324 | Methods: | |
| 325 | | |
| 326 | - <code title="post /vector_stores">client.beta.vector_stores.<a href="./src/openai/resources/beta/vector_stores/vector_stores.py">create</a>(\*\*<a href="src/openai/types/beta/vector_store_create_params.py">params</a>) -> <a href="./src/openai/types/beta/vector_store.py">VectorStore</a></code> | |
| 327 | - <code title="get /vector_stores/{vector_store_id}">client.beta.vector_stores.<a href="./src/openai/resources/beta/vector_stores/vector_stores.py">retrieve</a>(vector_store_id) -> <a href="./src/openai/types/beta/vector_store.py">VectorStore</a></code> | |
| 328 | - <code title="post /vector_stores/{vector_store_id}">client.beta.vector_stores.<a href="./src/openai/resources/beta/vector_stores/vector_stores.py">update</a>(vector_store_id, \*\*<a href="src/openai/types/beta/vector_store_update_params.py">params</a>) -> <a href="./src/openai/types/beta/vector_store.py">VectorStore</a></code> | |
| 329 | - <code title="get /vector_stores">client.beta.vector_stores.<a href="./src/openai/resources/beta/vector_stores/vector_stores.py">list</a>(\*\*<a href="src/openai/types/beta/vector_store_list_params.py">params</a>) -> <a href="./src/openai/types/beta/vector_store.py">SyncCursorPage[VectorStore]</a></code> | |
| 330 | - <code title="delete /vector_stores/{vector_store_id}">client.beta.vector_stores.<a href="./src/openai/resources/beta/vector_stores/vector_stores.py">delete</a>(vector_store_id) -> <a href="./src/openai/types/beta/vector_store_deleted.py">VectorStoreDeleted</a></code> | |
| 331 | | |
| 332 | ### Files | |
| 333 | | |
| 334 | Types: | |
| 335 | | |
| 336 | ```python | |
| 337 | from openai.types.beta.vector_stores import VectorStoreFile, VectorStoreFileDeleted | |
| 338 | ``` | |
| 339 | | |
| 340 | Methods: | |
| 341 | | |
| 342 | - <code title="post /vector_stores/{vector_store_id}/files">client.beta.vector_stores.files.<a href="./src/openai/resources/beta/vector_stores/files.py">create</a>(vector_store_id, \*\*<a href="src/openai/types/beta/vector_stores/file_create_params.py">params</a>) -> <a href="./src/openai/types/beta/vector_stores/vector_store_file.py">VectorStoreFile</a></code> | |
| 343 | - <code title="get /vector_stores/{vector_store_id}/files/{file_id}">client.beta.vector_stores.files.<a href="./src/openai/resources/beta/vector_stores/files.py">retrieve</a>(file_id, \*, vector_store_id) -> <a href="./src/openai/types/beta/vector_stores/vector_store_file.py">VectorStoreFile</a></code> | |
| 344 | - <code title="get /vector_stores/{vector_store_id}/files">client.beta.vector_stores.files.<a href="./src/openai/resources/beta/vector_stores/files.py">list</a>(vector_store_id, \*\*<a href="src/openai/types/beta/vector_stores/file_list_params.py">params</a>) -> <a href="./src/openai/types/beta/vector_stores/vector_store_file.py">SyncCursorPage[VectorStoreFile]</a></code> | |
| 345 | - <code title="delete /vector_stores/{vector_store_id}/files/{file_id}">client.beta.vector_stores.files.<a href="./src/openai/resources/beta/vector_stores/files.py">delete</a>(file_id, \*, vector_store_id) -> <a href="./src/openai/types/beta/vector_stores/vector_store_file_deleted.py">VectorStoreFileDeleted</a></code> | |
| 346 | - <code>client.beta.vector_stores.files.<a href="./src/openai/resources/beta/vector_stores/files.py">create_and_poll</a>(\*args) -> VectorStoreFile</code> | |
| 347 | - <code>client.beta.vector_stores.files.<a href="./src/openai/resources/beta/vector_stores/files.py">poll</a>(\*args) -> VectorStoreFile</code> | |
| 348 | - <code>client.beta.vector_stores.files.<a href="./src/openai/resources/beta/vector_stores/files.py">upload</a>(\*args) -> VectorStoreFile</code> | |
| 349 | - <code>client.beta.vector_stores.files.<a href="./src/openai/resources/beta/vector_stores/files.py">upload_and_poll</a>(\*args) -> VectorStoreFile</code> | |
| 350 | | |
| 351 | ### FileBatches | |
| 352 | | |
| 353 | Types: | |
| 354 | | |
| 355 | ```python | |
| 356 | from openai.types.beta.vector_stores import VectorStoreFileBatch | |
| 357 | ``` | |
| 358 | | |
| 359 | Methods: | |
| 360 | | |
| 361 | - <code title="post /vector_stores/{vector_store_id}/file_batches">client.beta.vector_stores.file_batches.<a href="./src/openai/resources/beta/vector_stores/file_batches.py">create</a>(vector_store_id, \*\*<a href="src/openai/types/beta/vector_stores/file_batch_create_params.py">params</a>) -> <a href="./src/openai/types/beta/vector_stores/vector_store_file_batch.py">VectorStoreFileBatch</a></code> | |
| 362 | - <code title="get /vector_stores/{vector_store_id}/file_batches/{batch_id}">client.beta.vector_stores.file_batches.<a href="./src/openai/resources/beta/vector_stores/file_batches.py">retrieve</a>(batch_id, \*, vector_store_id) -> <a href="./src/openai/types/beta/vector_stores/vector_store_file_batch.py">VectorStoreFileBatch</a></code> | |
| 363 | - <code title="post /vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel">client.beta.vector_stores.file_batches.<a href="./src/openai/resources/beta/vector_stores/file_batches.py">cancel</a>(batch_id, \*, vector_store_id) -> <a href="./src/openai/types/beta/vector_stores/vector_store_file_batch.py">VectorStoreFileBatch</a></code> | |
| 364 | - <code title="get /vector_stores/{vector_store_id}/file_batches/{batch_id}/files">client.beta.vector_stores.file_batches.<a href="./src/openai/resources/beta/vector_stores/file_batches.py">list_files</a>(batch_id, \*, vector_store_id, \*\*<a href="src/openai/types/beta/vector_stores/file_batch_list_files_params.py">params</a>) -> <a href="./src/openai/types/beta/vector_stores/vector_store_file.py">SyncCursorPage[VectorStoreFile]</a></code> | |
| 365 | - <code>client.beta.vector_stores.file_batches.<a href="./src/openai/resources/beta/vector_stores/file_batches.py">create_and_poll</a>(\*args) -> VectorStoreFileBatch</code> | |
| 366 | - <code>client.beta.vector_stores.file_batches.<a href="./src/openai/resources/beta/vector_stores/file_batches.py">poll</a>(\*args) -> VectorStoreFileBatch</code> | |
| 367 | - <code>client.beta.vector_stores.file_batches.<a href="./src/openai/resources/beta/vector_stores/file_batches.py">upload_and_poll</a>(\*args) -> VectorStoreFileBatch</code> | |
| 368 | | |
baa9f07fRobert Craigie2 years ago | 369 | ## Assistants |
| 370 | | |
| 371 | Types: | |
| 372 | | |
| 373 | ```python | |
5429f696Stainless Bot2 years ago | 374 | from openai.types.beta import ( |
| 375 | Assistant, | |
| 376 | AssistantDeleted, | |
| 377 | AssistantStreamEvent, | |
| 378 | AssistantTool, | |
| 379 | CodeInterpreterTool, | |
5b20698dStainless Bot2 years ago | 380 | FileSearchTool, |
5429f696Stainless Bot2 years ago | 381 | FunctionTool, |
| 382 | MessageStreamEvent, | |
| 383 | RunStepStreamEvent, | |
| 384 | RunStreamEvent, | |
| 385 | ThreadStreamEvent, | |
| 386 | ) | |
baa9f07fRobert Craigie2 years ago | 387 | ``` |
| 388 | | |
| 389 | Methods: | |
| 390 | | |
5b20698dStainless Bot2 years ago | 391 | - <code title="post /assistants">client.beta.assistants.<a href="./src/openai/resources/beta/assistants.py">create</a>(\*\*<a href="src/openai/types/beta/assistant_create_params.py">params</a>) -> <a href="./src/openai/types/beta/assistant.py">Assistant</a></code> |
| 392 | - <code title="get /assistants/{assistant_id}">client.beta.assistants.<a href="./src/openai/resources/beta/assistants.py">retrieve</a>(assistant_id) -> <a href="./src/openai/types/beta/assistant.py">Assistant</a></code> | |
| 393 | - <code title="post /assistants/{assistant_id}">client.beta.assistants.<a href="./src/openai/resources/beta/assistants.py">update</a>(assistant_id, \*\*<a href="src/openai/types/beta/assistant_update_params.py">params</a>) -> <a href="./src/openai/types/beta/assistant.py">Assistant</a></code> | |
| 394 | - <code title="get /assistants">client.beta.assistants.<a href="./src/openai/resources/beta/assistants.py">list</a>(\*\*<a href="src/openai/types/beta/assistant_list_params.py">params</a>) -> <a href="./src/openai/types/beta/assistant.py">SyncCursorPage[Assistant]</a></code> | |
| 395 | - <code title="delete /assistants/{assistant_id}">client.beta.assistants.<a href="./src/openai/resources/beta/assistants.py">delete</a>(assistant_id) -> <a href="./src/openai/types/beta/assistant_deleted.py">AssistantDeleted</a></code> | |
baa9f07fRobert Craigie2 years ago | 396 | |
| 397 | ## Threads | |
| 398 | | |
| 399 | Types: | |
| 400 | | |
| 401 | ```python | |
f5247e30Stainless Bot2 years ago | 402 | from openai.types.beta import ( |
| 403 | AssistantResponseFormatOption, | |
| 404 | AssistantToolChoice, | |
| 405 | AssistantToolChoiceFunction, | |
| 406 | AssistantToolChoiceOption, | |
| 407 | Thread, | |
| 408 | ThreadDeleted, | |
| 409 | ) | |
baa9f07fRobert Craigie2 years ago | 410 | ``` |
| 411 | | |
| 412 | Methods: | |
| 413 | | |
| 414 | - <code title="post /threads">client.beta.threads.<a href="./src/openai/resources/beta/threads/threads.py">create</a>(\*\*<a href="src/openai/types/beta/thread_create_params.py">params</a>) -> <a href="./src/openai/types/beta/thread.py">Thread</a></code> | |
| 415 | - <code title="get /threads/{thread_id}">client.beta.threads.<a href="./src/openai/resources/beta/threads/threads.py">retrieve</a>(thread_id) -> <a href="./src/openai/types/beta/thread.py">Thread</a></code> | |
| 416 | - <code title="post /threads/{thread_id}">client.beta.threads.<a href="./src/openai/resources/beta/threads/threads.py">update</a>(thread_id, \*\*<a href="src/openai/types/beta/thread_update_params.py">params</a>) -> <a href="./src/openai/types/beta/thread.py">Thread</a></code> | |
| 417 | - <code title="delete /threads/{thread_id}">client.beta.threads.<a href="./src/openai/resources/beta/threads/threads.py">delete</a>(thread_id) -> <a href="./src/openai/types/beta/thread_deleted.py">ThreadDeleted</a></code> | |
| 418 | - <code title="post /threads/runs">client.beta.threads.<a href="./src/openai/resources/beta/threads/threads.py">create_and_run</a>(\*\*<a href="src/openai/types/beta/thread_create_and_run_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/run.py">Run</a></code> | |
595f3b36Stainless Bot2 years ago | 419 | - <code>client.beta.threads.<a href="./src/openai/resources/beta/threads/threads.py">create_and_run_poll</a>(\*args) -> Run</code> |
5429f696Stainless Bot2 years ago | 420 | - <code>client.beta.threads.<a href="./src/openai/resources/beta/threads/threads.py">create_and_run_stream</a>(\*args) -> AssistantStreamManager[AssistantEventHandler] | AssistantStreamManager[AssistantEventHandlerT]</code> |
baa9f07fRobert Craigie2 years ago | 421 | |
| 422 | ### Runs | |
| 423 | | |
| 424 | Types: | |
| 425 | | |
| 426 | ```python | |
f0b18239Stainless Bot2 years ago | 427 | from openai.types.beta.threads import RequiredActionFunctionToolCall, Run, RunStatus |
baa9f07fRobert Craigie2 years ago | 428 | ``` |
| 429 | | |
| 430 | Methods: | |
| 431 | | |
| 432 | - <code title="post /threads/{thread_id}/runs">client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">create</a>(thread_id, \*\*<a href="src/openai/types/beta/threads/run_create_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/run.py">Run</a></code> | |
| 433 | - <code title="get /threads/{thread_id}/runs/{run_id}">client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">retrieve</a>(run_id, \*, thread_id) -> <a href="./src/openai/types/beta/threads/run.py">Run</a></code> | |
| 434 | - <code title="post /threads/{thread_id}/runs/{run_id}">client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">update</a>(run_id, \*, thread_id, \*\*<a href="src/openai/types/beta/threads/run_update_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/run.py">Run</a></code> | |
| 435 | - <code title="get /threads/{thread_id}/runs">client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">list</a>(thread_id, \*\*<a href="src/openai/types/beta/threads/run_list_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/run.py">SyncCursorPage[Run]</a></code> | |
| 436 | - <code title="post /threads/{thread_id}/runs/{run_id}/cancel">client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">cancel</a>(run_id, \*, thread_id) -> <a href="./src/openai/types/beta/threads/run.py">Run</a></code> | |
| 437 | - <code title="post /threads/{thread_id}/runs/{run_id}/submit_tool_outputs">client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">submit_tool_outputs</a>(run_id, \*, thread_id, \*\*<a href="src/openai/types/beta/threads/run_submit_tool_outputs_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/run.py">Run</a></code> | |
595f3b36Stainless Bot2 years ago | 438 | - <code>client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">create_and_poll</a>(\*args) -> Run</code> |
5429f696Stainless Bot2 years ago | 439 | - <code>client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">create_and_stream</a>(\*args) -> AssistantStreamManager[AssistantEventHandler] | AssistantStreamManager[AssistantEventHandlerT]</code> |
595f3b36Stainless Bot2 years ago | 440 | - <code>client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">poll</a>(\*args) -> Run</code> |
| 441 | - <code>client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">stream</a>(\*args) -> AssistantStreamManager[AssistantEventHandler] | AssistantStreamManager[AssistantEventHandlerT]</code> | |
| 442 | - <code>client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">submit_tool_outputs_and_poll</a>(\*args) -> Run</code> | |
5429f696Stainless Bot2 years ago | 443 | - <code>client.beta.threads.runs.<a href="./src/openai/resources/beta/threads/runs/runs.py">submit_tool_outputs_stream</a>(\*args) -> AssistantStreamManager[AssistantEventHandler] | AssistantStreamManager[AssistantEventHandlerT]</code> |
baa9f07fRobert Craigie2 years ago | 444 | |
| 445 | #### Steps | |
| 446 | | |
| 447 | Types: | |
| 448 | | |
| 449 | ```python | |
| 450 | from openai.types.beta.threads.runs import ( | |
5429f696Stainless Bot2 years ago | 451 | CodeInterpreterLogs, |
| 452 | CodeInterpreterOutputImage, | |
| 453 | CodeInterpreterToolCall, | |
| 454 | CodeInterpreterToolCallDelta, | |
5b20698dStainless Bot2 years ago | 455 | FileSearchToolCall, |
| 456 | FileSearchToolCallDelta, | |
baa9f07fRobert Craigie2 years ago | 457 | FunctionToolCall, |
5429f696Stainless Bot2 years ago | 458 | FunctionToolCallDelta, |
baa9f07fRobert Craigie2 years ago | 459 | MessageCreationStepDetails, |
| 460 | RunStep, | |
5429f696Stainless Bot2 years ago | 461 | RunStepDelta, |
| 462 | RunStepDeltaEvent, | |
| 463 | RunStepDeltaMessageDelta, | |
5d3111a8Stainless Bot1 years ago | 464 | RunStepInclude, |
5429f696Stainless Bot2 years ago | 465 | ToolCall, |
| 466 | ToolCallDelta, | |
| 467 | ToolCallDeltaObject, | |
baa9f07fRobert Craigie2 years ago | 468 | ToolCallsStepDetails, |
| 469 | ) | |
| 470 | ``` | |
| 471 | | |
| 472 | Methods: | |
| 473 | | |
5d3111a8Stainless Bot1 years ago | 474 | - <code title="get /threads/{thread_id}/runs/{run_id}/steps/{step_id}">client.beta.threads.runs.steps.<a href="./src/openai/resources/beta/threads/runs/steps.py">retrieve</a>(step_id, \*, thread_id, run_id, \*\*<a href="src/openai/types/beta/threads/runs/step_retrieve_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/runs/run_step.py">RunStep</a></code> |
baa9f07fRobert Craigie2 years ago | 475 | - <code title="get /threads/{thread_id}/runs/{run_id}/steps">client.beta.threads.runs.steps.<a href="./src/openai/resources/beta/threads/runs/steps.py">list</a>(run_id, \*, thread_id, \*\*<a href="src/openai/types/beta/threads/runs/step_list_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/runs/run_step.py">SyncCursorPage[RunStep]</a></code> |
| 476 | | |
| 477 | ### Messages | |
| 478 | | |
| 479 | Types: | |
| 480 | | |
| 481 | ```python | |
| 482 | from openai.types.beta.threads import ( | |
5429f696Stainless Bot2 years ago | 483 | Annotation, |
| 484 | AnnotationDelta, | |
| 485 | FileCitationAnnotation, | |
| 486 | FileCitationDeltaAnnotation, | |
| 487 | FilePathAnnotation, | |
| 488 | FilePathDeltaAnnotation, | |
| 489 | ImageFile, | |
| 490 | ImageFileContentBlock, | |
| 491 | ImageFileDelta, | |
| 492 | ImageFileDeltaBlock, | |
79a0b401Stainless Bot2 years ago | 493 | ImageURL, |
| 494 | ImageURLContentBlock, | |
| 495 | ImageURLDelta, | |
| 496 | ImageURLDeltaBlock, | |
5429f696Stainless Bot2 years ago | 497 | Message, |
| 498 | MessageContent, | |
| 499 | MessageContentDelta, | |
79a0b401Stainless Bot2 years ago | 500 | MessageContentPartParam, |
5429f696Stainless Bot2 years ago | 501 | MessageDeleted, |
| 502 | MessageDelta, | |
| 503 | MessageDeltaEvent, | |
bf1ca86cRobert Craigie1 years ago | 504 | RefusalContentBlock, |
| 505 | RefusalDeltaBlock, | |
5429f696Stainless Bot2 years ago | 506 | Text, |
| 507 | TextContentBlock, | |
79a0b401Stainless Bot2 years ago | 508 | TextContentBlockParam, |
5429f696Stainless Bot2 years ago | 509 | TextDelta, |
| 510 | TextDeltaBlock, | |
baa9f07fRobert Craigie2 years ago | 511 | ) |
| 512 | ``` | |
| 513 | | |
| 514 | Methods: | |
| 515 | | |
5b20698dStainless Bot2 years ago | 516 | - <code title="post /threads/{thread_id}/messages">client.beta.threads.messages.<a href="./src/openai/resources/beta/threads/messages.py">create</a>(thread_id, \*\*<a href="src/openai/types/beta/threads/message_create_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/message.py">Message</a></code> |
| 517 | - <code title="get /threads/{thread_id}/messages/{message_id}">client.beta.threads.messages.<a href="./src/openai/resources/beta/threads/messages.py">retrieve</a>(message_id, \*, thread_id) -> <a href="./src/openai/types/beta/threads/message.py">Message</a></code> | |
| 518 | - <code title="post /threads/{thread_id}/messages/{message_id}">client.beta.threads.messages.<a href="./src/openai/resources/beta/threads/messages.py">update</a>(message_id, \*, thread_id, \*\*<a href="src/openai/types/beta/threads/message_update_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/message.py">Message</a></code> | |
| 519 | - <code title="get /threads/{thread_id}/messages">client.beta.threads.messages.<a href="./src/openai/resources/beta/threads/messages.py">list</a>(thread_id, \*\*<a href="src/openai/types/beta/threads/message_list_params.py">params</a>) -> <a href="./src/openai/types/beta/threads/message.py">SyncCursorPage[Message]</a></code> | |
d2738d42Stainless Bot2 years ago | 520 | - <code title="delete /threads/{thread_id}/messages/{message_id}">client.beta.threads.messages.<a href="./src/openai/resources/beta/threads/messages.py">delete</a>(message_id, \*, thread_id) -> <a href="./src/openai/types/beta/threads/message_deleted.py">MessageDeleted</a></code> |
db069cdaStainless Bot2 years ago | 521 | |
| 522 | # Batches | |
| 523 | | |
| 524 | Types: | |
| 525 | | |
| 526 | ```python | |
| 527 | from openai.types import Batch, BatchError, BatchRequestCounts | |
| 528 | ``` | |
| 529 | | |
| 530 | Methods: | |
| 531 | | |
| 532 | - <code title="post /batches">client.batches.<a href="./src/openai/resources/batches.py">create</a>(\*\*<a href="src/openai/types/batch_create_params.py">params</a>) -> <a href="./src/openai/types/batch.py">Batch</a></code> | |
| 533 | - <code title="get /batches/{batch_id}">client.batches.<a href="./src/openai/resources/batches.py">retrieve</a>(batch_id) -> <a href="./src/openai/types/batch.py">Batch</a></code> | |
2edeeb1fStainless Bot2 years ago | 534 | - <code title="get /batches">client.batches.<a href="./src/openai/resources/batches.py">list</a>(\*\*<a href="src/openai/types/batch_list_params.py">params</a>) -> <a href="./src/openai/types/batch.py">SyncCursorPage[Batch]</a></code> |
db069cdaStainless Bot2 years ago | 535 | - <code title="post /batches/{batch_id}/cancel">client.batches.<a href="./src/openai/resources/batches.py">cancel</a>(batch_id) -> <a href="./src/openai/types/batch.py">Batch</a></code> |
24ab406bstainless-app[bot]1 years ago | 536 | |
| 537 | # Uploads | |
| 538 | | |
| 539 | Types: | |
| 540 | | |
| 541 | ```python | |
| 542 | from openai.types import Upload | |
| 543 | ``` | |
| 544 | | |
| 545 | Methods: | |
| 546 | | |
| 547 | - <code title="post /uploads">client.uploads.<a href="./src/openai/resources/uploads/uploads.py">create</a>(\*\*<a href="src/openai/types/upload_create_params.py">params</a>) -> <a href="./src/openai/types/upload.py">Upload</a></code> | |
| 548 | - <code title="post /uploads/{upload_id}/cancel">client.uploads.<a href="./src/openai/resources/uploads/uploads.py">cancel</a>(upload_id) -> <a href="./src/openai/types/upload.py">Upload</a></code> | |
| 549 | - <code title="post /uploads/{upload_id}/complete">client.uploads.<a href="./src/openai/resources/uploads/uploads.py">complete</a>(upload_id, \*\*<a href="src/openai/types/upload_complete_params.py">params</a>) -> <a href="./src/openai/types/upload.py">Upload</a></code> | |
| 550 | | |
| 551 | ## Parts | |
| 552 | | |
| 553 | Types: | |
| 554 | | |
| 555 | ```python | |
| 556 | from openai.types.uploads import UploadPart | |
| 557 | ``` | |
| 558 | | |
| 559 | Methods: | |
| 560 | | |
| 561 | - <code title="post /uploads/{upload_id}/parts">client.uploads.parts.<a href="./src/openai/resources/uploads/parts.py">create</a>(upload_id, \*\*<a href="src/openai/types/uploads/part_create_params.py">params</a>) -> <a href="./src/openai/types/uploads/upload_part.py">UploadPart</a></code> |