openapi_openai 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +274 -51
- data/docs/AssistantFileObject.md +24 -0
- data/docs/AssistantObject.md +36 -0
- data/docs/AssistantObjectToolsInner.md +51 -0
- data/docs/AssistantStreamEvent.md +57 -0
- data/docs/AssistantToolsCode.md +18 -0
- data/docs/AssistantToolsFunction.md +20 -0
- data/docs/AssistantToolsRetrieval.md +18 -0
- data/docs/AssistantsApi.md +2017 -0
- data/docs/AssistantsApiNamedToolChoice.md +20 -0
- data/docs/AssistantsApiResponseFormat.md +18 -0
- data/docs/AssistantsApiResponseFormatOption.md +49 -0
- data/docs/AssistantsApiToolChoiceOption.md +49 -0
- data/docs/AudioApi.md +235 -0
- data/docs/ChatApi.md +75 -0
- data/docs/{CreateChatCompletionRequestFunctionCallOneOf.md → ChatCompletionFunctionCallOption.md} +2 -2
- data/docs/ChatCompletionFunctions.md +3 -3
- data/docs/ChatCompletionMessageToolCall.md +22 -0
- data/docs/ChatCompletionMessageToolCallChunk.md +24 -0
- data/docs/{ChatCompletionRequestMessageFunctionCall.md → ChatCompletionMessageToolCallChunkFunction.md} +2 -2
- data/docs/ChatCompletionMessageToolCallFunction.md +20 -0
- data/docs/ChatCompletionNamedToolChoice.md +20 -0
- data/docs/ChatCompletionNamedToolChoiceFunction.md +18 -0
- data/docs/ChatCompletionRequestAssistantMessage.md +26 -0
- data/docs/ChatCompletionRequestAssistantMessageFunctionCall.md +20 -0
- data/docs/ChatCompletionRequestFunctionMessage.md +22 -0
- data/docs/ChatCompletionRequestMessage.md +45 -14
- data/docs/ChatCompletionRequestMessageContentPart.md +49 -0
- data/docs/ChatCompletionRequestMessageContentPartImage.md +20 -0
- data/docs/ChatCompletionRequestMessageContentPartImageImageUrl.md +20 -0
- data/docs/ChatCompletionRequestMessageContentPartText.md +20 -0
- data/docs/ChatCompletionRequestSystemMessage.md +22 -0
- data/docs/ChatCompletionRequestToolMessage.md +22 -0
- data/docs/ChatCompletionRequestUserMessage.md +22 -0
- data/docs/ChatCompletionRequestUserMessageContent.md +49 -0
- data/docs/ChatCompletionResponseMessage.md +5 -3
- data/docs/ChatCompletionRole.md +15 -0
- data/docs/ChatCompletionStreamResponseDelta.md +6 -4
- data/docs/ChatCompletionStreamResponseDeltaFunctionCall.md +20 -0
- data/docs/ChatCompletionTokenLogprob.md +24 -0
- data/docs/ChatCompletionTokenLogprobTopLogprobsInner.md +22 -0
- data/docs/ChatCompletionTool.md +20 -0
- data/docs/ChatCompletionToolChoiceOption.md +49 -0
- data/docs/CompletionUsage.md +22 -0
- data/docs/CompletionsApi.md +75 -0
- data/docs/CreateAssistantFileRequest.md +18 -0
- data/docs/CreateAssistantRequest.md +30 -0
- data/docs/CreateAssistantRequestModel.md +15 -0
- data/docs/CreateChatCompletionFunctionResponse.md +30 -0
- data/docs/CreateChatCompletionFunctionResponseChoicesInner.md +22 -0
- data/docs/CreateChatCompletionRequest.md +33 -21
- data/docs/CreateChatCompletionRequestFunctionCall.md +3 -3
- data/docs/CreateChatCompletionRequestModel.md +5 -37
- data/docs/CreateChatCompletionRequestResponseFormat.md +18 -0
- data/docs/CreateChatCompletionResponse.md +10 -8
- data/docs/CreateChatCompletionResponseChoicesInner.md +6 -4
- data/docs/CreateChatCompletionResponseChoicesInnerLogprobs.md +18 -0
- data/docs/CreateChatCompletionStreamResponse.md +9 -7
- data/docs/CreateChatCompletionStreamResponseChoicesInner.md +7 -5
- data/docs/CreateCompletionRequest.md +23 -21
- data/docs/CreateCompletionRequestModel.md +5 -37
- data/docs/CreateCompletionResponse.md +10 -8
- data/docs/CreateCompletionResponseChoicesInner.md +4 -4
- data/docs/CreateCompletionResponseChoicesInnerLogprobs.md +6 -6
- data/docs/CreateEmbeddingRequest.md +6 -2
- data/docs/CreateEmbeddingRequestModel.md +5 -37
- data/docs/CreateEmbeddingResponse.md +5 -5
- data/docs/CreateEmbeddingResponseUsage.md +2 -2
- data/docs/CreateFineTuningJobRequest.md +30 -0
- data/docs/CreateFineTuningJobRequestHyperparameters.md +22 -0
- data/docs/CreateFineTuningJobRequestHyperparametersBatchSize.md +49 -0
- data/docs/CreateFineTuningJobRequestHyperparametersLearningRateMultiplier.md +49 -0
- data/docs/CreateFineTuningJobRequestHyperparametersNEpochs.md +49 -0
- data/docs/CreateFineTuningJobRequestIntegrationsInner.md +20 -0
- data/docs/{CreateFineTuneRequestModel.md → CreateFineTuningJobRequestIntegrationsInnerType.md} +4 -4
- data/docs/CreateFineTuningJobRequestIntegrationsInnerWandb.md +24 -0
- data/docs/CreateFineTuningJobRequestModel.md +15 -0
- data/docs/CreateImageEditRequestModel.md +15 -0
- data/docs/CreateImageRequest.md +11 -5
- data/docs/CreateImageRequestModel.md +15 -0
- data/docs/CreateMessageRequest.md +24 -0
- data/docs/CreateModerationRequestModel.md +5 -37
- data/docs/CreateModerationResponse.md +3 -3
- data/docs/CreateModerationResponseResultsInner.md +1 -1
- data/docs/CreateModerationResponseResultsInnerCategories.md +15 -7
- data/docs/CreateModerationResponseResultsInnerCategoryScores.md +15 -7
- data/docs/CreateRunRequest.md +44 -0
- data/docs/CreateRunRequestModel.md +15 -0
- data/docs/CreateSpeechRequest.md +26 -0
- data/docs/CreateSpeechRequestModel.md +15 -0
- data/docs/CreateThreadAndRunRequest.md +42 -0
- data/docs/CreateThreadAndRunRequestToolsInner.md +51 -0
- data/docs/CreateThreadRequest.md +20 -0
- data/docs/CreateTranscription200Response.md +49 -0
- data/docs/CreateTranscriptionRequestModel.md +5 -37
- data/docs/CreateTranscriptionResponseJson.md +18 -0
- data/docs/CreateTranscriptionResponseVerboseJson.md +26 -0
- data/docs/CreateTranslation200Response.md +49 -0
- data/docs/{CreateTranscriptionResponse.md → CreateTranslationResponseJson.md} +2 -2
- data/docs/CreateTranslationResponseVerboseJson.md +24 -0
- data/docs/DeleteAssistantFileResponse.md +22 -0
- data/docs/DeleteAssistantResponse.md +22 -0
- data/docs/DeleteMessageResponse.md +22 -0
- data/docs/DeleteModelResponse.md +3 -3
- data/docs/DeleteThreadResponse.md +22 -0
- data/docs/DoneEvent.md +20 -0
- data/docs/Embedding.md +22 -0
- data/docs/EmbeddingsApi.md +75 -0
- data/docs/Error.md +4 -4
- data/docs/ErrorEvent.md +20 -0
- data/docs/FilesApi.md +351 -0
- data/docs/FineTuningApi.md +431 -0
- data/docs/FineTuningIntegration.md +20 -0
- data/docs/FineTuningJob.md +48 -0
- data/docs/FineTuningJobCheckpoint.md +30 -0
- data/docs/FineTuningJobCheckpointMetrics.md +30 -0
- data/docs/FineTuningJobError.md +22 -0
- data/docs/{FineTuneEvent.md → FineTuningJobEvent.md} +7 -5
- data/docs/FineTuningJobHyperparameters.md +18 -0
- data/docs/FineTuningJobHyperparametersNEpochs.md +49 -0
- data/docs/FineTuningJobIntegrationsInner.md +47 -0
- data/docs/FunctionObject.md +22 -0
- data/docs/Image.md +22 -0
- data/docs/ImagesApi.md +239 -0
- data/docs/ImagesResponse.md +1 -1
- data/docs/ListAssistantFilesResponse.md +26 -0
- data/docs/ListAssistantsResponse.md +26 -0
- data/docs/ListFilesResponse.md +3 -3
- data/docs/ListFineTuningJobCheckpointsResponse.md +26 -0
- data/docs/ListFineTuningJobEventsResponse.md +20 -0
- data/docs/ListMessageFilesResponse.md +26 -0
- data/docs/ListMessagesResponse.md +26 -0
- data/docs/ListPaginatedFineTuningJobsResponse.md +22 -0
- data/docs/ListRunStepsResponse.md +26 -0
- data/docs/ListRunsResponse.md +26 -0
- data/docs/ListThreadsResponse.md +26 -0
- data/docs/MessageContentImageFileObject.md +20 -0
- data/docs/MessageContentImageFileObjectImageFile.md +18 -0
- data/docs/MessageContentTextAnnotationsFileCitationObject.md +26 -0
- data/docs/MessageContentTextAnnotationsFileCitationObjectFileCitation.md +20 -0
- data/docs/MessageContentTextAnnotationsFilePathObject.md +26 -0
- data/docs/MessageContentTextAnnotationsFilePathObjectFilePath.md +18 -0
- data/docs/MessageContentTextObject.md +20 -0
- data/docs/MessageContentTextObjectText.md +20 -0
- data/docs/MessageContentTextObjectTextAnnotationsInner.md +49 -0
- data/docs/MessageDeltaContentImageFileObject.md +22 -0
- data/docs/MessageDeltaContentImageFileObjectImageFile.md +18 -0
- data/docs/MessageDeltaContentTextAnnotationsFileCitationObject.md +28 -0
- data/docs/MessageDeltaContentTextAnnotationsFileCitationObjectFileCitation.md +20 -0
- data/docs/MessageDeltaContentTextAnnotationsFilePathObject.md +28 -0
- data/docs/MessageDeltaContentTextAnnotationsFilePathObjectFilePath.md +18 -0
- data/docs/MessageDeltaContentTextObject.md +22 -0
- data/docs/MessageDeltaContentTextObjectText.md +20 -0
- data/docs/MessageDeltaContentTextObjectTextAnnotationsInner.md +49 -0
- data/docs/MessageDeltaObject.md +22 -0
- data/docs/MessageDeltaObjectDelta.md +22 -0
- data/docs/MessageDeltaObjectDeltaContentInner.md +49 -0
- data/docs/MessageFileObject.md +24 -0
- data/docs/MessageObject.md +44 -0
- data/docs/MessageObjectContentInner.md +49 -0
- data/docs/MessageObjectIncompleteDetails.md +18 -0
- data/docs/MessageStreamEvent.md +55 -0
- data/docs/MessageStreamEventOneOf.md +20 -0
- data/docs/MessageStreamEventOneOf1.md +20 -0
- data/docs/MessageStreamEventOneOf2.md +20 -0
- data/docs/MessageStreamEventOneOf3.md +20 -0
- data/docs/MessageStreamEventOneOf4.md +20 -0
- data/docs/Model.md +5 -5
- data/docs/ModelsApi.md +208 -0
- data/docs/ModerationsApi.md +75 -0
- data/docs/ModifyAssistantRequest.md +30 -0
- data/docs/ModifyMessageRequest.md +18 -0
- data/docs/ModifyRunRequest.md +18 -0
- data/docs/ModifyThreadRequest.md +18 -0
- data/docs/OpenAIFile.md +9 -9
- data/docs/RunCompletionUsage.md +22 -0
- data/docs/RunObject.md +68 -0
- data/docs/RunObjectIncompleteDetails.md +18 -0
- data/docs/RunObjectLastError.md +20 -0
- data/docs/RunObjectRequiredAction.md +20 -0
- data/docs/RunObjectRequiredActionSubmitToolOutputs.md +18 -0
- data/docs/RunStepCompletionUsage.md +22 -0
- data/docs/RunStepDeltaObject.md +22 -0
- data/docs/RunStepDeltaObjectDelta.md +18 -0
- data/docs/RunStepDeltaObjectDeltaStepDetails.md +49 -0
- data/docs/RunStepDeltaStepDetailsMessageCreationObject.md +20 -0
- data/docs/RunStepDeltaStepDetailsMessageCreationObjectMessageCreation.md +18 -0
- data/docs/RunStepDeltaStepDetailsToolCallsCodeObject.md +24 -0
- data/docs/RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreter.md +20 -0
- data/docs/RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsInner.md +49 -0
- data/docs/RunStepDeltaStepDetailsToolCallsCodeOutputImageObject.md +22 -0
- data/docs/RunStepDeltaStepDetailsToolCallsCodeOutputImageObjectImage.md +18 -0
- data/docs/RunStepDeltaStepDetailsToolCallsCodeOutputLogsObject.md +22 -0
- data/docs/RunStepDeltaStepDetailsToolCallsFunctionObject.md +24 -0
- data/docs/RunStepDeltaStepDetailsToolCallsFunctionObjectFunction.md +22 -0
- data/docs/RunStepDeltaStepDetailsToolCallsObject.md +20 -0
- data/docs/RunStepDeltaStepDetailsToolCallsObjectToolCallsInner.md +51 -0
- data/docs/RunStepDeltaStepDetailsToolCallsRetrievalObject.md +24 -0
- data/docs/RunStepDetailsMessageCreationObject.md +20 -0
- data/docs/RunStepDetailsMessageCreationObjectMessageCreation.md +18 -0
- data/docs/RunStepDetailsToolCallsCodeObject.md +22 -0
- data/docs/RunStepDetailsToolCallsCodeObjectCodeInterpreter.md +20 -0
- data/docs/RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsInner.md +49 -0
- data/docs/RunStepDetailsToolCallsCodeOutputImageObject.md +20 -0
- data/docs/RunStepDetailsToolCallsCodeOutputImageObjectImage.md +18 -0
- data/docs/RunStepDetailsToolCallsCodeOutputLogsObject.md +20 -0
- data/docs/RunStepDetailsToolCallsFunctionObject.md +22 -0
- data/docs/RunStepDetailsToolCallsFunctionObjectFunction.md +22 -0
- data/docs/RunStepDetailsToolCallsObject.md +20 -0
- data/docs/RunStepDetailsToolCallsObjectToolCallsInner.md +51 -0
- data/docs/RunStepDetailsToolCallsRetrievalObject.md +22 -0
- data/docs/RunStepObject.md +48 -0
- data/docs/RunStepObjectLastError.md +20 -0
- data/docs/RunStepObjectStepDetails.md +49 -0
- data/docs/RunStepStreamEvent.md +59 -0
- data/docs/RunStepStreamEventOneOf.md +20 -0
- data/docs/RunStepStreamEventOneOf1.md +20 -0
- data/docs/RunStepStreamEventOneOf2.md +20 -0
- data/docs/RunStepStreamEventOneOf3.md +20 -0
- data/docs/RunStepStreamEventOneOf4.md +20 -0
- data/docs/RunStepStreamEventOneOf5.md +20 -0
- data/docs/RunStepStreamEventOneOf6.md +20 -0
- data/docs/RunStreamEvent.md +63 -0
- data/docs/RunStreamEventOneOf.md +20 -0
- data/docs/RunStreamEventOneOf1.md +20 -0
- data/docs/RunStreamEventOneOf2.md +20 -0
- data/docs/RunStreamEventOneOf3.md +20 -0
- data/docs/RunStreamEventOneOf4.md +20 -0
- data/docs/RunStreamEventOneOf5.md +20 -0
- data/docs/RunStreamEventOneOf6.md +20 -0
- data/docs/RunStreamEventOneOf7.md +20 -0
- data/docs/RunStreamEventOneOf8.md +20 -0
- data/docs/RunToolCallObject.md +22 -0
- data/docs/RunToolCallObjectFunction.md +20 -0
- data/docs/SubmitToolOutputsRunRequest.md +20 -0
- data/docs/SubmitToolOutputsRunRequestToolOutputsInner.md +20 -0
- data/docs/ThreadObject.md +24 -0
- data/docs/{CreateEditRequestModel.md → ThreadStreamEvent.md} +7 -7
- data/docs/ThreadStreamEventOneOf.md +20 -0
- data/docs/TranscriptionSegment.md +36 -0
- data/docs/TranscriptionWord.md +22 -0
- data/docs/TruncationObject.md +20 -0
- data/lib/openapi_openai/api/assistants_api.rb +2006 -0
- data/lib/openapi_openai/api/audio_api.rb +268 -0
- data/lib/openapi_openai/api/chat_api.rb +88 -0
- data/lib/openapi_openai/api/completions_api.rb +88 -0
- data/lib/openapi_openai/api/embeddings_api.rb +88 -0
- data/lib/openapi_openai/api/files_api.rb +342 -0
- data/lib/openapi_openai/api/fine_tuning_api.rb +405 -0
- data/lib/openapi_openai/api/images_api.rb +294 -0
- data/lib/openapi_openai/api/models_api.rb +199 -0
- data/lib/openapi_openai/api/moderations_api.rb +88 -0
- data/lib/openapi_openai/api_client.rb +2 -1
- data/lib/openapi_openai/api_error.rb +1 -1
- data/lib/openapi_openai/configuration.rb +8 -1
- data/lib/openapi_openai/models/assistant_file_object.rb +308 -0
- data/lib/openapi_openai/models/assistant_object.rb +481 -0
- data/lib/openapi_openai/models/assistant_object_tools_inner.rb +106 -0
- data/lib/openapi_openai/models/assistant_stream_event.rb +110 -0
- data/lib/openapi_openai/models/assistant_tools_code.rb +256 -0
- data/lib/openapi_openai/models/assistant_tools_function.rb +272 -0
- data/lib/openapi_openai/models/assistant_tools_retrieval.rb +256 -0
- data/lib/openapi_openai/models/assistants_api_named_tool_choice.rb +266 -0
- data/lib/openapi_openai/models/assistants_api_response_format.rb +252 -0
- data/lib/openapi_openai/models/assistants_api_response_format_option.rb +106 -0
- data/lib/openapi_openai/models/assistants_api_tool_choice_option.rb +106 -0
- data/lib/openapi_openai/models/chat_completion_function_call_option.rb +223 -0
- data/lib/openapi_openai/models/chat_completion_functions.rb +13 -13
- data/lib/openapi_openai/models/chat_completion_message_tool_call.rb +289 -0
- data/lib/openapi_openai/models/chat_completion_message_tool_call_chunk.rb +284 -0
- data/lib/openapi_openai/models/{chat_completion_request_message_function_call.rb → chat_completion_message_tool_call_chunk_function.rb} +4 -5
- data/lib/openapi_openai/models/chat_completion_message_tool_call_function.rb +240 -0
- data/lib/openapi_openai/models/chat_completion_named_tool_choice.rb +273 -0
- data/lib/openapi_openai/models/{create_chat_completion_request_function_call_one_of.rb → chat_completion_named_tool_choice_function.rb} +4 -4
- data/lib/openapi_openai/models/chat_completion_request_assistant_message.rb +298 -0
- data/lib/openapi_openai/models/chat_completion_request_assistant_message_function_call.rb +240 -0
- data/lib/openapi_openai/models/chat_completion_request_function_message.rb +286 -0
- data/lib/openapi_openai/models/chat_completion_request_message.rb +78 -255
- data/lib/openapi_openai/models/chat_completion_request_message_content_part.rb +105 -0
- data/lib/openapi_openai/models/chat_completion_request_message_content_part_image.rb +272 -0
- data/lib/openapi_openai/models/chat_completion_request_message_content_part_image_image_url.rb +268 -0
- data/lib/openapi_openai/models/chat_completion_request_message_content_part_text.rb +273 -0
- data/lib/openapi_openai/models/chat_completion_request_system_message.rb +283 -0
- data/lib/openapi_openai/models/chat_completion_request_tool_message.rb +290 -0
- data/lib/openapi_openai/models/chat_completion_request_user_message.rb +282 -0
- data/lib/openapi_openai/models/{create_fine_tune_request_model.rb → chat_completion_request_user_message_content.rb} +4 -3
- data/lib/openapi_openai/models/chat_completion_response_message.rb +30 -15
- data/lib/openapi_openai/models/chat_completion_role.rb +43 -0
- data/lib/openapi_openai/models/chat_completion_stream_response_delta.rb +29 -17
- data/lib/openapi_openai/models/chat_completion_stream_response_delta_function_call.rb +226 -0
- data/lib/openapi_openai/models/chat_completion_token_logprob.rb +273 -0
- data/lib/openapi_openai/models/chat_completion_token_logprob_top_logprobs_inner.rb +254 -0
- data/lib/openapi_openai/models/chat_completion_tool.rb +272 -0
- data/lib/openapi_openai/models/chat_completion_tool_choice_option.rb +106 -0
- data/lib/openapi_openai/models/{create_completion_response_usage.rb → completion_usage.rb} +25 -21
- data/lib/openapi_openai/models/create_assistant_file_request.rb +222 -0
- data/lib/openapi_openai/models/create_assistant_request.rb +372 -0
- data/lib/openapi_openai/models/create_assistant_request_model.rb +104 -0
- data/lib/openapi_openai/models/create_chat_completion_function_response.rb +346 -0
- data/lib/openapi_openai/models/create_chat_completion_function_response_choices_inner.rb +289 -0
- data/lib/openapi_openai/models/create_chat_completion_request.rb +277 -152
- data/lib/openapi_openai/models/create_chat_completion_request_function_call.rb +3 -3
- data/lib/openapi_openai/models/create_chat_completion_request_model.rb +8 -9
- data/lib/openapi_openai/models/create_chat_completion_request_response_format.rb +252 -0
- data/lib/openapi_openai/models/create_chat_completion_request_stop.rb +1 -1
- data/lib/openapi_openai/models/create_chat_completion_response.rb +75 -25
- data/lib/openapi_openai/models/create_chat_completion_response_choices_inner.rb +45 -10
- data/lib/openapi_openai/models/create_chat_completion_response_choices_inner_logprobs.rb +221 -0
- data/lib/openapi_openai/models/create_chat_completion_stream_response.rb +74 -24
- data/lib/openapi_openai/models/create_chat_completion_stream_response_choices_inner.rb +45 -16
- data/lib/openapi_openai/models/create_completion_request.rb +219 -182
- data/lib/openapi_openai/models/create_completion_request_model.rb +8 -9
- data/lib/openapi_openai/models/create_completion_request_prompt.rb +1 -1
- data/lib/openapi_openai/models/create_completion_request_stop.rb +1 -1
- data/lib/openapi_openai/models/create_completion_response.rb +75 -25
- data/lib/openapi_openai/models/create_completion_response_choices_inner.rb +25 -24
- data/lib/openapi_openai/models/create_completion_response_choices_inner_logprobs.rb +23 -23
- data/lib/openapi_openai/models/create_embedding_request.rb +87 -12
- data/lib/openapi_openai/models/create_embedding_request_input.rb +2 -2
- data/lib/openapi_openai/models/create_embedding_request_model.rb +8 -9
- data/lib/openapi_openai/models/create_embedding_response.rb +61 -24
- data/lib/openapi_openai/models/create_embedding_response_usage.rb +4 -1
- data/lib/openapi_openai/models/{create_fine_tune_request.rb → create_fine_tuning_job_request.rb} +78 -111
- data/lib/openapi_openai/models/create_fine_tuning_job_request_hyperparameters.rb +233 -0
- data/lib/openapi_openai/models/create_fine_tuning_job_request_hyperparameters_batch_size.rb +106 -0
- data/lib/openapi_openai/models/create_fine_tuning_job_request_hyperparameters_learning_rate_multiplier.rb +106 -0
- data/lib/openapi_openai/models/create_fine_tuning_job_request_hyperparameters_n_epochs.rb +106 -0
- data/lib/openapi_openai/models/{list_fine_tunes_response.rb → create_fine_tuning_job_request_integrations_inner.rb} +25 -27
- data/lib/openapi_openai/models/create_fine_tuning_job_request_integrations_inner_type.rb +105 -0
- data/lib/openapi_openai/models/create_fine_tuning_job_request_integrations_inner_wandb.rb +257 -0
- data/lib/openapi_openai/models/create_fine_tuning_job_request_model.rb +104 -0
- data/lib/openapi_openai/models/create_image_edit_request_model.rb +104 -0
- data/lib/openapi_openai/models/create_image_request.rb +81 -22
- data/lib/openapi_openai/models/create_image_request_model.rb +104 -0
- data/lib/openapi_openai/models/create_message_request.rb +352 -0
- data/lib/openapi_openai/models/create_moderation_request.rb +1 -1
- data/lib/openapi_openai/models/create_moderation_request_input.rb +1 -1
- data/lib/openapi_openai/models/create_moderation_request_model.rb +8 -9
- data/lib/openapi_openai/models/create_moderation_response.rb +5 -1
- data/lib/openapi_openai/models/create_moderation_response_results_inner.rb +2 -1
- data/lib/openapi_openai/models/create_moderation_response_results_inner_categories.rb +78 -2
- data/lib/openapi_openai/models/create_moderation_response_results_inner_category_scores.rb +78 -2
- data/lib/openapi_openai/models/create_run_request.rb +433 -0
- data/lib/openapi_openai/models/create_run_request_model.rb +104 -0
- data/lib/openapi_openai/models/{create_edit_request.rb → create_speech_request.rb} +105 -95
- data/lib/openapi_openai/models/create_speech_request_model.rb +104 -0
- data/lib/openapi_openai/models/create_thread_and_run_request.rb +418 -0
- data/lib/openapi_openai/models/create_thread_and_run_request_tools_inner.rb +106 -0
- data/lib/openapi_openai/models/{list_fine_tune_events_response.rb → create_thread_request.rb} +22 -33
- data/lib/openapi_openai/models/create_transcription200_response.rb +105 -0
- data/lib/openapi_openai/models/create_transcription_request_model.rb +9 -10
- data/lib/openapi_openai/models/{create_transcription_response.rb → create_transcription_response_json.rb} +6 -4
- data/lib/openapi_openai/models/create_transcription_response_verbose_json.rb +281 -0
- data/lib/openapi_openai/models/create_translation200_response.rb +105 -0
- data/lib/openapi_openai/models/{create_translation_response.rb → create_translation_response_json.rb} +4 -4
- data/lib/openapi_openai/models/create_translation_response_verbose_json.rb +268 -0
- data/lib/openapi_openai/models/delete_assistant_file_response.rb +288 -0
- data/lib/openapi_openai/models/delete_assistant_response.rb +287 -0
- data/lib/openapi_openai/models/delete_file_response.rb +35 -1
- data/lib/openapi_openai/models/delete_message_response.rb +287 -0
- data/lib/openapi_openai/models/delete_model_response.rb +21 -21
- data/lib/openapi_openai/models/delete_thread_response.rb +287 -0
- data/lib/openapi_openai/models/done_event.rb +284 -0
- data/lib/openapi_openai/models/embedding.rb +293 -0
- data/lib/openapi_openai/models/error.rb +22 -22
- data/lib/openapi_openai/models/error_event.rb +272 -0
- data/lib/openapi_openai/models/error_response.rb +1 -1
- data/lib/openapi_openai/models/fine_tuning_integration.rb +272 -0
- data/lib/openapi_openai/models/fine_tuning_job.rb +515 -0
- data/lib/openapi_openai/models/{fine_tune.rb → fine_tuning_job_checkpoint.rb} +94 -146
- data/lib/openapi_openai/models/fine_tuning_job_checkpoint_metrics.rb +269 -0
- data/lib/openapi_openai/models/{fine_tune_event.rb → fine_tuning_job_error.rb} +34 -50
- data/lib/openapi_openai/models/fine_tuning_job_event.rb +332 -0
- data/lib/openapi_openai/models/fine_tuning_job_hyperparameters.rb +222 -0
- data/lib/openapi_openai/models/fine_tuning_job_hyperparameters_n_epochs.rb +106 -0
- data/lib/openapi_openai/models/{create_edit_request_model.rb → fine_tuning_job_integrations_inner.rb} +3 -4
- data/lib/openapi_openai/models/function_object.rb +244 -0
- data/lib/openapi_openai/models/image.rb +236 -0
- data/lib/openapi_openai/models/images_response.rb +2 -2
- data/lib/openapi_openai/models/list_assistant_files_response.rb +287 -0
- data/lib/openapi_openai/models/list_assistants_response.rb +287 -0
- data/lib/openapi_openai/models/list_files_response.rb +54 -20
- data/lib/openapi_openai/models/list_fine_tuning_job_checkpoints_response.rb +309 -0
- data/lib/openapi_openai/models/{create_edit_response.rb → list_fine_tuning_job_events_response.rb} +57 -55
- data/lib/openapi_openai/models/list_message_files_response.rb +287 -0
- data/lib/openapi_openai/models/list_messages_response.rb +287 -0
- data/lib/openapi_openai/models/list_models_response.rb +35 -1
- data/lib/openapi_openai/models/list_paginated_fine_tuning_jobs_response.rb +289 -0
- data/lib/openapi_openai/models/list_run_steps_response.rb +287 -0
- data/lib/openapi_openai/models/list_runs_response.rb +287 -0
- data/lib/openapi_openai/models/list_threads_response.rb +287 -0
- data/lib/openapi_openai/models/message_content_image_file_object.rb +273 -0
- data/lib/openapi_openai/models/message_content_image_file_object_image_file.rb +222 -0
- data/lib/openapi_openai/models/message_content_text_annotations_file_citation_object.rb +360 -0
- data/lib/openapi_openai/models/message_content_text_annotations_file_citation_object_file_citation.rb +239 -0
- data/lib/openapi_openai/models/message_content_text_annotations_file_path_object.rb +360 -0
- data/lib/openapi_openai/models/message_content_text_annotations_file_path_object_file_path.rb +222 -0
- data/lib/openapi_openai/models/message_content_text_object.rb +273 -0
- data/lib/openapi_openai/models/message_content_text_object_text.rb +240 -0
- data/lib/openapi_openai/models/message_content_text_object_text_annotations_inner.rb +105 -0
- data/lib/openapi_openai/models/message_delta_content_image_file_object.rb +283 -0
- data/lib/openapi_openai/models/message_delta_content_image_file_object_image_file.rb +215 -0
- data/lib/openapi_openai/models/message_delta_content_text_annotations_file_citation_object.rb +349 -0
- data/lib/openapi_openai/models/message_delta_content_text_annotations_file_citation_object_file_citation.rb +225 -0
- data/lib/openapi_openai/models/message_delta_content_text_annotations_file_path_object.rb +349 -0
- data/lib/openapi_openai/models/message_delta_content_text_annotations_file_path_object_file_path.rb +215 -0
- data/lib/openapi_openai/models/{create_edit_response_choices_inner.rb → message_delta_content_text_object.rb} +42 -35
- data/lib/openapi_openai/models/message_delta_content_text_object_text.rb +226 -0
- data/lib/openapi_openai/models/message_delta_content_text_object_text_annotations_inner.rb +105 -0
- data/lib/openapi_openai/models/message_delta_object.rb +290 -0
- data/lib/openapi_openai/models/message_delta_object_delta.rb +293 -0
- data/lib/openapi_openai/models/message_delta_object_delta_content_inner.rb +105 -0
- data/lib/openapi_openai/models/message_file_object.rb +308 -0
- data/lib/openapi_openai/models/message_object.rb +500 -0
- data/lib/openapi_openai/models/message_object_content_inner.rb +105 -0
- data/lib/openapi_openai/models/message_object_incomplete_details.rb +257 -0
- data/lib/openapi_openai/models/message_stream_event.rb +108 -0
- data/lib/openapi_openai/models/message_stream_event_one_of.rb +272 -0
- data/lib/openapi_openai/models/message_stream_event_one_of1.rb +272 -0
- data/lib/openapi_openai/models/message_stream_event_one_of2.rb +272 -0
- data/lib/openapi_openai/models/message_stream_event_one_of3.rb +272 -0
- data/lib/openapi_openai/models/message_stream_event_one_of4.rb +272 -0
- data/lib/openapi_openai/models/model.rb +57 -18
- data/lib/openapi_openai/models/modify_assistant_request.rb +365 -0
- data/lib/openapi_openai/models/modify_message_request.rb +216 -0
- data/lib/openapi_openai/models/modify_run_request.rb +216 -0
- data/lib/openapi_openai/models/modify_thread_request.rb +216 -0
- data/lib/openapi_openai/models/open_ai_file.rb +93 -20
- data/lib/openapi_openai/models/run_completion_usage.rb +257 -0
- data/lib/openapi_openai/models/run_object.rb +686 -0
- data/lib/openapi_openai/models/run_object_incomplete_details.rb +250 -0
- data/lib/openapi_openai/models/run_object_last_error.rb +274 -0
- data/lib/openapi_openai/models/run_object_required_action.rb +273 -0
- data/lib/openapi_openai/models/run_object_required_action_submit_tool_outputs.rb +225 -0
- data/lib/openapi_openai/models/run_step_completion_usage.rb +257 -0
- data/lib/openapi_openai/models/run_step_delta_object.rb +290 -0
- data/lib/openapi_openai/models/{images_response_data_inner.rb → run_step_delta_object_delta.rb} +12 -20
- data/lib/openapi_openai/models/run_step_delta_object_delta_step_details.rb +106 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_message_creation_object.rb +266 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_message_creation_object_message_creation.rb +215 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_code_object.rb +293 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_code_object_code_interpreter.rb +228 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_code_object_code_interpreter_outputs_inner.rb +105 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_code_output_image_object.rb +282 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_code_output_image_object_image.rb +215 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_code_output_logs_object.rb +284 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_function_object.rb +292 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_function_object_function.rb +237 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_object.rb +269 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_object_tool_calls_inner.rb +106 -0
- data/lib/openapi_openai/models/run_step_delta_step_details_tool_calls_retrieval_object.rb +293 -0
- data/lib/openapi_openai/models/run_step_details_message_creation_object.rb +273 -0
- data/lib/openapi_openai/models/run_step_details_message_creation_object_message_creation.rb +222 -0
- data/lib/openapi_openai/models/run_step_details_tool_calls_code_object.rb +290 -0
- data/lib/openapi_openai/models/run_step_details_tool_calls_code_object_code_interpreter.rb +242 -0
- data/lib/openapi_openai/models/run_step_details_tool_calls_code_object_code_interpreter_outputs_inner.rb +105 -0
- data/lib/openapi_openai/models/run_step_details_tool_calls_code_output_image_object.rb +272 -0
- data/lib/openapi_openai/models/run_step_details_tool_calls_code_output_image_object_image.rb +222 -0
- data/lib/openapi_openai/models/run_step_details_tool_calls_code_output_logs_object.rb +274 -0
- data/lib/openapi_openai/models/run_step_details_tool_calls_function_object.rb +289 -0
- data/lib/openapi_openai/models/run_step_details_tool_calls_function_object_function.rb +253 -0
- data/lib/openapi_openai/models/run_step_details_tool_calls_object.rb +276 -0
- data/lib/openapi_openai/models/run_step_details_tool_calls_object_tool_calls_inner.rb +106 -0
- data/lib/openapi_openai/models/run_step_details_tool_calls_retrieval_object.rb +290 -0
- data/lib/openapi_openai/models/run_step_object.rb +505 -0
- data/lib/openapi_openai/models/run_step_object_last_error.rb +274 -0
- data/lib/openapi_openai/models/run_step_object_step_details.rb +106 -0
- data/lib/openapi_openai/models/run_step_stream_event.rb +110 -0
- data/lib/openapi_openai/models/run_step_stream_event_one_of.rb +272 -0
- data/lib/openapi_openai/models/run_step_stream_event_one_of1.rb +272 -0
- data/lib/openapi_openai/models/run_step_stream_event_one_of2.rb +272 -0
- data/lib/openapi_openai/models/run_step_stream_event_one_of3.rb +272 -0
- data/lib/openapi_openai/models/run_step_stream_event_one_of4.rb +272 -0
- data/lib/openapi_openai/models/run_step_stream_event_one_of5.rb +272 -0
- data/lib/openapi_openai/models/run_step_stream_event_one_of6.rb +272 -0
- data/lib/openapi_openai/models/run_stream_event.rb +112 -0
- data/lib/openapi_openai/models/run_stream_event_one_of.rb +272 -0
- data/lib/openapi_openai/models/run_stream_event_one_of1.rb +272 -0
- data/lib/openapi_openai/models/run_stream_event_one_of2.rb +272 -0
- data/lib/openapi_openai/models/run_stream_event_one_of3.rb +272 -0
- data/lib/openapi_openai/models/run_stream_event_one_of4.rb +272 -0
- data/lib/openapi_openai/models/run_stream_event_one_of5.rb +272 -0
- data/lib/openapi_openai/models/run_stream_event_one_of6.rb +272 -0
- data/lib/openapi_openai/models/run_stream_event_one_of7.rb +272 -0
- data/lib/openapi_openai/models/run_stream_event_one_of8.rb +272 -0
- data/lib/openapi_openai/models/run_tool_call_object.rb +290 -0
- data/lib/openapi_openai/models/run_tool_call_object_function.rb +240 -0
- data/lib/openapi_openai/models/submit_tool_outputs_run_request.rb +235 -0
- data/lib/openapi_openai/models/submit_tool_outputs_run_request_tool_outputs_inner.rb +225 -0
- data/lib/openapi_openai/models/thread_object.rb +304 -0
- data/lib/openapi_openai/models/thread_stream_event.rb +104 -0
- data/lib/openapi_openai/models/thread_stream_event_one_of.rb +272 -0
- data/lib/openapi_openai/models/transcription_segment.rb +377 -0
- data/lib/openapi_openai/models/{create_embedding_response_data_inner.rb → transcription_word.rb} +38 -37
- data/lib/openapi_openai/models/truncation_object.rb +275 -0
- data/lib/openapi_openai/version.rb +2 -2
- data/lib/openapi_openai.rb +209 -19
- data/openapi_openai.gemspec +2 -2
- data/spec/api/assistants_api_spec.rb +389 -0
- data/spec/api/audio_api_spec.rb +78 -0
- data/spec/api/chat_api_spec.rb +46 -0
- data/spec/api/completions_api_spec.rb +46 -0
- data/spec/api/embeddings_api_spec.rb +46 -0
- data/spec/api/files_api_spec.rb +91 -0
- data/spec/api/fine_tuning_api_spec.rb +106 -0
- data/spec/api/images_api_spec.rb +80 -0
- data/spec/api/models_api_spec.rb +67 -0
- data/spec/api/moderations_api_spec.rb +46 -0
- data/spec/models/assistant_file_object_spec.rb +58 -0
- data/spec/models/assistant_object_spec.rb +94 -0
- data/spec/models/assistant_object_tools_inner_spec.rb +32 -0
- data/spec/models/assistant_stream_event_spec.rb +32 -0
- data/spec/models/assistant_tools_code_spec.rb +40 -0
- data/spec/models/assistant_tools_function_spec.rb +46 -0
- data/spec/models/assistant_tools_retrieval_spec.rb +40 -0
- data/spec/models/assistants_api_named_tool_choice_spec.rb +46 -0
- data/spec/models/assistants_api_response_format_option_spec.rb +32 -0
- data/spec/models/assistants_api_response_format_spec.rb +40 -0
- data/spec/models/assistants_api_tool_choice_option_spec.rb +32 -0
- data/spec/models/chat_completion_function_call_option_spec.rb +36 -0
- data/spec/models/chat_completion_functions_spec.rb +3 -3
- data/spec/models/chat_completion_message_tool_call_chunk_function_spec.rb +42 -0
- data/spec/models/{create_edit_response_choices_inner_spec.rb → chat_completion_message_tool_call_chunk_spec.rb} +15 -15
- data/spec/models/{chat_completion_request_message_function_call_spec.rb → chat_completion_message_tool_call_function_spec.rb} +7 -7
- data/spec/models/chat_completion_message_tool_call_spec.rb +52 -0
- data/spec/models/chat_completion_named_tool_choice_function_spec.rb +36 -0
- data/spec/models/chat_completion_named_tool_choice_spec.rb +46 -0
- data/spec/models/chat_completion_request_assistant_message_function_call_spec.rb +42 -0
- data/spec/models/chat_completion_request_assistant_message_spec.rb +64 -0
- data/spec/models/chat_completion_request_function_message_spec.rb +52 -0
- data/spec/models/chat_completion_request_message_content_part_image_image_url_spec.rb +46 -0
- data/spec/models/chat_completion_request_message_content_part_image_spec.rb +46 -0
- data/spec/models/chat_completion_request_message_content_part_spec.rb +32 -0
- data/spec/models/chat_completion_request_message_content_part_text_spec.rb +46 -0
- data/spec/models/chat_completion_request_message_spec.rb +6 -32
- data/spec/models/chat_completion_request_system_message_spec.rb +52 -0
- data/spec/models/chat_completion_request_tool_message_spec.rb +52 -0
- data/spec/models/chat_completion_request_user_message_content_spec.rb +32 -0
- data/spec/models/chat_completion_request_user_message_spec.rb +52 -0
- data/spec/models/chat_completion_response_message_spec.rb +13 -7
- data/spec/models/chat_completion_role_spec.rb +30 -0
- data/spec/models/chat_completion_stream_response_delta_function_call_spec.rb +42 -0
- data/spec/models/chat_completion_stream_response_delta_spec.rb +14 -8
- data/spec/models/{create_edit_response_spec.rb → chat_completion_token_logprob_spec.rb} +11 -11
- data/spec/models/chat_completion_token_logprob_top_logprobs_inner_spec.rb +48 -0
- data/spec/models/chat_completion_tool_choice_option_spec.rb +32 -0
- data/spec/models/chat_completion_tool_spec.rb +46 -0
- data/spec/models/{create_completion_response_usage_spec.rb → completion_usage_spec.rb} +9 -9
- data/spec/models/create_assistant_file_request_spec.rb +36 -0
- data/spec/models/create_assistant_request_model_spec.rb +21 -0
- data/spec/models/{create_edit_request_spec.rb → create_assistant_request_spec.rb} +18 -12
- data/spec/models/create_chat_completion_function_response_choices_inner_spec.rb +52 -0
- data/spec/models/create_chat_completion_function_response_spec.rb +76 -0
- data/spec/models/create_chat_completion_request_function_call_spec.rb +1 -1
- data/spec/models/create_chat_completion_request_model_spec.rb +1 -12
- data/spec/models/{create_chat_completion_request_function_call_one_of_spec.rb → create_chat_completion_request_response_format_spec.rb} +12 -8
- data/spec/models/create_chat_completion_request_spec.rb +47 -11
- data/spec/models/create_chat_completion_request_stop_spec.rb +1 -1
- data/spec/models/create_chat_completion_response_choices_inner_logprobs_spec.rb +36 -0
- data/spec/models/create_chat_completion_response_choices_inner_spec.rb +12 -6
- data/spec/models/create_chat_completion_response_spec.rb +13 -3
- data/spec/models/create_chat_completion_stream_response_choices_inner_spec.rb +10 -4
- data/spec/models/create_chat_completion_stream_response_spec.rb +13 -3
- data/spec/models/create_completion_request_model_spec.rb +1 -12
- data/spec/models/create_completion_request_prompt_spec.rb +1 -1
- data/spec/models/create_completion_request_spec.rb +19 -13
- data/spec/models/create_completion_request_stop_spec.rb +1 -1
- data/spec/models/create_completion_response_choices_inner_logprobs_spec.rb +4 -4
- data/spec/models/create_completion_response_choices_inner_spec.rb +7 -7
- data/spec/models/create_completion_response_spec.rb +13 -3
- data/spec/models/create_embedding_request_input_spec.rb +1 -1
- data/spec/models/create_embedding_request_model_spec.rb +1 -12
- data/spec/models/create_embedding_request_spec.rb +18 -2
- data/spec/models/create_embedding_response_spec.rb +7 -3
- data/spec/models/create_embedding_response_usage_spec.rb +1 -1
- data/spec/models/create_fine_tuning_job_request_hyperparameters_batch_size_spec.rb +32 -0
- data/spec/models/create_fine_tuning_job_request_hyperparameters_learning_rate_multiplier_spec.rb +32 -0
- data/spec/models/create_fine_tuning_job_request_hyperparameters_n_epochs_spec.rb +32 -0
- data/spec/models/create_fine_tuning_job_request_hyperparameters_spec.rb +48 -0
- data/spec/models/create_fine_tuning_job_request_integrations_inner_spec.rb +42 -0
- data/spec/models/create_fine_tuning_job_request_integrations_inner_type_spec.rb +32 -0
- data/spec/models/create_fine_tuning_job_request_integrations_inner_wandb_spec.rb +54 -0
- data/spec/models/create_fine_tuning_job_request_model_spec.rb +21 -0
- data/spec/models/create_fine_tuning_job_request_spec.rb +72 -0
- data/spec/models/create_image_edit_request_model_spec.rb +21 -0
- data/spec/models/create_image_request_model_spec.rb +21 -0
- data/spec/models/create_image_request_spec.rb +30 -4
- data/spec/models/create_message_request_spec.rb +58 -0
- data/spec/models/create_moderation_request_input_spec.rb +1 -1
- data/spec/models/create_moderation_request_model_spec.rb +1 -12
- data/spec/models/create_moderation_request_spec.rb +1 -1
- data/spec/models/create_moderation_response_results_inner_categories_spec.rb +25 -1
- data/spec/models/create_moderation_response_results_inner_category_scores_spec.rb +25 -1
- data/spec/models/create_moderation_response_results_inner_spec.rb +1 -1
- data/spec/models/create_moderation_response_spec.rb +1 -1
- data/spec/models/create_run_request_model_spec.rb +21 -0
- data/spec/models/{create_fine_tune_request_spec.rb → create_run_request_spec.rb} +31 -19
- data/spec/models/create_speech_request_model_spec.rb +21 -0
- data/spec/models/create_speech_request_spec.rb +68 -0
- data/spec/models/{fine_tune_spec.rb → create_thread_and_run_request_spec.rb} +20 -20
- data/spec/models/create_thread_and_run_request_tools_inner_spec.rb +32 -0
- data/spec/models/{list_fine_tune_events_response_spec.rb → create_thread_request_spec.rb} +9 -9
- data/spec/models/create_transcription200_response_spec.rb +32 -0
- data/spec/models/create_transcription_request_model_spec.rb +1 -12
- data/spec/models/{create_transcription_response_spec.rb → create_transcription_response_json_spec.rb} +7 -7
- data/spec/models/create_transcription_response_verbose_json_spec.rb +60 -0
- data/spec/models/create_translation200_response_spec.rb +32 -0
- data/spec/models/{create_translation_response_spec.rb → create_translation_response_json_spec.rb} +7 -7
- data/spec/models/create_translation_response_verbose_json_spec.rb +54 -0
- data/spec/models/delete_assistant_file_response_spec.rb +52 -0
- data/spec/models/delete_assistant_response_spec.rb +52 -0
- data/spec/models/delete_file_response_spec.rb +5 -1
- data/spec/models/delete_message_response_spec.rb +52 -0
- data/spec/models/delete_model_response_spec.rb +3 -3
- data/spec/models/delete_thread_response_spec.rb +52 -0
- data/spec/models/done_event_spec.rb +50 -0
- data/spec/models/{create_embedding_response_data_inner_spec.rb → embedding_spec.rb} +13 -9
- data/spec/models/error_event_spec.rb +46 -0
- data/spec/models/error_response_spec.rb +1 -1
- data/spec/models/error_spec.rb +3 -3
- data/spec/models/fine_tuning_integration_spec.rb +46 -0
- data/spec/models/fine_tuning_job_checkpoint_metrics_spec.rb +72 -0
- data/spec/models/fine_tuning_job_checkpoint_spec.rb +76 -0
- data/spec/models/{fine_tune_event_spec.rb → fine_tuning_job_error_spec.rb} +10 -16
- data/spec/models/fine_tuning_job_event_spec.rb +68 -0
- data/spec/models/fine_tuning_job_hyperparameters_n_epochs_spec.rb +32 -0
- data/spec/models/fine_tuning_job_hyperparameters_spec.rb +36 -0
- data/spec/models/fine_tuning_job_integrations_inner_spec.rb +32 -0
- data/spec/models/fine_tuning_job_spec.rb +134 -0
- data/spec/models/function_object_spec.rb +48 -0
- data/spec/models/{images_response_data_inner_spec.rb → image_spec.rb} +14 -8
- data/spec/models/images_response_spec.rb +1 -1
- data/spec/models/list_assistant_files_response_spec.rb +60 -0
- data/spec/models/list_assistants_response_spec.rb +60 -0
- data/spec/models/list_files_response_spec.rb +7 -3
- data/spec/models/list_fine_tuning_job_checkpoints_response_spec.rb +64 -0
- data/spec/models/{list_fine_tunes_response_spec.rb → list_fine_tuning_job_events_response_spec.rb} +13 -9
- data/spec/models/list_message_files_response_spec.rb +60 -0
- data/spec/models/list_messages_response_spec.rb +60 -0
- data/spec/models/list_models_response_spec.rb +5 -1
- data/spec/models/list_paginated_fine_tuning_jobs_response_spec.rb +52 -0
- data/spec/models/list_run_steps_response_spec.rb +60 -0
- data/spec/models/list_runs_response_spec.rb +60 -0
- data/spec/models/list_threads_response_spec.rb +60 -0
- data/spec/models/message_content_image_file_object_image_file_spec.rb +36 -0
- data/spec/models/message_content_image_file_object_spec.rb +46 -0
- data/spec/models/message_content_text_annotations_file_citation_object_file_citation_spec.rb +42 -0
- data/spec/models/message_content_text_annotations_file_citation_object_spec.rb +64 -0
- data/spec/models/message_content_text_annotations_file_path_object_file_path_spec.rb +36 -0
- data/spec/models/message_content_text_annotations_file_path_object_spec.rb +64 -0
- data/spec/models/message_content_text_object_spec.rb +46 -0
- data/spec/models/message_content_text_object_text_annotations_inner_spec.rb +32 -0
- data/spec/models/message_content_text_object_text_spec.rb +42 -0
- data/spec/models/message_delta_content_image_file_object_image_file_spec.rb +36 -0
- data/spec/models/message_delta_content_image_file_object_spec.rb +52 -0
- data/spec/models/message_delta_content_text_annotations_file_citation_object_file_citation_spec.rb +42 -0
- data/spec/models/message_delta_content_text_annotations_file_citation_object_spec.rb +70 -0
- data/spec/models/message_delta_content_text_annotations_file_path_object_file_path_spec.rb +36 -0
- data/spec/models/message_delta_content_text_annotations_file_path_object_spec.rb +70 -0
- data/spec/models/message_delta_content_text_object_spec.rb +52 -0
- data/spec/models/message_delta_content_text_object_text_annotations_inner_spec.rb +32 -0
- data/spec/models/message_delta_content_text_object_text_spec.rb +42 -0
- data/spec/models/message_delta_object_delta_content_inner_spec.rb +32 -0
- data/spec/models/message_delta_object_delta_spec.rb +52 -0
- data/spec/models/message_delta_object_spec.rb +52 -0
- data/spec/models/message_file_object_spec.rb +58 -0
- data/spec/models/message_object_content_inner_spec.rb +32 -0
- data/spec/models/message_object_incomplete_details_spec.rb +40 -0
- data/spec/models/message_object_spec.rb +126 -0
- data/spec/models/message_stream_event_one_of1_spec.rb +46 -0
- data/spec/models/message_stream_event_one_of2_spec.rb +46 -0
- data/spec/models/message_stream_event_one_of3_spec.rb +46 -0
- data/spec/models/message_stream_event_one_of4_spec.rb +46 -0
- data/spec/models/message_stream_event_one_of_spec.rb +46 -0
- data/spec/models/message_stream_event_spec.rb +32 -0
- data/spec/models/model_spec.rb +7 -3
- data/spec/models/modify_assistant_request_spec.rb +72 -0
- data/spec/models/modify_message_request_spec.rb +36 -0
- data/spec/models/modify_run_request_spec.rb +36 -0
- data/spec/models/modify_thread_request_spec.rb +36 -0
- data/spec/models/open_ai_file_spec.rb +17 -5
- data/spec/models/run_completion_usage_spec.rb +48 -0
- data/spec/models/run_object_incomplete_details_spec.rb +40 -0
- data/spec/models/run_object_last_error_spec.rb +46 -0
- data/spec/models/run_object_required_action_spec.rb +46 -0
- data/spec/models/run_object_required_action_submit_tool_outputs_spec.rb +36 -0
- data/spec/models/run_object_spec.rb +194 -0
- data/spec/models/run_step_completion_usage_spec.rb +48 -0
- data/spec/models/run_step_delta_object_delta_spec.rb +36 -0
- data/spec/models/run_step_delta_object_delta_step_details_spec.rb +32 -0
- data/spec/models/run_step_delta_object_spec.rb +52 -0
- data/spec/models/run_step_delta_step_details_message_creation_object_message_creation_spec.rb +36 -0
- data/spec/models/run_step_delta_step_details_message_creation_object_spec.rb +46 -0
- data/spec/models/run_step_delta_step_details_tool_calls_code_object_code_interpreter_outputs_inner_spec.rb +32 -0
- data/spec/models/run_step_delta_step_details_tool_calls_code_object_code_interpreter_spec.rb +42 -0
- data/spec/models/run_step_delta_step_details_tool_calls_code_object_spec.rb +58 -0
- data/spec/models/run_step_delta_step_details_tool_calls_code_output_image_object_image_spec.rb +36 -0
- data/spec/models/run_step_delta_step_details_tool_calls_code_output_image_object_spec.rb +52 -0
- data/spec/models/run_step_delta_step_details_tool_calls_code_output_logs_object_spec.rb +52 -0
- data/spec/models/run_step_delta_step_details_tool_calls_function_object_function_spec.rb +48 -0
- data/spec/models/run_step_delta_step_details_tool_calls_function_object_spec.rb +58 -0
- data/spec/models/run_step_delta_step_details_tool_calls_object_spec.rb +46 -0
- data/spec/models/run_step_delta_step_details_tool_calls_object_tool_calls_inner_spec.rb +32 -0
- data/spec/models/run_step_delta_step_details_tool_calls_retrieval_object_spec.rb +58 -0
- data/spec/models/run_step_details_message_creation_object_message_creation_spec.rb +36 -0
- data/spec/models/run_step_details_message_creation_object_spec.rb +46 -0
- data/spec/models/run_step_details_tool_calls_code_object_code_interpreter_outputs_inner_spec.rb +32 -0
- data/spec/models/run_step_details_tool_calls_code_object_code_interpreter_spec.rb +42 -0
- data/spec/models/run_step_details_tool_calls_code_object_spec.rb +52 -0
- data/spec/models/run_step_details_tool_calls_code_output_image_object_image_spec.rb +36 -0
- data/spec/models/run_step_details_tool_calls_code_output_image_object_spec.rb +46 -0
- data/spec/models/run_step_details_tool_calls_code_output_logs_object_spec.rb +46 -0
- data/spec/models/run_step_details_tool_calls_function_object_function_spec.rb +48 -0
- data/spec/models/run_step_details_tool_calls_function_object_spec.rb +52 -0
- data/spec/models/run_step_details_tool_calls_object_spec.rb +46 -0
- data/spec/models/run_step_details_tool_calls_object_tool_calls_inner_spec.rb +32 -0
- data/spec/models/run_step_details_tool_calls_retrieval_object_spec.rb +52 -0
- data/spec/models/run_step_object_last_error_spec.rb +46 -0
- data/spec/models/run_step_object_spec.rb +138 -0
- data/spec/models/run_step_object_step_details_spec.rb +32 -0
- data/spec/models/run_step_stream_event_one_of1_spec.rb +46 -0
- data/spec/models/run_step_stream_event_one_of2_spec.rb +46 -0
- data/spec/models/run_step_stream_event_one_of3_spec.rb +46 -0
- data/spec/models/run_step_stream_event_one_of4_spec.rb +46 -0
- data/spec/models/run_step_stream_event_one_of5_spec.rb +46 -0
- data/spec/models/run_step_stream_event_one_of6_spec.rb +46 -0
- data/spec/models/run_step_stream_event_one_of_spec.rb +46 -0
- data/spec/models/run_step_stream_event_spec.rb +32 -0
- data/spec/models/run_stream_event_one_of1_spec.rb +46 -0
- data/spec/models/run_stream_event_one_of2_spec.rb +46 -0
- data/spec/models/run_stream_event_one_of3_spec.rb +46 -0
- data/spec/models/run_stream_event_one_of4_spec.rb +46 -0
- data/spec/models/run_stream_event_one_of5_spec.rb +46 -0
- data/spec/models/run_stream_event_one_of6_spec.rb +46 -0
- data/spec/models/run_stream_event_one_of7_spec.rb +46 -0
- data/spec/models/run_stream_event_one_of8_spec.rb +46 -0
- data/spec/models/run_stream_event_one_of_spec.rb +46 -0
- data/spec/models/{create_fine_tune_request_model_spec.rb → run_stream_event_spec.rb} +3 -3
- data/spec/models/run_tool_call_object_function_spec.rb +42 -0
- data/spec/models/run_tool_call_object_spec.rb +52 -0
- data/spec/models/submit_tool_outputs_run_request_spec.rb +42 -0
- data/spec/models/submit_tool_outputs_run_request_tool_outputs_inner_spec.rb +42 -0
- data/spec/models/thread_object_spec.rb +58 -0
- data/spec/models/thread_stream_event_one_of_spec.rb +46 -0
- data/spec/models/{create_edit_request_model_spec.rb → thread_stream_event_spec.rb} +3 -3
- data/spec/models/transcription_segment_spec.rb +90 -0
- data/spec/models/transcription_word_spec.rb +48 -0
- data/spec/models/truncation_object_spec.rb +46 -0
- data/spec/spec_helper.rb +1 -1
- metadata +867 -106
- data/docs/CreateCompletionResponseUsage.md +0 -22
- data/docs/CreateEditRequest.md +0 -28
- data/docs/CreateEditResponse.md +0 -24
- data/docs/CreateEditResponseChoicesInner.md +0 -24
- data/docs/CreateEmbeddingResponseDataInner.md +0 -22
- data/docs/CreateFineTuneRequest.md +0 -40
- data/docs/CreateTranslationResponse.md +0 -18
- data/docs/FineTune.md +0 -42
- data/docs/ImagesResponseDataInner.md +0 -20
- data/docs/ListFineTuneEventsResponse.md +0 -20
- data/docs/ListFineTunesResponse.md +0 -20
- data/docs/OpenAIApi.md +0 -1499
- data/lib/openapi_openai/api/open_ai_api.rb +0 -1583
- data/spec/api/open_ai_api_spec.rb +0 -306
@@ -0,0 +1,2017 @@
|
|
1
|
+
# OpenApiOpenAIClient::AssistantsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.openai.com/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**cancel_run**](AssistantsApi.md#cancel_run) | **POST** /threads/{thread_id}/runs/{run_id}/cancel | Cancels a run that is `in_progress`. |
|
8
|
+
| [**create_assistant**](AssistantsApi.md#create_assistant) | **POST** /assistants | Create an assistant with a model and instructions. |
|
9
|
+
| [**create_assistant_file**](AssistantsApi.md#create_assistant_file) | **POST** /assistants/{assistant_id}/files | Create an assistant file by attaching a [File](/docs/api-reference/files) to an [assistant](/docs/api-reference/assistants). |
|
10
|
+
| [**create_message**](AssistantsApi.md#create_message) | **POST** /threads/{thread_id}/messages | Create a message. |
|
11
|
+
| [**create_run**](AssistantsApi.md#create_run) | **POST** /threads/{thread_id}/runs | Create a run. |
|
12
|
+
| [**create_thread**](AssistantsApi.md#create_thread) | **POST** /threads | Create a thread. |
|
13
|
+
| [**create_thread_and_run**](AssistantsApi.md#create_thread_and_run) | **POST** /threads/runs | Create a thread and run it in one request. |
|
14
|
+
| [**delete_assistant**](AssistantsApi.md#delete_assistant) | **DELETE** /assistants/{assistant_id} | Delete an assistant. |
|
15
|
+
| [**delete_assistant_file**](AssistantsApi.md#delete_assistant_file) | **DELETE** /assistants/{assistant_id}/files/{file_id} | Delete an assistant file. |
|
16
|
+
| [**delete_thread**](AssistantsApi.md#delete_thread) | **DELETE** /threads/{thread_id} | Delete a thread. |
|
17
|
+
| [**get_assistant**](AssistantsApi.md#get_assistant) | **GET** /assistants/{assistant_id} | Retrieves an assistant. |
|
18
|
+
| [**get_assistant_file**](AssistantsApi.md#get_assistant_file) | **GET** /assistants/{assistant_id}/files/{file_id} | Retrieves an AssistantFile. |
|
19
|
+
| [**get_message**](AssistantsApi.md#get_message) | **GET** /threads/{thread_id}/messages/{message_id} | Retrieve a message. |
|
20
|
+
| [**get_message_file**](AssistantsApi.md#get_message_file) | **GET** /threads/{thread_id}/messages/{message_id}/files/{file_id} | Retrieves a message file. |
|
21
|
+
| [**get_run**](AssistantsApi.md#get_run) | **GET** /threads/{thread_id}/runs/{run_id} | Retrieves a run. |
|
22
|
+
| [**get_run_step**](AssistantsApi.md#get_run_step) | **GET** /threads/{thread_id}/runs/{run_id}/steps/{step_id} | Retrieves a run step. |
|
23
|
+
| [**get_thread**](AssistantsApi.md#get_thread) | **GET** /threads/{thread_id} | Retrieves a thread. |
|
24
|
+
| [**list_assistant_files**](AssistantsApi.md#list_assistant_files) | **GET** /assistants/{assistant_id}/files | Returns a list of assistant files. |
|
25
|
+
| [**list_assistants**](AssistantsApi.md#list_assistants) | **GET** /assistants | Returns a list of assistants. |
|
26
|
+
| [**list_message_files**](AssistantsApi.md#list_message_files) | **GET** /threads/{thread_id}/messages/{message_id}/files | Returns a list of message files. |
|
27
|
+
| [**list_messages**](AssistantsApi.md#list_messages) | **GET** /threads/{thread_id}/messages | Returns a list of messages for a given thread. |
|
28
|
+
| [**list_run_steps**](AssistantsApi.md#list_run_steps) | **GET** /threads/{thread_id}/runs/{run_id}/steps | Returns a list of run steps belonging to a run. |
|
29
|
+
| [**list_runs**](AssistantsApi.md#list_runs) | **GET** /threads/{thread_id}/runs | Returns a list of runs belonging to a thread. |
|
30
|
+
| [**modify_assistant**](AssistantsApi.md#modify_assistant) | **POST** /assistants/{assistant_id} | Modifies an assistant. |
|
31
|
+
| [**modify_message**](AssistantsApi.md#modify_message) | **POST** /threads/{thread_id}/messages/{message_id} | Modifies a message. |
|
32
|
+
| [**modify_run**](AssistantsApi.md#modify_run) | **POST** /threads/{thread_id}/runs/{run_id} | Modifies a run. |
|
33
|
+
| [**modify_thread**](AssistantsApi.md#modify_thread) | **POST** /threads/{thread_id} | Modifies a thread. |
|
34
|
+
| [**submit_tool_ouputs_to_run**](AssistantsApi.md#submit_tool_ouputs_to_run) | **POST** /threads/{thread_id}/runs/{run_id}/submit_tool_outputs | 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. |
|
35
|
+
|
36
|
+
|
37
|
+
## cancel_run
|
38
|
+
|
39
|
+
> <RunObject> cancel_run(thread_id, run_id)
|
40
|
+
|
41
|
+
Cancels a run that is `in_progress`.
|
42
|
+
|
43
|
+
### Examples
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
require 'time'
|
47
|
+
require 'openapi_openai'
|
48
|
+
# setup authorization
|
49
|
+
OpenApiOpenAIClient.configure do |config|
|
50
|
+
# Configure Bearer authorization: ApiKeyAuth
|
51
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
52
|
+
end
|
53
|
+
|
54
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
55
|
+
thread_id = 'thread_id_example' # String | The ID of the thread to which this run belongs.
|
56
|
+
run_id = 'run_id_example' # String | The ID of the run to cancel.
|
57
|
+
|
58
|
+
begin
|
59
|
+
# Cancels a run that is `in_progress`.
|
60
|
+
result = api_instance.cancel_run(thread_id, run_id)
|
61
|
+
p result
|
62
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
63
|
+
puts "Error when calling AssistantsApi->cancel_run: #{e}"
|
64
|
+
end
|
65
|
+
```
|
66
|
+
|
67
|
+
#### Using the cancel_run_with_http_info variant
|
68
|
+
|
69
|
+
This returns an Array which contains the response data, status code and headers.
|
70
|
+
|
71
|
+
> <Array(<RunObject>, Integer, Hash)> cancel_run_with_http_info(thread_id, run_id)
|
72
|
+
|
73
|
+
```ruby
|
74
|
+
begin
|
75
|
+
# Cancels a run that is `in_progress`.
|
76
|
+
data, status_code, headers = api_instance.cancel_run_with_http_info(thread_id, run_id)
|
77
|
+
p status_code # => 2xx
|
78
|
+
p headers # => { ... }
|
79
|
+
p data # => <RunObject>
|
80
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
81
|
+
puts "Error when calling AssistantsApi->cancel_run_with_http_info: #{e}"
|
82
|
+
end
|
83
|
+
```
|
84
|
+
|
85
|
+
### Parameters
|
86
|
+
|
87
|
+
| Name | Type | Description | Notes |
|
88
|
+
| ---- | ---- | ----------- | ----- |
|
89
|
+
| **thread_id** | **String** | The ID of the thread to which this run belongs. | |
|
90
|
+
| **run_id** | **String** | The ID of the run to cancel. | |
|
91
|
+
|
92
|
+
### Return type
|
93
|
+
|
94
|
+
[**RunObject**](RunObject.md)
|
95
|
+
|
96
|
+
### Authorization
|
97
|
+
|
98
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
99
|
+
|
100
|
+
### HTTP request headers
|
101
|
+
|
102
|
+
- **Content-Type**: Not defined
|
103
|
+
- **Accept**: application/json
|
104
|
+
|
105
|
+
|
106
|
+
## create_assistant
|
107
|
+
|
108
|
+
> <AssistantObject> create_assistant(create_assistant_request)
|
109
|
+
|
110
|
+
Create an assistant with a model and instructions.
|
111
|
+
|
112
|
+
### Examples
|
113
|
+
|
114
|
+
```ruby
|
115
|
+
require 'time'
|
116
|
+
require 'openapi_openai'
|
117
|
+
# setup authorization
|
118
|
+
OpenApiOpenAIClient.configure do |config|
|
119
|
+
# Configure Bearer authorization: ApiKeyAuth
|
120
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
121
|
+
end
|
122
|
+
|
123
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
124
|
+
create_assistant_request = OpenApiOpenAIClient::CreateAssistantRequest.new({model: OpenApiOpenAIClient::CreateAssistantRequestModel.new}) # CreateAssistantRequest |
|
125
|
+
|
126
|
+
begin
|
127
|
+
# Create an assistant with a model and instructions.
|
128
|
+
result = api_instance.create_assistant(create_assistant_request)
|
129
|
+
p result
|
130
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
131
|
+
puts "Error when calling AssistantsApi->create_assistant: #{e}"
|
132
|
+
end
|
133
|
+
```
|
134
|
+
|
135
|
+
#### Using the create_assistant_with_http_info variant
|
136
|
+
|
137
|
+
This returns an Array which contains the response data, status code and headers.
|
138
|
+
|
139
|
+
> <Array(<AssistantObject>, Integer, Hash)> create_assistant_with_http_info(create_assistant_request)
|
140
|
+
|
141
|
+
```ruby
|
142
|
+
begin
|
143
|
+
# Create an assistant with a model and instructions.
|
144
|
+
data, status_code, headers = api_instance.create_assistant_with_http_info(create_assistant_request)
|
145
|
+
p status_code # => 2xx
|
146
|
+
p headers # => { ... }
|
147
|
+
p data # => <AssistantObject>
|
148
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
149
|
+
puts "Error when calling AssistantsApi->create_assistant_with_http_info: #{e}"
|
150
|
+
end
|
151
|
+
```
|
152
|
+
|
153
|
+
### Parameters
|
154
|
+
|
155
|
+
| Name | Type | Description | Notes |
|
156
|
+
| ---- | ---- | ----------- | ----- |
|
157
|
+
| **create_assistant_request** | [**CreateAssistantRequest**](CreateAssistantRequest.md) | | |
|
158
|
+
|
159
|
+
### Return type
|
160
|
+
|
161
|
+
[**AssistantObject**](AssistantObject.md)
|
162
|
+
|
163
|
+
### Authorization
|
164
|
+
|
165
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
166
|
+
|
167
|
+
### HTTP request headers
|
168
|
+
|
169
|
+
- **Content-Type**: application/json
|
170
|
+
- **Accept**: application/json
|
171
|
+
|
172
|
+
|
173
|
+
## create_assistant_file
|
174
|
+
|
175
|
+
> <AssistantFileObject> create_assistant_file(assistant_id, create_assistant_file_request)
|
176
|
+
|
177
|
+
Create an assistant file by attaching a [File](/docs/api-reference/files) to an [assistant](/docs/api-reference/assistants).
|
178
|
+
|
179
|
+
### Examples
|
180
|
+
|
181
|
+
```ruby
|
182
|
+
require 'time'
|
183
|
+
require 'openapi_openai'
|
184
|
+
# setup authorization
|
185
|
+
OpenApiOpenAIClient.configure do |config|
|
186
|
+
# Configure Bearer authorization: ApiKeyAuth
|
187
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
188
|
+
end
|
189
|
+
|
190
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
191
|
+
assistant_id = 'file-abc123' # String | The ID of the assistant for which to create a File.
|
192
|
+
create_assistant_file_request = OpenApiOpenAIClient::CreateAssistantFileRequest.new({file_id: 'file_id_example'}) # CreateAssistantFileRequest |
|
193
|
+
|
194
|
+
begin
|
195
|
+
# Create an assistant file by attaching a [File](/docs/api-reference/files) to an [assistant](/docs/api-reference/assistants).
|
196
|
+
result = api_instance.create_assistant_file(assistant_id, create_assistant_file_request)
|
197
|
+
p result
|
198
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
199
|
+
puts "Error when calling AssistantsApi->create_assistant_file: #{e}"
|
200
|
+
end
|
201
|
+
```
|
202
|
+
|
203
|
+
#### Using the create_assistant_file_with_http_info variant
|
204
|
+
|
205
|
+
This returns an Array which contains the response data, status code and headers.
|
206
|
+
|
207
|
+
> <Array(<AssistantFileObject>, Integer, Hash)> create_assistant_file_with_http_info(assistant_id, create_assistant_file_request)
|
208
|
+
|
209
|
+
```ruby
|
210
|
+
begin
|
211
|
+
# Create an assistant file by attaching a [File](/docs/api-reference/files) to an [assistant](/docs/api-reference/assistants).
|
212
|
+
data, status_code, headers = api_instance.create_assistant_file_with_http_info(assistant_id, create_assistant_file_request)
|
213
|
+
p status_code # => 2xx
|
214
|
+
p headers # => { ... }
|
215
|
+
p data # => <AssistantFileObject>
|
216
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
217
|
+
puts "Error when calling AssistantsApi->create_assistant_file_with_http_info: #{e}"
|
218
|
+
end
|
219
|
+
```
|
220
|
+
|
221
|
+
### Parameters
|
222
|
+
|
223
|
+
| Name | Type | Description | Notes |
|
224
|
+
| ---- | ---- | ----------- | ----- |
|
225
|
+
| **assistant_id** | **String** | The ID of the assistant for which to create a File. | |
|
226
|
+
| **create_assistant_file_request** | [**CreateAssistantFileRequest**](CreateAssistantFileRequest.md) | | |
|
227
|
+
|
228
|
+
### Return type
|
229
|
+
|
230
|
+
[**AssistantFileObject**](AssistantFileObject.md)
|
231
|
+
|
232
|
+
### Authorization
|
233
|
+
|
234
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
235
|
+
|
236
|
+
### HTTP request headers
|
237
|
+
|
238
|
+
- **Content-Type**: application/json
|
239
|
+
- **Accept**: application/json
|
240
|
+
|
241
|
+
|
242
|
+
## create_message
|
243
|
+
|
244
|
+
> <MessageObject> create_message(thread_id, create_message_request)
|
245
|
+
|
246
|
+
Create a message.
|
247
|
+
|
248
|
+
### Examples
|
249
|
+
|
250
|
+
```ruby
|
251
|
+
require 'time'
|
252
|
+
require 'openapi_openai'
|
253
|
+
# setup authorization
|
254
|
+
OpenApiOpenAIClient.configure do |config|
|
255
|
+
# Configure Bearer authorization: ApiKeyAuth
|
256
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
257
|
+
end
|
258
|
+
|
259
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
260
|
+
thread_id = 'thread_id_example' # String | The ID of the [thread](/docs/api-reference/threads) to create a message for.
|
261
|
+
create_message_request = OpenApiOpenAIClient::CreateMessageRequest.new({role: 'user', content: 'content_example'}) # CreateMessageRequest |
|
262
|
+
|
263
|
+
begin
|
264
|
+
# Create a message.
|
265
|
+
result = api_instance.create_message(thread_id, create_message_request)
|
266
|
+
p result
|
267
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
268
|
+
puts "Error when calling AssistantsApi->create_message: #{e}"
|
269
|
+
end
|
270
|
+
```
|
271
|
+
|
272
|
+
#### Using the create_message_with_http_info variant
|
273
|
+
|
274
|
+
This returns an Array which contains the response data, status code and headers.
|
275
|
+
|
276
|
+
> <Array(<MessageObject>, Integer, Hash)> create_message_with_http_info(thread_id, create_message_request)
|
277
|
+
|
278
|
+
```ruby
|
279
|
+
begin
|
280
|
+
# Create a message.
|
281
|
+
data, status_code, headers = api_instance.create_message_with_http_info(thread_id, create_message_request)
|
282
|
+
p status_code # => 2xx
|
283
|
+
p headers # => { ... }
|
284
|
+
p data # => <MessageObject>
|
285
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
286
|
+
puts "Error when calling AssistantsApi->create_message_with_http_info: #{e}"
|
287
|
+
end
|
288
|
+
```
|
289
|
+
|
290
|
+
### Parameters
|
291
|
+
|
292
|
+
| Name | Type | Description | Notes |
|
293
|
+
| ---- | ---- | ----------- | ----- |
|
294
|
+
| **thread_id** | **String** | The ID of the [thread](/docs/api-reference/threads) to create a message for. | |
|
295
|
+
| **create_message_request** | [**CreateMessageRequest**](CreateMessageRequest.md) | | |
|
296
|
+
|
297
|
+
### Return type
|
298
|
+
|
299
|
+
[**MessageObject**](MessageObject.md)
|
300
|
+
|
301
|
+
### Authorization
|
302
|
+
|
303
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
304
|
+
|
305
|
+
### HTTP request headers
|
306
|
+
|
307
|
+
- **Content-Type**: application/json
|
308
|
+
- **Accept**: application/json
|
309
|
+
|
310
|
+
|
311
|
+
## create_run
|
312
|
+
|
313
|
+
> <RunObject> create_run(thread_id, create_run_request)
|
314
|
+
|
315
|
+
Create a run.
|
316
|
+
|
317
|
+
### Examples
|
318
|
+
|
319
|
+
```ruby
|
320
|
+
require 'time'
|
321
|
+
require 'openapi_openai'
|
322
|
+
# setup authorization
|
323
|
+
OpenApiOpenAIClient.configure do |config|
|
324
|
+
# Configure Bearer authorization: ApiKeyAuth
|
325
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
326
|
+
end
|
327
|
+
|
328
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
329
|
+
thread_id = 'thread_id_example' # String | The ID of the thread to run.
|
330
|
+
create_run_request = OpenApiOpenAIClient::CreateRunRequest.new({assistant_id: 'assistant_id_example'}) # CreateRunRequest |
|
331
|
+
|
332
|
+
begin
|
333
|
+
# Create a run.
|
334
|
+
result = api_instance.create_run(thread_id, create_run_request)
|
335
|
+
p result
|
336
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
337
|
+
puts "Error when calling AssistantsApi->create_run: #{e}"
|
338
|
+
end
|
339
|
+
```
|
340
|
+
|
341
|
+
#### Using the create_run_with_http_info variant
|
342
|
+
|
343
|
+
This returns an Array which contains the response data, status code and headers.
|
344
|
+
|
345
|
+
> <Array(<RunObject>, Integer, Hash)> create_run_with_http_info(thread_id, create_run_request)
|
346
|
+
|
347
|
+
```ruby
|
348
|
+
begin
|
349
|
+
# Create a run.
|
350
|
+
data, status_code, headers = api_instance.create_run_with_http_info(thread_id, create_run_request)
|
351
|
+
p status_code # => 2xx
|
352
|
+
p headers # => { ... }
|
353
|
+
p data # => <RunObject>
|
354
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
355
|
+
puts "Error when calling AssistantsApi->create_run_with_http_info: #{e}"
|
356
|
+
end
|
357
|
+
```
|
358
|
+
|
359
|
+
### Parameters
|
360
|
+
|
361
|
+
| Name | Type | Description | Notes |
|
362
|
+
| ---- | ---- | ----------- | ----- |
|
363
|
+
| **thread_id** | **String** | The ID of the thread to run. | |
|
364
|
+
| **create_run_request** | [**CreateRunRequest**](CreateRunRequest.md) | | |
|
365
|
+
|
366
|
+
### Return type
|
367
|
+
|
368
|
+
[**RunObject**](RunObject.md)
|
369
|
+
|
370
|
+
### Authorization
|
371
|
+
|
372
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
373
|
+
|
374
|
+
### HTTP request headers
|
375
|
+
|
376
|
+
- **Content-Type**: application/json
|
377
|
+
- **Accept**: application/json
|
378
|
+
|
379
|
+
|
380
|
+
## create_thread
|
381
|
+
|
382
|
+
> <ThreadObject> create_thread(opts)
|
383
|
+
|
384
|
+
Create a thread.
|
385
|
+
|
386
|
+
### Examples
|
387
|
+
|
388
|
+
```ruby
|
389
|
+
require 'time'
|
390
|
+
require 'openapi_openai'
|
391
|
+
# setup authorization
|
392
|
+
OpenApiOpenAIClient.configure do |config|
|
393
|
+
# Configure Bearer authorization: ApiKeyAuth
|
394
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
395
|
+
end
|
396
|
+
|
397
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
398
|
+
opts = {
|
399
|
+
create_thread_request: OpenApiOpenAIClient::CreateThreadRequest.new # CreateThreadRequest |
|
400
|
+
}
|
401
|
+
|
402
|
+
begin
|
403
|
+
# Create a thread.
|
404
|
+
result = api_instance.create_thread(opts)
|
405
|
+
p result
|
406
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
407
|
+
puts "Error when calling AssistantsApi->create_thread: #{e}"
|
408
|
+
end
|
409
|
+
```
|
410
|
+
|
411
|
+
#### Using the create_thread_with_http_info variant
|
412
|
+
|
413
|
+
This returns an Array which contains the response data, status code and headers.
|
414
|
+
|
415
|
+
> <Array(<ThreadObject>, Integer, Hash)> create_thread_with_http_info(opts)
|
416
|
+
|
417
|
+
```ruby
|
418
|
+
begin
|
419
|
+
# Create a thread.
|
420
|
+
data, status_code, headers = api_instance.create_thread_with_http_info(opts)
|
421
|
+
p status_code # => 2xx
|
422
|
+
p headers # => { ... }
|
423
|
+
p data # => <ThreadObject>
|
424
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
425
|
+
puts "Error when calling AssistantsApi->create_thread_with_http_info: #{e}"
|
426
|
+
end
|
427
|
+
```
|
428
|
+
|
429
|
+
### Parameters
|
430
|
+
|
431
|
+
| Name | Type | Description | Notes |
|
432
|
+
| ---- | ---- | ----------- | ----- |
|
433
|
+
| **create_thread_request** | [**CreateThreadRequest**](CreateThreadRequest.md) | | [optional] |
|
434
|
+
|
435
|
+
### Return type
|
436
|
+
|
437
|
+
[**ThreadObject**](ThreadObject.md)
|
438
|
+
|
439
|
+
### Authorization
|
440
|
+
|
441
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
442
|
+
|
443
|
+
### HTTP request headers
|
444
|
+
|
445
|
+
- **Content-Type**: application/json
|
446
|
+
- **Accept**: application/json
|
447
|
+
|
448
|
+
|
449
|
+
## create_thread_and_run
|
450
|
+
|
451
|
+
> <RunObject> create_thread_and_run(create_thread_and_run_request)
|
452
|
+
|
453
|
+
Create a thread and run it in one request.
|
454
|
+
|
455
|
+
### Examples
|
456
|
+
|
457
|
+
```ruby
|
458
|
+
require 'time'
|
459
|
+
require 'openapi_openai'
|
460
|
+
# setup authorization
|
461
|
+
OpenApiOpenAIClient.configure do |config|
|
462
|
+
# Configure Bearer authorization: ApiKeyAuth
|
463
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
464
|
+
end
|
465
|
+
|
466
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
467
|
+
create_thread_and_run_request = OpenApiOpenAIClient::CreateThreadAndRunRequest.new({assistant_id: 'assistant_id_example'}) # CreateThreadAndRunRequest |
|
468
|
+
|
469
|
+
begin
|
470
|
+
# Create a thread and run it in one request.
|
471
|
+
result = api_instance.create_thread_and_run(create_thread_and_run_request)
|
472
|
+
p result
|
473
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
474
|
+
puts "Error when calling AssistantsApi->create_thread_and_run: #{e}"
|
475
|
+
end
|
476
|
+
```
|
477
|
+
|
478
|
+
#### Using the create_thread_and_run_with_http_info variant
|
479
|
+
|
480
|
+
This returns an Array which contains the response data, status code and headers.
|
481
|
+
|
482
|
+
> <Array(<RunObject>, Integer, Hash)> create_thread_and_run_with_http_info(create_thread_and_run_request)
|
483
|
+
|
484
|
+
```ruby
|
485
|
+
begin
|
486
|
+
# Create a thread and run it in one request.
|
487
|
+
data, status_code, headers = api_instance.create_thread_and_run_with_http_info(create_thread_and_run_request)
|
488
|
+
p status_code # => 2xx
|
489
|
+
p headers # => { ... }
|
490
|
+
p data # => <RunObject>
|
491
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
492
|
+
puts "Error when calling AssistantsApi->create_thread_and_run_with_http_info: #{e}"
|
493
|
+
end
|
494
|
+
```
|
495
|
+
|
496
|
+
### Parameters
|
497
|
+
|
498
|
+
| Name | Type | Description | Notes |
|
499
|
+
| ---- | ---- | ----------- | ----- |
|
500
|
+
| **create_thread_and_run_request** | [**CreateThreadAndRunRequest**](CreateThreadAndRunRequest.md) | | |
|
501
|
+
|
502
|
+
### Return type
|
503
|
+
|
504
|
+
[**RunObject**](RunObject.md)
|
505
|
+
|
506
|
+
### Authorization
|
507
|
+
|
508
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
509
|
+
|
510
|
+
### HTTP request headers
|
511
|
+
|
512
|
+
- **Content-Type**: application/json
|
513
|
+
- **Accept**: application/json
|
514
|
+
|
515
|
+
|
516
|
+
## delete_assistant
|
517
|
+
|
518
|
+
> <DeleteAssistantResponse> delete_assistant(assistant_id)
|
519
|
+
|
520
|
+
Delete an assistant.
|
521
|
+
|
522
|
+
### Examples
|
523
|
+
|
524
|
+
```ruby
|
525
|
+
require 'time'
|
526
|
+
require 'openapi_openai'
|
527
|
+
# setup authorization
|
528
|
+
OpenApiOpenAIClient.configure do |config|
|
529
|
+
# Configure Bearer authorization: ApiKeyAuth
|
530
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
531
|
+
end
|
532
|
+
|
533
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
534
|
+
assistant_id = 'assistant_id_example' # String | The ID of the assistant to delete.
|
535
|
+
|
536
|
+
begin
|
537
|
+
# Delete an assistant.
|
538
|
+
result = api_instance.delete_assistant(assistant_id)
|
539
|
+
p result
|
540
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
541
|
+
puts "Error when calling AssistantsApi->delete_assistant: #{e}"
|
542
|
+
end
|
543
|
+
```
|
544
|
+
|
545
|
+
#### Using the delete_assistant_with_http_info variant
|
546
|
+
|
547
|
+
This returns an Array which contains the response data, status code and headers.
|
548
|
+
|
549
|
+
> <Array(<DeleteAssistantResponse>, Integer, Hash)> delete_assistant_with_http_info(assistant_id)
|
550
|
+
|
551
|
+
```ruby
|
552
|
+
begin
|
553
|
+
# Delete an assistant.
|
554
|
+
data, status_code, headers = api_instance.delete_assistant_with_http_info(assistant_id)
|
555
|
+
p status_code # => 2xx
|
556
|
+
p headers # => { ... }
|
557
|
+
p data # => <DeleteAssistantResponse>
|
558
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
559
|
+
puts "Error when calling AssistantsApi->delete_assistant_with_http_info: #{e}"
|
560
|
+
end
|
561
|
+
```
|
562
|
+
|
563
|
+
### Parameters
|
564
|
+
|
565
|
+
| Name | Type | Description | Notes |
|
566
|
+
| ---- | ---- | ----------- | ----- |
|
567
|
+
| **assistant_id** | **String** | The ID of the assistant to delete. | |
|
568
|
+
|
569
|
+
### Return type
|
570
|
+
|
571
|
+
[**DeleteAssistantResponse**](DeleteAssistantResponse.md)
|
572
|
+
|
573
|
+
### Authorization
|
574
|
+
|
575
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
576
|
+
|
577
|
+
### HTTP request headers
|
578
|
+
|
579
|
+
- **Content-Type**: Not defined
|
580
|
+
- **Accept**: application/json
|
581
|
+
|
582
|
+
|
583
|
+
## delete_assistant_file
|
584
|
+
|
585
|
+
> <DeleteAssistantFileResponse> delete_assistant_file(assistant_id, file_id)
|
586
|
+
|
587
|
+
Delete an assistant file.
|
588
|
+
|
589
|
+
### Examples
|
590
|
+
|
591
|
+
```ruby
|
592
|
+
require 'time'
|
593
|
+
require 'openapi_openai'
|
594
|
+
# setup authorization
|
595
|
+
OpenApiOpenAIClient.configure do |config|
|
596
|
+
# Configure Bearer authorization: ApiKeyAuth
|
597
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
598
|
+
end
|
599
|
+
|
600
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
601
|
+
assistant_id = 'assistant_id_example' # String | The ID of the assistant that the file belongs to.
|
602
|
+
file_id = 'file_id_example' # String | The ID of the file to delete.
|
603
|
+
|
604
|
+
begin
|
605
|
+
# Delete an assistant file.
|
606
|
+
result = api_instance.delete_assistant_file(assistant_id, file_id)
|
607
|
+
p result
|
608
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
609
|
+
puts "Error when calling AssistantsApi->delete_assistant_file: #{e}"
|
610
|
+
end
|
611
|
+
```
|
612
|
+
|
613
|
+
#### Using the delete_assistant_file_with_http_info variant
|
614
|
+
|
615
|
+
This returns an Array which contains the response data, status code and headers.
|
616
|
+
|
617
|
+
> <Array(<DeleteAssistantFileResponse>, Integer, Hash)> delete_assistant_file_with_http_info(assistant_id, file_id)
|
618
|
+
|
619
|
+
```ruby
|
620
|
+
begin
|
621
|
+
# Delete an assistant file.
|
622
|
+
data, status_code, headers = api_instance.delete_assistant_file_with_http_info(assistant_id, file_id)
|
623
|
+
p status_code # => 2xx
|
624
|
+
p headers # => { ... }
|
625
|
+
p data # => <DeleteAssistantFileResponse>
|
626
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
627
|
+
puts "Error when calling AssistantsApi->delete_assistant_file_with_http_info: #{e}"
|
628
|
+
end
|
629
|
+
```
|
630
|
+
|
631
|
+
### Parameters
|
632
|
+
|
633
|
+
| Name | Type | Description | Notes |
|
634
|
+
| ---- | ---- | ----------- | ----- |
|
635
|
+
| **assistant_id** | **String** | The ID of the assistant that the file belongs to. | |
|
636
|
+
| **file_id** | **String** | The ID of the file to delete. | |
|
637
|
+
|
638
|
+
### Return type
|
639
|
+
|
640
|
+
[**DeleteAssistantFileResponse**](DeleteAssistantFileResponse.md)
|
641
|
+
|
642
|
+
### Authorization
|
643
|
+
|
644
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
645
|
+
|
646
|
+
### HTTP request headers
|
647
|
+
|
648
|
+
- **Content-Type**: Not defined
|
649
|
+
- **Accept**: application/json
|
650
|
+
|
651
|
+
|
652
|
+
## delete_thread
|
653
|
+
|
654
|
+
> <DeleteThreadResponse> delete_thread(thread_id)
|
655
|
+
|
656
|
+
Delete a thread.
|
657
|
+
|
658
|
+
### Examples
|
659
|
+
|
660
|
+
```ruby
|
661
|
+
require 'time'
|
662
|
+
require 'openapi_openai'
|
663
|
+
# setup authorization
|
664
|
+
OpenApiOpenAIClient.configure do |config|
|
665
|
+
# Configure Bearer authorization: ApiKeyAuth
|
666
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
667
|
+
end
|
668
|
+
|
669
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
670
|
+
thread_id = 'thread_id_example' # String | The ID of the thread to delete.
|
671
|
+
|
672
|
+
begin
|
673
|
+
# Delete a thread.
|
674
|
+
result = api_instance.delete_thread(thread_id)
|
675
|
+
p result
|
676
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
677
|
+
puts "Error when calling AssistantsApi->delete_thread: #{e}"
|
678
|
+
end
|
679
|
+
```
|
680
|
+
|
681
|
+
#### Using the delete_thread_with_http_info variant
|
682
|
+
|
683
|
+
This returns an Array which contains the response data, status code and headers.
|
684
|
+
|
685
|
+
> <Array(<DeleteThreadResponse>, Integer, Hash)> delete_thread_with_http_info(thread_id)
|
686
|
+
|
687
|
+
```ruby
|
688
|
+
begin
|
689
|
+
# Delete a thread.
|
690
|
+
data, status_code, headers = api_instance.delete_thread_with_http_info(thread_id)
|
691
|
+
p status_code # => 2xx
|
692
|
+
p headers # => { ... }
|
693
|
+
p data # => <DeleteThreadResponse>
|
694
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
695
|
+
puts "Error when calling AssistantsApi->delete_thread_with_http_info: #{e}"
|
696
|
+
end
|
697
|
+
```
|
698
|
+
|
699
|
+
### Parameters
|
700
|
+
|
701
|
+
| Name | Type | Description | Notes |
|
702
|
+
| ---- | ---- | ----------- | ----- |
|
703
|
+
| **thread_id** | **String** | The ID of the thread to delete. | |
|
704
|
+
|
705
|
+
### Return type
|
706
|
+
|
707
|
+
[**DeleteThreadResponse**](DeleteThreadResponse.md)
|
708
|
+
|
709
|
+
### Authorization
|
710
|
+
|
711
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
712
|
+
|
713
|
+
### HTTP request headers
|
714
|
+
|
715
|
+
- **Content-Type**: Not defined
|
716
|
+
- **Accept**: application/json
|
717
|
+
|
718
|
+
|
719
|
+
## get_assistant
|
720
|
+
|
721
|
+
> <AssistantObject> get_assistant(assistant_id)
|
722
|
+
|
723
|
+
Retrieves an assistant.
|
724
|
+
|
725
|
+
### Examples
|
726
|
+
|
727
|
+
```ruby
|
728
|
+
require 'time'
|
729
|
+
require 'openapi_openai'
|
730
|
+
# setup authorization
|
731
|
+
OpenApiOpenAIClient.configure do |config|
|
732
|
+
# Configure Bearer authorization: ApiKeyAuth
|
733
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
734
|
+
end
|
735
|
+
|
736
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
737
|
+
assistant_id = 'assistant_id_example' # String | The ID of the assistant to retrieve.
|
738
|
+
|
739
|
+
begin
|
740
|
+
# Retrieves an assistant.
|
741
|
+
result = api_instance.get_assistant(assistant_id)
|
742
|
+
p result
|
743
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
744
|
+
puts "Error when calling AssistantsApi->get_assistant: #{e}"
|
745
|
+
end
|
746
|
+
```
|
747
|
+
|
748
|
+
#### Using the get_assistant_with_http_info variant
|
749
|
+
|
750
|
+
This returns an Array which contains the response data, status code and headers.
|
751
|
+
|
752
|
+
> <Array(<AssistantObject>, Integer, Hash)> get_assistant_with_http_info(assistant_id)
|
753
|
+
|
754
|
+
```ruby
|
755
|
+
begin
|
756
|
+
# Retrieves an assistant.
|
757
|
+
data, status_code, headers = api_instance.get_assistant_with_http_info(assistant_id)
|
758
|
+
p status_code # => 2xx
|
759
|
+
p headers # => { ... }
|
760
|
+
p data # => <AssistantObject>
|
761
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
762
|
+
puts "Error when calling AssistantsApi->get_assistant_with_http_info: #{e}"
|
763
|
+
end
|
764
|
+
```
|
765
|
+
|
766
|
+
### Parameters
|
767
|
+
|
768
|
+
| Name | Type | Description | Notes |
|
769
|
+
| ---- | ---- | ----------- | ----- |
|
770
|
+
| **assistant_id** | **String** | The ID of the assistant to retrieve. | |
|
771
|
+
|
772
|
+
### Return type
|
773
|
+
|
774
|
+
[**AssistantObject**](AssistantObject.md)
|
775
|
+
|
776
|
+
### Authorization
|
777
|
+
|
778
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
779
|
+
|
780
|
+
### HTTP request headers
|
781
|
+
|
782
|
+
- **Content-Type**: Not defined
|
783
|
+
- **Accept**: application/json
|
784
|
+
|
785
|
+
|
786
|
+
## get_assistant_file
|
787
|
+
|
788
|
+
> <AssistantFileObject> get_assistant_file(assistant_id, file_id)
|
789
|
+
|
790
|
+
Retrieves an AssistantFile.
|
791
|
+
|
792
|
+
### Examples
|
793
|
+
|
794
|
+
```ruby
|
795
|
+
require 'time'
|
796
|
+
require 'openapi_openai'
|
797
|
+
# setup authorization
|
798
|
+
OpenApiOpenAIClient.configure do |config|
|
799
|
+
# Configure Bearer authorization: ApiKeyAuth
|
800
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
801
|
+
end
|
802
|
+
|
803
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
804
|
+
assistant_id = 'assistant_id_example' # String | The ID of the assistant who the file belongs to.
|
805
|
+
file_id = 'file_id_example' # String | The ID of the file we're getting.
|
806
|
+
|
807
|
+
begin
|
808
|
+
# Retrieves an AssistantFile.
|
809
|
+
result = api_instance.get_assistant_file(assistant_id, file_id)
|
810
|
+
p result
|
811
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
812
|
+
puts "Error when calling AssistantsApi->get_assistant_file: #{e}"
|
813
|
+
end
|
814
|
+
```
|
815
|
+
|
816
|
+
#### Using the get_assistant_file_with_http_info variant
|
817
|
+
|
818
|
+
This returns an Array which contains the response data, status code and headers.
|
819
|
+
|
820
|
+
> <Array(<AssistantFileObject>, Integer, Hash)> get_assistant_file_with_http_info(assistant_id, file_id)
|
821
|
+
|
822
|
+
```ruby
|
823
|
+
begin
|
824
|
+
# Retrieves an AssistantFile.
|
825
|
+
data, status_code, headers = api_instance.get_assistant_file_with_http_info(assistant_id, file_id)
|
826
|
+
p status_code # => 2xx
|
827
|
+
p headers # => { ... }
|
828
|
+
p data # => <AssistantFileObject>
|
829
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
830
|
+
puts "Error when calling AssistantsApi->get_assistant_file_with_http_info: #{e}"
|
831
|
+
end
|
832
|
+
```
|
833
|
+
|
834
|
+
### Parameters
|
835
|
+
|
836
|
+
| Name | Type | Description | Notes |
|
837
|
+
| ---- | ---- | ----------- | ----- |
|
838
|
+
| **assistant_id** | **String** | The ID of the assistant who the file belongs to. | |
|
839
|
+
| **file_id** | **String** | The ID of the file we're getting. | |
|
840
|
+
|
841
|
+
### Return type
|
842
|
+
|
843
|
+
[**AssistantFileObject**](AssistantFileObject.md)
|
844
|
+
|
845
|
+
### Authorization
|
846
|
+
|
847
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
848
|
+
|
849
|
+
### HTTP request headers
|
850
|
+
|
851
|
+
- **Content-Type**: Not defined
|
852
|
+
- **Accept**: application/json
|
853
|
+
|
854
|
+
|
855
|
+
## get_message
|
856
|
+
|
857
|
+
> <MessageObject> get_message(thread_id, message_id)
|
858
|
+
|
859
|
+
Retrieve a message.
|
860
|
+
|
861
|
+
### Examples
|
862
|
+
|
863
|
+
```ruby
|
864
|
+
require 'time'
|
865
|
+
require 'openapi_openai'
|
866
|
+
# setup authorization
|
867
|
+
OpenApiOpenAIClient.configure do |config|
|
868
|
+
# Configure Bearer authorization: ApiKeyAuth
|
869
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
870
|
+
end
|
871
|
+
|
872
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
873
|
+
thread_id = 'thread_id_example' # String | The ID of the [thread](/docs/api-reference/threads) to which this message belongs.
|
874
|
+
message_id = 'message_id_example' # String | The ID of the message to retrieve.
|
875
|
+
|
876
|
+
begin
|
877
|
+
# Retrieve a message.
|
878
|
+
result = api_instance.get_message(thread_id, message_id)
|
879
|
+
p result
|
880
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
881
|
+
puts "Error when calling AssistantsApi->get_message: #{e}"
|
882
|
+
end
|
883
|
+
```
|
884
|
+
|
885
|
+
#### Using the get_message_with_http_info variant
|
886
|
+
|
887
|
+
This returns an Array which contains the response data, status code and headers.
|
888
|
+
|
889
|
+
> <Array(<MessageObject>, Integer, Hash)> get_message_with_http_info(thread_id, message_id)
|
890
|
+
|
891
|
+
```ruby
|
892
|
+
begin
|
893
|
+
# Retrieve a message.
|
894
|
+
data, status_code, headers = api_instance.get_message_with_http_info(thread_id, message_id)
|
895
|
+
p status_code # => 2xx
|
896
|
+
p headers # => { ... }
|
897
|
+
p data # => <MessageObject>
|
898
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
899
|
+
puts "Error when calling AssistantsApi->get_message_with_http_info: #{e}"
|
900
|
+
end
|
901
|
+
```
|
902
|
+
|
903
|
+
### Parameters
|
904
|
+
|
905
|
+
| Name | Type | Description | Notes |
|
906
|
+
| ---- | ---- | ----------- | ----- |
|
907
|
+
| **thread_id** | **String** | The ID of the [thread](/docs/api-reference/threads) to which this message belongs. | |
|
908
|
+
| **message_id** | **String** | The ID of the message to retrieve. | |
|
909
|
+
|
910
|
+
### Return type
|
911
|
+
|
912
|
+
[**MessageObject**](MessageObject.md)
|
913
|
+
|
914
|
+
### Authorization
|
915
|
+
|
916
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
917
|
+
|
918
|
+
### HTTP request headers
|
919
|
+
|
920
|
+
- **Content-Type**: Not defined
|
921
|
+
- **Accept**: application/json
|
922
|
+
|
923
|
+
|
924
|
+
## get_message_file
|
925
|
+
|
926
|
+
> <MessageFileObject> get_message_file(thread_id, message_id, file_id)
|
927
|
+
|
928
|
+
Retrieves a message file.
|
929
|
+
|
930
|
+
### Examples
|
931
|
+
|
932
|
+
```ruby
|
933
|
+
require 'time'
|
934
|
+
require 'openapi_openai'
|
935
|
+
# setup authorization
|
936
|
+
OpenApiOpenAIClient.configure do |config|
|
937
|
+
# Configure Bearer authorization: ApiKeyAuth
|
938
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
939
|
+
end
|
940
|
+
|
941
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
942
|
+
thread_id = 'thread_abc123' # String | The ID of the thread to which the message and File belong.
|
943
|
+
message_id = 'msg_abc123' # String | The ID of the message the file belongs to.
|
944
|
+
file_id = 'file-abc123' # String | The ID of the file being retrieved.
|
945
|
+
|
946
|
+
begin
|
947
|
+
# Retrieves a message file.
|
948
|
+
result = api_instance.get_message_file(thread_id, message_id, file_id)
|
949
|
+
p result
|
950
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
951
|
+
puts "Error when calling AssistantsApi->get_message_file: #{e}"
|
952
|
+
end
|
953
|
+
```
|
954
|
+
|
955
|
+
#### Using the get_message_file_with_http_info variant
|
956
|
+
|
957
|
+
This returns an Array which contains the response data, status code and headers.
|
958
|
+
|
959
|
+
> <Array(<MessageFileObject>, Integer, Hash)> get_message_file_with_http_info(thread_id, message_id, file_id)
|
960
|
+
|
961
|
+
```ruby
|
962
|
+
begin
|
963
|
+
# Retrieves a message file.
|
964
|
+
data, status_code, headers = api_instance.get_message_file_with_http_info(thread_id, message_id, file_id)
|
965
|
+
p status_code # => 2xx
|
966
|
+
p headers # => { ... }
|
967
|
+
p data # => <MessageFileObject>
|
968
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
969
|
+
puts "Error when calling AssistantsApi->get_message_file_with_http_info: #{e}"
|
970
|
+
end
|
971
|
+
```
|
972
|
+
|
973
|
+
### Parameters
|
974
|
+
|
975
|
+
| Name | Type | Description | Notes |
|
976
|
+
| ---- | ---- | ----------- | ----- |
|
977
|
+
| **thread_id** | **String** | The ID of the thread to which the message and File belong. | |
|
978
|
+
| **message_id** | **String** | The ID of the message the file belongs to. | |
|
979
|
+
| **file_id** | **String** | The ID of the file being retrieved. | |
|
980
|
+
|
981
|
+
### Return type
|
982
|
+
|
983
|
+
[**MessageFileObject**](MessageFileObject.md)
|
984
|
+
|
985
|
+
### Authorization
|
986
|
+
|
987
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
988
|
+
|
989
|
+
### HTTP request headers
|
990
|
+
|
991
|
+
- **Content-Type**: Not defined
|
992
|
+
- **Accept**: application/json
|
993
|
+
|
994
|
+
|
995
|
+
## get_run
|
996
|
+
|
997
|
+
> <RunObject> get_run(thread_id, run_id)
|
998
|
+
|
999
|
+
Retrieves a run.
|
1000
|
+
|
1001
|
+
### Examples
|
1002
|
+
|
1003
|
+
```ruby
|
1004
|
+
require 'time'
|
1005
|
+
require 'openapi_openai'
|
1006
|
+
# setup authorization
|
1007
|
+
OpenApiOpenAIClient.configure do |config|
|
1008
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1009
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1010
|
+
end
|
1011
|
+
|
1012
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1013
|
+
thread_id = 'thread_id_example' # String | The ID of the [thread](/docs/api-reference/threads) that was run.
|
1014
|
+
run_id = 'run_id_example' # String | The ID of the run to retrieve.
|
1015
|
+
|
1016
|
+
begin
|
1017
|
+
# Retrieves a run.
|
1018
|
+
result = api_instance.get_run(thread_id, run_id)
|
1019
|
+
p result
|
1020
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1021
|
+
puts "Error when calling AssistantsApi->get_run: #{e}"
|
1022
|
+
end
|
1023
|
+
```
|
1024
|
+
|
1025
|
+
#### Using the get_run_with_http_info variant
|
1026
|
+
|
1027
|
+
This returns an Array which contains the response data, status code and headers.
|
1028
|
+
|
1029
|
+
> <Array(<RunObject>, Integer, Hash)> get_run_with_http_info(thread_id, run_id)
|
1030
|
+
|
1031
|
+
```ruby
|
1032
|
+
begin
|
1033
|
+
# Retrieves a run.
|
1034
|
+
data, status_code, headers = api_instance.get_run_with_http_info(thread_id, run_id)
|
1035
|
+
p status_code # => 2xx
|
1036
|
+
p headers # => { ... }
|
1037
|
+
p data # => <RunObject>
|
1038
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1039
|
+
puts "Error when calling AssistantsApi->get_run_with_http_info: #{e}"
|
1040
|
+
end
|
1041
|
+
```
|
1042
|
+
|
1043
|
+
### Parameters
|
1044
|
+
|
1045
|
+
| Name | Type | Description | Notes |
|
1046
|
+
| ---- | ---- | ----------- | ----- |
|
1047
|
+
| **thread_id** | **String** | The ID of the [thread](/docs/api-reference/threads) that was run. | |
|
1048
|
+
| **run_id** | **String** | The ID of the run to retrieve. | |
|
1049
|
+
|
1050
|
+
### Return type
|
1051
|
+
|
1052
|
+
[**RunObject**](RunObject.md)
|
1053
|
+
|
1054
|
+
### Authorization
|
1055
|
+
|
1056
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1057
|
+
|
1058
|
+
### HTTP request headers
|
1059
|
+
|
1060
|
+
- **Content-Type**: Not defined
|
1061
|
+
- **Accept**: application/json
|
1062
|
+
|
1063
|
+
|
1064
|
+
## get_run_step
|
1065
|
+
|
1066
|
+
> <RunStepObject> get_run_step(thread_id, run_id, step_id)
|
1067
|
+
|
1068
|
+
Retrieves a run step.
|
1069
|
+
|
1070
|
+
### Examples
|
1071
|
+
|
1072
|
+
```ruby
|
1073
|
+
require 'time'
|
1074
|
+
require 'openapi_openai'
|
1075
|
+
# setup authorization
|
1076
|
+
OpenApiOpenAIClient.configure do |config|
|
1077
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1078
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1079
|
+
end
|
1080
|
+
|
1081
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1082
|
+
thread_id = 'thread_id_example' # String | The ID of the thread to which the run and run step belongs.
|
1083
|
+
run_id = 'run_id_example' # String | The ID of the run to which the run step belongs.
|
1084
|
+
step_id = 'step_id_example' # String | The ID of the run step to retrieve.
|
1085
|
+
|
1086
|
+
begin
|
1087
|
+
# Retrieves a run step.
|
1088
|
+
result = api_instance.get_run_step(thread_id, run_id, step_id)
|
1089
|
+
p result
|
1090
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1091
|
+
puts "Error when calling AssistantsApi->get_run_step: #{e}"
|
1092
|
+
end
|
1093
|
+
```
|
1094
|
+
|
1095
|
+
#### Using the get_run_step_with_http_info variant
|
1096
|
+
|
1097
|
+
This returns an Array which contains the response data, status code and headers.
|
1098
|
+
|
1099
|
+
> <Array(<RunStepObject>, Integer, Hash)> get_run_step_with_http_info(thread_id, run_id, step_id)
|
1100
|
+
|
1101
|
+
```ruby
|
1102
|
+
begin
|
1103
|
+
# Retrieves a run step.
|
1104
|
+
data, status_code, headers = api_instance.get_run_step_with_http_info(thread_id, run_id, step_id)
|
1105
|
+
p status_code # => 2xx
|
1106
|
+
p headers # => { ... }
|
1107
|
+
p data # => <RunStepObject>
|
1108
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1109
|
+
puts "Error when calling AssistantsApi->get_run_step_with_http_info: #{e}"
|
1110
|
+
end
|
1111
|
+
```
|
1112
|
+
|
1113
|
+
### Parameters
|
1114
|
+
|
1115
|
+
| Name | Type | Description | Notes |
|
1116
|
+
| ---- | ---- | ----------- | ----- |
|
1117
|
+
| **thread_id** | **String** | The ID of the thread to which the run and run step belongs. | |
|
1118
|
+
| **run_id** | **String** | The ID of the run to which the run step belongs. | |
|
1119
|
+
| **step_id** | **String** | The ID of the run step to retrieve. | |
|
1120
|
+
|
1121
|
+
### Return type
|
1122
|
+
|
1123
|
+
[**RunStepObject**](RunStepObject.md)
|
1124
|
+
|
1125
|
+
### Authorization
|
1126
|
+
|
1127
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1128
|
+
|
1129
|
+
### HTTP request headers
|
1130
|
+
|
1131
|
+
- **Content-Type**: Not defined
|
1132
|
+
- **Accept**: application/json
|
1133
|
+
|
1134
|
+
|
1135
|
+
## get_thread
|
1136
|
+
|
1137
|
+
> <ThreadObject> get_thread(thread_id)
|
1138
|
+
|
1139
|
+
Retrieves a thread.
|
1140
|
+
|
1141
|
+
### Examples
|
1142
|
+
|
1143
|
+
```ruby
|
1144
|
+
require 'time'
|
1145
|
+
require 'openapi_openai'
|
1146
|
+
# setup authorization
|
1147
|
+
OpenApiOpenAIClient.configure do |config|
|
1148
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1149
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1150
|
+
end
|
1151
|
+
|
1152
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1153
|
+
thread_id = 'thread_id_example' # String | The ID of the thread to retrieve.
|
1154
|
+
|
1155
|
+
begin
|
1156
|
+
# Retrieves a thread.
|
1157
|
+
result = api_instance.get_thread(thread_id)
|
1158
|
+
p result
|
1159
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1160
|
+
puts "Error when calling AssistantsApi->get_thread: #{e}"
|
1161
|
+
end
|
1162
|
+
```
|
1163
|
+
|
1164
|
+
#### Using the get_thread_with_http_info variant
|
1165
|
+
|
1166
|
+
This returns an Array which contains the response data, status code and headers.
|
1167
|
+
|
1168
|
+
> <Array(<ThreadObject>, Integer, Hash)> get_thread_with_http_info(thread_id)
|
1169
|
+
|
1170
|
+
```ruby
|
1171
|
+
begin
|
1172
|
+
# Retrieves a thread.
|
1173
|
+
data, status_code, headers = api_instance.get_thread_with_http_info(thread_id)
|
1174
|
+
p status_code # => 2xx
|
1175
|
+
p headers # => { ... }
|
1176
|
+
p data # => <ThreadObject>
|
1177
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1178
|
+
puts "Error when calling AssistantsApi->get_thread_with_http_info: #{e}"
|
1179
|
+
end
|
1180
|
+
```
|
1181
|
+
|
1182
|
+
### Parameters
|
1183
|
+
|
1184
|
+
| Name | Type | Description | Notes |
|
1185
|
+
| ---- | ---- | ----------- | ----- |
|
1186
|
+
| **thread_id** | **String** | The ID of the thread to retrieve. | |
|
1187
|
+
|
1188
|
+
### Return type
|
1189
|
+
|
1190
|
+
[**ThreadObject**](ThreadObject.md)
|
1191
|
+
|
1192
|
+
### Authorization
|
1193
|
+
|
1194
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1195
|
+
|
1196
|
+
### HTTP request headers
|
1197
|
+
|
1198
|
+
- **Content-Type**: Not defined
|
1199
|
+
- **Accept**: application/json
|
1200
|
+
|
1201
|
+
|
1202
|
+
## list_assistant_files
|
1203
|
+
|
1204
|
+
> <ListAssistantFilesResponse> list_assistant_files(assistant_id, opts)
|
1205
|
+
|
1206
|
+
Returns a list of assistant files.
|
1207
|
+
|
1208
|
+
### Examples
|
1209
|
+
|
1210
|
+
```ruby
|
1211
|
+
require 'time'
|
1212
|
+
require 'openapi_openai'
|
1213
|
+
# setup authorization
|
1214
|
+
OpenApiOpenAIClient.configure do |config|
|
1215
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1216
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1217
|
+
end
|
1218
|
+
|
1219
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1220
|
+
assistant_id = 'assistant_id_example' # String | The ID of the assistant the file belongs to.
|
1221
|
+
opts = {
|
1222
|
+
limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
|
1223
|
+
order: 'asc', # String | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
|
1224
|
+
after: 'after_example', # String | 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.
|
1225
|
+
before: 'before_example' # String | 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.
|
1226
|
+
}
|
1227
|
+
|
1228
|
+
begin
|
1229
|
+
# Returns a list of assistant files.
|
1230
|
+
result = api_instance.list_assistant_files(assistant_id, opts)
|
1231
|
+
p result
|
1232
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1233
|
+
puts "Error when calling AssistantsApi->list_assistant_files: #{e}"
|
1234
|
+
end
|
1235
|
+
```
|
1236
|
+
|
1237
|
+
#### Using the list_assistant_files_with_http_info variant
|
1238
|
+
|
1239
|
+
This returns an Array which contains the response data, status code and headers.
|
1240
|
+
|
1241
|
+
> <Array(<ListAssistantFilesResponse>, Integer, Hash)> list_assistant_files_with_http_info(assistant_id, opts)
|
1242
|
+
|
1243
|
+
```ruby
|
1244
|
+
begin
|
1245
|
+
# Returns a list of assistant files.
|
1246
|
+
data, status_code, headers = api_instance.list_assistant_files_with_http_info(assistant_id, opts)
|
1247
|
+
p status_code # => 2xx
|
1248
|
+
p headers # => { ... }
|
1249
|
+
p data # => <ListAssistantFilesResponse>
|
1250
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1251
|
+
puts "Error when calling AssistantsApi->list_assistant_files_with_http_info: #{e}"
|
1252
|
+
end
|
1253
|
+
```
|
1254
|
+
|
1255
|
+
### Parameters
|
1256
|
+
|
1257
|
+
| Name | Type | Description | Notes |
|
1258
|
+
| ---- | ---- | ----------- | ----- |
|
1259
|
+
| **assistant_id** | **String** | The ID of the assistant the file belongs to. | |
|
1260
|
+
| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional][default to 20] |
|
1261
|
+
| **order** | **String** | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. | [optional][default to 'desc'] |
|
1262
|
+
| **after** | **String** | 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. | [optional] |
|
1263
|
+
| **before** | **String** | 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. | [optional] |
|
1264
|
+
|
1265
|
+
### Return type
|
1266
|
+
|
1267
|
+
[**ListAssistantFilesResponse**](ListAssistantFilesResponse.md)
|
1268
|
+
|
1269
|
+
### Authorization
|
1270
|
+
|
1271
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1272
|
+
|
1273
|
+
### HTTP request headers
|
1274
|
+
|
1275
|
+
- **Content-Type**: Not defined
|
1276
|
+
- **Accept**: application/json
|
1277
|
+
|
1278
|
+
|
1279
|
+
## list_assistants
|
1280
|
+
|
1281
|
+
> <ListAssistantsResponse> list_assistants(opts)
|
1282
|
+
|
1283
|
+
Returns a list of assistants.
|
1284
|
+
|
1285
|
+
### Examples
|
1286
|
+
|
1287
|
+
```ruby
|
1288
|
+
require 'time'
|
1289
|
+
require 'openapi_openai'
|
1290
|
+
# setup authorization
|
1291
|
+
OpenApiOpenAIClient.configure do |config|
|
1292
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1293
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1294
|
+
end
|
1295
|
+
|
1296
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1297
|
+
opts = {
|
1298
|
+
limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
|
1299
|
+
order: 'asc', # String | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
|
1300
|
+
after: 'after_example', # String | 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.
|
1301
|
+
before: 'before_example' # String | 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.
|
1302
|
+
}
|
1303
|
+
|
1304
|
+
begin
|
1305
|
+
# Returns a list of assistants.
|
1306
|
+
result = api_instance.list_assistants(opts)
|
1307
|
+
p result
|
1308
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1309
|
+
puts "Error when calling AssistantsApi->list_assistants: #{e}"
|
1310
|
+
end
|
1311
|
+
```
|
1312
|
+
|
1313
|
+
#### Using the list_assistants_with_http_info variant
|
1314
|
+
|
1315
|
+
This returns an Array which contains the response data, status code and headers.
|
1316
|
+
|
1317
|
+
> <Array(<ListAssistantsResponse>, Integer, Hash)> list_assistants_with_http_info(opts)
|
1318
|
+
|
1319
|
+
```ruby
|
1320
|
+
begin
|
1321
|
+
# Returns a list of assistants.
|
1322
|
+
data, status_code, headers = api_instance.list_assistants_with_http_info(opts)
|
1323
|
+
p status_code # => 2xx
|
1324
|
+
p headers # => { ... }
|
1325
|
+
p data # => <ListAssistantsResponse>
|
1326
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1327
|
+
puts "Error when calling AssistantsApi->list_assistants_with_http_info: #{e}"
|
1328
|
+
end
|
1329
|
+
```
|
1330
|
+
|
1331
|
+
### Parameters
|
1332
|
+
|
1333
|
+
| Name | Type | Description | Notes |
|
1334
|
+
| ---- | ---- | ----------- | ----- |
|
1335
|
+
| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional][default to 20] |
|
1336
|
+
| **order** | **String** | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. | [optional][default to 'desc'] |
|
1337
|
+
| **after** | **String** | 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. | [optional] |
|
1338
|
+
| **before** | **String** | 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. | [optional] |
|
1339
|
+
|
1340
|
+
### Return type
|
1341
|
+
|
1342
|
+
[**ListAssistantsResponse**](ListAssistantsResponse.md)
|
1343
|
+
|
1344
|
+
### Authorization
|
1345
|
+
|
1346
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1347
|
+
|
1348
|
+
### HTTP request headers
|
1349
|
+
|
1350
|
+
- **Content-Type**: Not defined
|
1351
|
+
- **Accept**: application/json
|
1352
|
+
|
1353
|
+
|
1354
|
+
## list_message_files
|
1355
|
+
|
1356
|
+
> <ListMessageFilesResponse> list_message_files(thread_id, message_id, opts)
|
1357
|
+
|
1358
|
+
Returns a list of message files.
|
1359
|
+
|
1360
|
+
### Examples
|
1361
|
+
|
1362
|
+
```ruby
|
1363
|
+
require 'time'
|
1364
|
+
require 'openapi_openai'
|
1365
|
+
# setup authorization
|
1366
|
+
OpenApiOpenAIClient.configure do |config|
|
1367
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1368
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1369
|
+
end
|
1370
|
+
|
1371
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1372
|
+
thread_id = 'thread_id_example' # String | The ID of the thread that the message and files belong to.
|
1373
|
+
message_id = 'message_id_example' # String | The ID of the message that the files belongs to.
|
1374
|
+
opts = {
|
1375
|
+
limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
|
1376
|
+
order: 'asc', # String | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
|
1377
|
+
after: 'after_example', # String | 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.
|
1378
|
+
before: 'before_example' # String | 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.
|
1379
|
+
}
|
1380
|
+
|
1381
|
+
begin
|
1382
|
+
# Returns a list of message files.
|
1383
|
+
result = api_instance.list_message_files(thread_id, message_id, opts)
|
1384
|
+
p result
|
1385
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1386
|
+
puts "Error when calling AssistantsApi->list_message_files: #{e}"
|
1387
|
+
end
|
1388
|
+
```
|
1389
|
+
|
1390
|
+
#### Using the list_message_files_with_http_info variant
|
1391
|
+
|
1392
|
+
This returns an Array which contains the response data, status code and headers.
|
1393
|
+
|
1394
|
+
> <Array(<ListMessageFilesResponse>, Integer, Hash)> list_message_files_with_http_info(thread_id, message_id, opts)
|
1395
|
+
|
1396
|
+
```ruby
|
1397
|
+
begin
|
1398
|
+
# Returns a list of message files.
|
1399
|
+
data, status_code, headers = api_instance.list_message_files_with_http_info(thread_id, message_id, opts)
|
1400
|
+
p status_code # => 2xx
|
1401
|
+
p headers # => { ... }
|
1402
|
+
p data # => <ListMessageFilesResponse>
|
1403
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1404
|
+
puts "Error when calling AssistantsApi->list_message_files_with_http_info: #{e}"
|
1405
|
+
end
|
1406
|
+
```
|
1407
|
+
|
1408
|
+
### Parameters
|
1409
|
+
|
1410
|
+
| Name | Type | Description | Notes |
|
1411
|
+
| ---- | ---- | ----------- | ----- |
|
1412
|
+
| **thread_id** | **String** | The ID of the thread that the message and files belong to. | |
|
1413
|
+
| **message_id** | **String** | The ID of the message that the files belongs to. | |
|
1414
|
+
| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional][default to 20] |
|
1415
|
+
| **order** | **String** | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. | [optional][default to 'desc'] |
|
1416
|
+
| **after** | **String** | 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. | [optional] |
|
1417
|
+
| **before** | **String** | 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. | [optional] |
|
1418
|
+
|
1419
|
+
### Return type
|
1420
|
+
|
1421
|
+
[**ListMessageFilesResponse**](ListMessageFilesResponse.md)
|
1422
|
+
|
1423
|
+
### Authorization
|
1424
|
+
|
1425
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1426
|
+
|
1427
|
+
### HTTP request headers
|
1428
|
+
|
1429
|
+
- **Content-Type**: Not defined
|
1430
|
+
- **Accept**: application/json
|
1431
|
+
|
1432
|
+
|
1433
|
+
## list_messages
|
1434
|
+
|
1435
|
+
> <ListMessagesResponse> list_messages(thread_id, opts)
|
1436
|
+
|
1437
|
+
Returns a list of messages for a given thread.
|
1438
|
+
|
1439
|
+
### Examples
|
1440
|
+
|
1441
|
+
```ruby
|
1442
|
+
require 'time'
|
1443
|
+
require 'openapi_openai'
|
1444
|
+
# setup authorization
|
1445
|
+
OpenApiOpenAIClient.configure do |config|
|
1446
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1447
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1448
|
+
end
|
1449
|
+
|
1450
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1451
|
+
thread_id = 'thread_id_example' # String | The ID of the [thread](/docs/api-reference/threads) the messages belong to.
|
1452
|
+
opts = {
|
1453
|
+
limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
|
1454
|
+
order: 'asc', # String | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
|
1455
|
+
after: 'after_example', # String | 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.
|
1456
|
+
before: 'before_example', # String | 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.
|
1457
|
+
run_id: 'run_id_example' # String | Filter messages by the run ID that generated them.
|
1458
|
+
}
|
1459
|
+
|
1460
|
+
begin
|
1461
|
+
# Returns a list of messages for a given thread.
|
1462
|
+
result = api_instance.list_messages(thread_id, opts)
|
1463
|
+
p result
|
1464
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1465
|
+
puts "Error when calling AssistantsApi->list_messages: #{e}"
|
1466
|
+
end
|
1467
|
+
```
|
1468
|
+
|
1469
|
+
#### Using the list_messages_with_http_info variant
|
1470
|
+
|
1471
|
+
This returns an Array which contains the response data, status code and headers.
|
1472
|
+
|
1473
|
+
> <Array(<ListMessagesResponse>, Integer, Hash)> list_messages_with_http_info(thread_id, opts)
|
1474
|
+
|
1475
|
+
```ruby
|
1476
|
+
begin
|
1477
|
+
# Returns a list of messages for a given thread.
|
1478
|
+
data, status_code, headers = api_instance.list_messages_with_http_info(thread_id, opts)
|
1479
|
+
p status_code # => 2xx
|
1480
|
+
p headers # => { ... }
|
1481
|
+
p data # => <ListMessagesResponse>
|
1482
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1483
|
+
puts "Error when calling AssistantsApi->list_messages_with_http_info: #{e}"
|
1484
|
+
end
|
1485
|
+
```
|
1486
|
+
|
1487
|
+
### Parameters
|
1488
|
+
|
1489
|
+
| Name | Type | Description | Notes |
|
1490
|
+
| ---- | ---- | ----------- | ----- |
|
1491
|
+
| **thread_id** | **String** | The ID of the [thread](/docs/api-reference/threads) the messages belong to. | |
|
1492
|
+
| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional][default to 20] |
|
1493
|
+
| **order** | **String** | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. | [optional][default to 'desc'] |
|
1494
|
+
| **after** | **String** | 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. | [optional] |
|
1495
|
+
| **before** | **String** | 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. | [optional] |
|
1496
|
+
| **run_id** | **String** | Filter messages by the run ID that generated them. | [optional] |
|
1497
|
+
|
1498
|
+
### Return type
|
1499
|
+
|
1500
|
+
[**ListMessagesResponse**](ListMessagesResponse.md)
|
1501
|
+
|
1502
|
+
### Authorization
|
1503
|
+
|
1504
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1505
|
+
|
1506
|
+
### HTTP request headers
|
1507
|
+
|
1508
|
+
- **Content-Type**: Not defined
|
1509
|
+
- **Accept**: application/json
|
1510
|
+
|
1511
|
+
|
1512
|
+
## list_run_steps
|
1513
|
+
|
1514
|
+
> <ListRunStepsResponse> list_run_steps(thread_id, run_id, opts)
|
1515
|
+
|
1516
|
+
Returns a list of run steps belonging to a run.
|
1517
|
+
|
1518
|
+
### Examples
|
1519
|
+
|
1520
|
+
```ruby
|
1521
|
+
require 'time'
|
1522
|
+
require 'openapi_openai'
|
1523
|
+
# setup authorization
|
1524
|
+
OpenApiOpenAIClient.configure do |config|
|
1525
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1526
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1527
|
+
end
|
1528
|
+
|
1529
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1530
|
+
thread_id = 'thread_id_example' # String | The ID of the thread the run and run steps belong to.
|
1531
|
+
run_id = 'run_id_example' # String | The ID of the run the run steps belong to.
|
1532
|
+
opts = {
|
1533
|
+
limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
|
1534
|
+
order: 'asc', # String | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
|
1535
|
+
after: 'after_example', # String | 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.
|
1536
|
+
before: 'before_example' # String | 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.
|
1537
|
+
}
|
1538
|
+
|
1539
|
+
begin
|
1540
|
+
# Returns a list of run steps belonging to a run.
|
1541
|
+
result = api_instance.list_run_steps(thread_id, run_id, opts)
|
1542
|
+
p result
|
1543
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1544
|
+
puts "Error when calling AssistantsApi->list_run_steps: #{e}"
|
1545
|
+
end
|
1546
|
+
```
|
1547
|
+
|
1548
|
+
#### Using the list_run_steps_with_http_info variant
|
1549
|
+
|
1550
|
+
This returns an Array which contains the response data, status code and headers.
|
1551
|
+
|
1552
|
+
> <Array(<ListRunStepsResponse>, Integer, Hash)> list_run_steps_with_http_info(thread_id, run_id, opts)
|
1553
|
+
|
1554
|
+
```ruby
|
1555
|
+
begin
|
1556
|
+
# Returns a list of run steps belonging to a run.
|
1557
|
+
data, status_code, headers = api_instance.list_run_steps_with_http_info(thread_id, run_id, opts)
|
1558
|
+
p status_code # => 2xx
|
1559
|
+
p headers # => { ... }
|
1560
|
+
p data # => <ListRunStepsResponse>
|
1561
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1562
|
+
puts "Error when calling AssistantsApi->list_run_steps_with_http_info: #{e}"
|
1563
|
+
end
|
1564
|
+
```
|
1565
|
+
|
1566
|
+
### Parameters
|
1567
|
+
|
1568
|
+
| Name | Type | Description | Notes |
|
1569
|
+
| ---- | ---- | ----------- | ----- |
|
1570
|
+
| **thread_id** | **String** | The ID of the thread the run and run steps belong to. | |
|
1571
|
+
| **run_id** | **String** | The ID of the run the run steps belong to. | |
|
1572
|
+
| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional][default to 20] |
|
1573
|
+
| **order** | **String** | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. | [optional][default to 'desc'] |
|
1574
|
+
| **after** | **String** | 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. | [optional] |
|
1575
|
+
| **before** | **String** | 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. | [optional] |
|
1576
|
+
|
1577
|
+
### Return type
|
1578
|
+
|
1579
|
+
[**ListRunStepsResponse**](ListRunStepsResponse.md)
|
1580
|
+
|
1581
|
+
### Authorization
|
1582
|
+
|
1583
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1584
|
+
|
1585
|
+
### HTTP request headers
|
1586
|
+
|
1587
|
+
- **Content-Type**: Not defined
|
1588
|
+
- **Accept**: application/json
|
1589
|
+
|
1590
|
+
|
1591
|
+
## list_runs
|
1592
|
+
|
1593
|
+
> <ListRunsResponse> list_runs(thread_id, opts)
|
1594
|
+
|
1595
|
+
Returns a list of runs belonging to a thread.
|
1596
|
+
|
1597
|
+
### Examples
|
1598
|
+
|
1599
|
+
```ruby
|
1600
|
+
require 'time'
|
1601
|
+
require 'openapi_openai'
|
1602
|
+
# setup authorization
|
1603
|
+
OpenApiOpenAIClient.configure do |config|
|
1604
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1605
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1606
|
+
end
|
1607
|
+
|
1608
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1609
|
+
thread_id = 'thread_id_example' # String | The ID of the thread the run belongs to.
|
1610
|
+
opts = {
|
1611
|
+
limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
|
1612
|
+
order: 'asc', # String | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order.
|
1613
|
+
after: 'after_example', # String | 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.
|
1614
|
+
before: 'before_example' # String | 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.
|
1615
|
+
}
|
1616
|
+
|
1617
|
+
begin
|
1618
|
+
# Returns a list of runs belonging to a thread.
|
1619
|
+
result = api_instance.list_runs(thread_id, opts)
|
1620
|
+
p result
|
1621
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1622
|
+
puts "Error when calling AssistantsApi->list_runs: #{e}"
|
1623
|
+
end
|
1624
|
+
```
|
1625
|
+
|
1626
|
+
#### Using the list_runs_with_http_info variant
|
1627
|
+
|
1628
|
+
This returns an Array which contains the response data, status code and headers.
|
1629
|
+
|
1630
|
+
> <Array(<ListRunsResponse>, Integer, Hash)> list_runs_with_http_info(thread_id, opts)
|
1631
|
+
|
1632
|
+
```ruby
|
1633
|
+
begin
|
1634
|
+
# Returns a list of runs belonging to a thread.
|
1635
|
+
data, status_code, headers = api_instance.list_runs_with_http_info(thread_id, opts)
|
1636
|
+
p status_code # => 2xx
|
1637
|
+
p headers # => { ... }
|
1638
|
+
p data # => <ListRunsResponse>
|
1639
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1640
|
+
puts "Error when calling AssistantsApi->list_runs_with_http_info: #{e}"
|
1641
|
+
end
|
1642
|
+
```
|
1643
|
+
|
1644
|
+
### Parameters
|
1645
|
+
|
1646
|
+
| Name | Type | Description | Notes |
|
1647
|
+
| ---- | ---- | ----------- | ----- |
|
1648
|
+
| **thread_id** | **String** | The ID of the thread the run belongs to. | |
|
1649
|
+
| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. | [optional][default to 20] |
|
1650
|
+
| **order** | **String** | Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and `desc` for descending order. | [optional][default to 'desc'] |
|
1651
|
+
| **after** | **String** | 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. | [optional] |
|
1652
|
+
| **before** | **String** | 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. | [optional] |
|
1653
|
+
|
1654
|
+
### Return type
|
1655
|
+
|
1656
|
+
[**ListRunsResponse**](ListRunsResponse.md)
|
1657
|
+
|
1658
|
+
### Authorization
|
1659
|
+
|
1660
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1661
|
+
|
1662
|
+
### HTTP request headers
|
1663
|
+
|
1664
|
+
- **Content-Type**: Not defined
|
1665
|
+
- **Accept**: application/json
|
1666
|
+
|
1667
|
+
|
1668
|
+
## modify_assistant
|
1669
|
+
|
1670
|
+
> <AssistantObject> modify_assistant(assistant_id, modify_assistant_request)
|
1671
|
+
|
1672
|
+
Modifies an assistant.
|
1673
|
+
|
1674
|
+
### Examples
|
1675
|
+
|
1676
|
+
```ruby
|
1677
|
+
require 'time'
|
1678
|
+
require 'openapi_openai'
|
1679
|
+
# setup authorization
|
1680
|
+
OpenApiOpenAIClient.configure do |config|
|
1681
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1682
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1683
|
+
end
|
1684
|
+
|
1685
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1686
|
+
assistant_id = 'assistant_id_example' # String | The ID of the assistant to modify.
|
1687
|
+
modify_assistant_request = OpenApiOpenAIClient::ModifyAssistantRequest.new # ModifyAssistantRequest |
|
1688
|
+
|
1689
|
+
begin
|
1690
|
+
# Modifies an assistant.
|
1691
|
+
result = api_instance.modify_assistant(assistant_id, modify_assistant_request)
|
1692
|
+
p result
|
1693
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1694
|
+
puts "Error when calling AssistantsApi->modify_assistant: #{e}"
|
1695
|
+
end
|
1696
|
+
```
|
1697
|
+
|
1698
|
+
#### Using the modify_assistant_with_http_info variant
|
1699
|
+
|
1700
|
+
This returns an Array which contains the response data, status code and headers.
|
1701
|
+
|
1702
|
+
> <Array(<AssistantObject>, Integer, Hash)> modify_assistant_with_http_info(assistant_id, modify_assistant_request)
|
1703
|
+
|
1704
|
+
```ruby
|
1705
|
+
begin
|
1706
|
+
# Modifies an assistant.
|
1707
|
+
data, status_code, headers = api_instance.modify_assistant_with_http_info(assistant_id, modify_assistant_request)
|
1708
|
+
p status_code # => 2xx
|
1709
|
+
p headers # => { ... }
|
1710
|
+
p data # => <AssistantObject>
|
1711
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1712
|
+
puts "Error when calling AssistantsApi->modify_assistant_with_http_info: #{e}"
|
1713
|
+
end
|
1714
|
+
```
|
1715
|
+
|
1716
|
+
### Parameters
|
1717
|
+
|
1718
|
+
| Name | Type | Description | Notes |
|
1719
|
+
| ---- | ---- | ----------- | ----- |
|
1720
|
+
| **assistant_id** | **String** | The ID of the assistant to modify. | |
|
1721
|
+
| **modify_assistant_request** | [**ModifyAssistantRequest**](ModifyAssistantRequest.md) | | |
|
1722
|
+
|
1723
|
+
### Return type
|
1724
|
+
|
1725
|
+
[**AssistantObject**](AssistantObject.md)
|
1726
|
+
|
1727
|
+
### Authorization
|
1728
|
+
|
1729
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1730
|
+
|
1731
|
+
### HTTP request headers
|
1732
|
+
|
1733
|
+
- **Content-Type**: application/json
|
1734
|
+
- **Accept**: application/json
|
1735
|
+
|
1736
|
+
|
1737
|
+
## modify_message
|
1738
|
+
|
1739
|
+
> <MessageObject> modify_message(thread_id, message_id, modify_message_request)
|
1740
|
+
|
1741
|
+
Modifies a message.
|
1742
|
+
|
1743
|
+
### Examples
|
1744
|
+
|
1745
|
+
```ruby
|
1746
|
+
require 'time'
|
1747
|
+
require 'openapi_openai'
|
1748
|
+
# setup authorization
|
1749
|
+
OpenApiOpenAIClient.configure do |config|
|
1750
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1751
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1752
|
+
end
|
1753
|
+
|
1754
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1755
|
+
thread_id = 'thread_id_example' # String | The ID of the thread to which this message belongs.
|
1756
|
+
message_id = 'message_id_example' # String | The ID of the message to modify.
|
1757
|
+
modify_message_request = OpenApiOpenAIClient::ModifyMessageRequest.new # ModifyMessageRequest |
|
1758
|
+
|
1759
|
+
begin
|
1760
|
+
# Modifies a message.
|
1761
|
+
result = api_instance.modify_message(thread_id, message_id, modify_message_request)
|
1762
|
+
p result
|
1763
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1764
|
+
puts "Error when calling AssistantsApi->modify_message: #{e}"
|
1765
|
+
end
|
1766
|
+
```
|
1767
|
+
|
1768
|
+
#### Using the modify_message_with_http_info variant
|
1769
|
+
|
1770
|
+
This returns an Array which contains the response data, status code and headers.
|
1771
|
+
|
1772
|
+
> <Array(<MessageObject>, Integer, Hash)> modify_message_with_http_info(thread_id, message_id, modify_message_request)
|
1773
|
+
|
1774
|
+
```ruby
|
1775
|
+
begin
|
1776
|
+
# Modifies a message.
|
1777
|
+
data, status_code, headers = api_instance.modify_message_with_http_info(thread_id, message_id, modify_message_request)
|
1778
|
+
p status_code # => 2xx
|
1779
|
+
p headers # => { ... }
|
1780
|
+
p data # => <MessageObject>
|
1781
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1782
|
+
puts "Error when calling AssistantsApi->modify_message_with_http_info: #{e}"
|
1783
|
+
end
|
1784
|
+
```
|
1785
|
+
|
1786
|
+
### Parameters
|
1787
|
+
|
1788
|
+
| Name | Type | Description | Notes |
|
1789
|
+
| ---- | ---- | ----------- | ----- |
|
1790
|
+
| **thread_id** | **String** | The ID of the thread to which this message belongs. | |
|
1791
|
+
| **message_id** | **String** | The ID of the message to modify. | |
|
1792
|
+
| **modify_message_request** | [**ModifyMessageRequest**](ModifyMessageRequest.md) | | |
|
1793
|
+
|
1794
|
+
### Return type
|
1795
|
+
|
1796
|
+
[**MessageObject**](MessageObject.md)
|
1797
|
+
|
1798
|
+
### Authorization
|
1799
|
+
|
1800
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1801
|
+
|
1802
|
+
### HTTP request headers
|
1803
|
+
|
1804
|
+
- **Content-Type**: application/json
|
1805
|
+
- **Accept**: application/json
|
1806
|
+
|
1807
|
+
|
1808
|
+
## modify_run
|
1809
|
+
|
1810
|
+
> <RunObject> modify_run(thread_id, run_id, modify_run_request)
|
1811
|
+
|
1812
|
+
Modifies a run.
|
1813
|
+
|
1814
|
+
### Examples
|
1815
|
+
|
1816
|
+
```ruby
|
1817
|
+
require 'time'
|
1818
|
+
require 'openapi_openai'
|
1819
|
+
# setup authorization
|
1820
|
+
OpenApiOpenAIClient.configure do |config|
|
1821
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1822
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1823
|
+
end
|
1824
|
+
|
1825
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1826
|
+
thread_id = 'thread_id_example' # String | The ID of the [thread](/docs/api-reference/threads) that was run.
|
1827
|
+
run_id = 'run_id_example' # String | The ID of the run to modify.
|
1828
|
+
modify_run_request = OpenApiOpenAIClient::ModifyRunRequest.new # ModifyRunRequest |
|
1829
|
+
|
1830
|
+
begin
|
1831
|
+
# Modifies a run.
|
1832
|
+
result = api_instance.modify_run(thread_id, run_id, modify_run_request)
|
1833
|
+
p result
|
1834
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1835
|
+
puts "Error when calling AssistantsApi->modify_run: #{e}"
|
1836
|
+
end
|
1837
|
+
```
|
1838
|
+
|
1839
|
+
#### Using the modify_run_with_http_info variant
|
1840
|
+
|
1841
|
+
This returns an Array which contains the response data, status code and headers.
|
1842
|
+
|
1843
|
+
> <Array(<RunObject>, Integer, Hash)> modify_run_with_http_info(thread_id, run_id, modify_run_request)
|
1844
|
+
|
1845
|
+
```ruby
|
1846
|
+
begin
|
1847
|
+
# Modifies a run.
|
1848
|
+
data, status_code, headers = api_instance.modify_run_with_http_info(thread_id, run_id, modify_run_request)
|
1849
|
+
p status_code # => 2xx
|
1850
|
+
p headers # => { ... }
|
1851
|
+
p data # => <RunObject>
|
1852
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1853
|
+
puts "Error when calling AssistantsApi->modify_run_with_http_info: #{e}"
|
1854
|
+
end
|
1855
|
+
```
|
1856
|
+
|
1857
|
+
### Parameters
|
1858
|
+
|
1859
|
+
| Name | Type | Description | Notes |
|
1860
|
+
| ---- | ---- | ----------- | ----- |
|
1861
|
+
| **thread_id** | **String** | The ID of the [thread](/docs/api-reference/threads) that was run. | |
|
1862
|
+
| **run_id** | **String** | The ID of the run to modify. | |
|
1863
|
+
| **modify_run_request** | [**ModifyRunRequest**](ModifyRunRequest.md) | | |
|
1864
|
+
|
1865
|
+
### Return type
|
1866
|
+
|
1867
|
+
[**RunObject**](RunObject.md)
|
1868
|
+
|
1869
|
+
### Authorization
|
1870
|
+
|
1871
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1872
|
+
|
1873
|
+
### HTTP request headers
|
1874
|
+
|
1875
|
+
- **Content-Type**: application/json
|
1876
|
+
- **Accept**: application/json
|
1877
|
+
|
1878
|
+
|
1879
|
+
## modify_thread
|
1880
|
+
|
1881
|
+
> <ThreadObject> modify_thread(thread_id, modify_thread_request)
|
1882
|
+
|
1883
|
+
Modifies a thread.
|
1884
|
+
|
1885
|
+
### Examples
|
1886
|
+
|
1887
|
+
```ruby
|
1888
|
+
require 'time'
|
1889
|
+
require 'openapi_openai'
|
1890
|
+
# setup authorization
|
1891
|
+
OpenApiOpenAIClient.configure do |config|
|
1892
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1893
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1894
|
+
end
|
1895
|
+
|
1896
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1897
|
+
thread_id = 'thread_id_example' # String | The ID of the thread to modify. Only the `metadata` can be modified.
|
1898
|
+
modify_thread_request = OpenApiOpenAIClient::ModifyThreadRequest.new # ModifyThreadRequest |
|
1899
|
+
|
1900
|
+
begin
|
1901
|
+
# Modifies a thread.
|
1902
|
+
result = api_instance.modify_thread(thread_id, modify_thread_request)
|
1903
|
+
p result
|
1904
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1905
|
+
puts "Error when calling AssistantsApi->modify_thread: #{e}"
|
1906
|
+
end
|
1907
|
+
```
|
1908
|
+
|
1909
|
+
#### Using the modify_thread_with_http_info variant
|
1910
|
+
|
1911
|
+
This returns an Array which contains the response data, status code and headers.
|
1912
|
+
|
1913
|
+
> <Array(<ThreadObject>, Integer, Hash)> modify_thread_with_http_info(thread_id, modify_thread_request)
|
1914
|
+
|
1915
|
+
```ruby
|
1916
|
+
begin
|
1917
|
+
# Modifies a thread.
|
1918
|
+
data, status_code, headers = api_instance.modify_thread_with_http_info(thread_id, modify_thread_request)
|
1919
|
+
p status_code # => 2xx
|
1920
|
+
p headers # => { ... }
|
1921
|
+
p data # => <ThreadObject>
|
1922
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1923
|
+
puts "Error when calling AssistantsApi->modify_thread_with_http_info: #{e}"
|
1924
|
+
end
|
1925
|
+
```
|
1926
|
+
|
1927
|
+
### Parameters
|
1928
|
+
|
1929
|
+
| Name | Type | Description | Notes |
|
1930
|
+
| ---- | ---- | ----------- | ----- |
|
1931
|
+
| **thread_id** | **String** | The ID of the thread to modify. Only the `metadata` can be modified. | |
|
1932
|
+
| **modify_thread_request** | [**ModifyThreadRequest**](ModifyThreadRequest.md) | | |
|
1933
|
+
|
1934
|
+
### Return type
|
1935
|
+
|
1936
|
+
[**ThreadObject**](ThreadObject.md)
|
1937
|
+
|
1938
|
+
### Authorization
|
1939
|
+
|
1940
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
1941
|
+
|
1942
|
+
### HTTP request headers
|
1943
|
+
|
1944
|
+
- **Content-Type**: application/json
|
1945
|
+
- **Accept**: application/json
|
1946
|
+
|
1947
|
+
|
1948
|
+
## submit_tool_ouputs_to_run
|
1949
|
+
|
1950
|
+
> <RunObject> submit_tool_ouputs_to_run(thread_id, run_id, submit_tool_outputs_run_request)
|
1951
|
+
|
1952
|
+
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.
|
1953
|
+
|
1954
|
+
### Examples
|
1955
|
+
|
1956
|
+
```ruby
|
1957
|
+
require 'time'
|
1958
|
+
require 'openapi_openai'
|
1959
|
+
# setup authorization
|
1960
|
+
OpenApiOpenAIClient.configure do |config|
|
1961
|
+
# Configure Bearer authorization: ApiKeyAuth
|
1962
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
1963
|
+
end
|
1964
|
+
|
1965
|
+
api_instance = OpenApiOpenAIClient::AssistantsApi.new
|
1966
|
+
thread_id = 'thread_id_example' # String | The ID of the [thread](/docs/api-reference/threads) to which this run belongs.
|
1967
|
+
run_id = 'run_id_example' # String | The ID of the run that requires the tool output submission.
|
1968
|
+
submit_tool_outputs_run_request = OpenApiOpenAIClient::SubmitToolOutputsRunRequest.new({tool_outputs: [OpenApiOpenAIClient::SubmitToolOutputsRunRequestToolOutputsInner.new]}) # SubmitToolOutputsRunRequest |
|
1969
|
+
|
1970
|
+
begin
|
1971
|
+
# 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.
|
1972
|
+
result = api_instance.submit_tool_ouputs_to_run(thread_id, run_id, submit_tool_outputs_run_request)
|
1973
|
+
p result
|
1974
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1975
|
+
puts "Error when calling AssistantsApi->submit_tool_ouputs_to_run: #{e}"
|
1976
|
+
end
|
1977
|
+
```
|
1978
|
+
|
1979
|
+
#### Using the submit_tool_ouputs_to_run_with_http_info variant
|
1980
|
+
|
1981
|
+
This returns an Array which contains the response data, status code and headers.
|
1982
|
+
|
1983
|
+
> <Array(<RunObject>, Integer, Hash)> submit_tool_ouputs_to_run_with_http_info(thread_id, run_id, submit_tool_outputs_run_request)
|
1984
|
+
|
1985
|
+
```ruby
|
1986
|
+
begin
|
1987
|
+
# 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.
|
1988
|
+
data, status_code, headers = api_instance.submit_tool_ouputs_to_run_with_http_info(thread_id, run_id, submit_tool_outputs_run_request)
|
1989
|
+
p status_code # => 2xx
|
1990
|
+
p headers # => { ... }
|
1991
|
+
p data # => <RunObject>
|
1992
|
+
rescue OpenApiOpenAIClient::ApiError => e
|
1993
|
+
puts "Error when calling AssistantsApi->submit_tool_ouputs_to_run_with_http_info: #{e}"
|
1994
|
+
end
|
1995
|
+
```
|
1996
|
+
|
1997
|
+
### Parameters
|
1998
|
+
|
1999
|
+
| Name | Type | Description | Notes |
|
2000
|
+
| ---- | ---- | ----------- | ----- |
|
2001
|
+
| **thread_id** | **String** | The ID of the [thread](/docs/api-reference/threads) to which this run belongs. | |
|
2002
|
+
| **run_id** | **String** | The ID of the run that requires the tool output submission. | |
|
2003
|
+
| **submit_tool_outputs_run_request** | [**SubmitToolOutputsRunRequest**](SubmitToolOutputsRunRequest.md) | | |
|
2004
|
+
|
2005
|
+
### Return type
|
2006
|
+
|
2007
|
+
[**RunObject**](RunObject.md)
|
2008
|
+
|
2009
|
+
### Authorization
|
2010
|
+
|
2011
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
2012
|
+
|
2013
|
+
### HTTP request headers
|
2014
|
+
|
2015
|
+
- **Content-Type**: application/json
|
2016
|
+
- **Accept**: application/json
|
2017
|
+
|