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,686 @@
|
|
1
|
+
=begin
|
2
|
+
#OpenAI API
|
3
|
+
|
4
|
+
#The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: blah+oapicf@cliffano.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.4.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module OpenApiOpenAIClient
|
17
|
+
# Represents an execution run on a [thread](/docs/api-reference/threads).
|
18
|
+
class RunObject
|
19
|
+
# The identifier, which can be referenced in API endpoints.
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
# The object type, which is always `thread.run`.
|
23
|
+
attr_accessor :object
|
24
|
+
|
25
|
+
# The Unix timestamp (in seconds) for when the run was created.
|
26
|
+
attr_accessor :created_at
|
27
|
+
|
28
|
+
# The ID of the [thread](/docs/api-reference/threads) that was executed on as a part of this run.
|
29
|
+
attr_accessor :thread_id
|
30
|
+
|
31
|
+
# The ID of the [assistant](/docs/api-reference/assistants) used for execution of this run.
|
32
|
+
attr_accessor :assistant_id
|
33
|
+
|
34
|
+
# The status of the run, which can be either `queued`, `in_progress`, `requires_action`, `cancelling`, `cancelled`, `failed`, `completed`, or `expired`.
|
35
|
+
attr_accessor :status
|
36
|
+
|
37
|
+
attr_accessor :required_action
|
38
|
+
|
39
|
+
attr_accessor :last_error
|
40
|
+
|
41
|
+
# The Unix timestamp (in seconds) for when the run will expire.
|
42
|
+
attr_accessor :expires_at
|
43
|
+
|
44
|
+
# The Unix timestamp (in seconds) for when the run was started.
|
45
|
+
attr_accessor :started_at
|
46
|
+
|
47
|
+
# The Unix timestamp (in seconds) for when the run was cancelled.
|
48
|
+
attr_accessor :cancelled_at
|
49
|
+
|
50
|
+
# The Unix timestamp (in seconds) for when the run failed.
|
51
|
+
attr_accessor :failed_at
|
52
|
+
|
53
|
+
# The Unix timestamp (in seconds) for when the run was completed.
|
54
|
+
attr_accessor :completed_at
|
55
|
+
|
56
|
+
attr_accessor :incomplete_details
|
57
|
+
|
58
|
+
# The model that the [assistant](/docs/api-reference/assistants) used for this run.
|
59
|
+
attr_accessor :model
|
60
|
+
|
61
|
+
# The instructions that the [assistant](/docs/api-reference/assistants) used for this run.
|
62
|
+
attr_accessor :instructions
|
63
|
+
|
64
|
+
# The list of tools that the [assistant](/docs/api-reference/assistants) used for this run.
|
65
|
+
attr_accessor :tools
|
66
|
+
|
67
|
+
# The list of [File](/docs/api-reference/files) IDs the [assistant](/docs/api-reference/assistants) used for this run.
|
68
|
+
attr_accessor :file_ids
|
69
|
+
|
70
|
+
# Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.
|
71
|
+
attr_accessor :metadata
|
72
|
+
|
73
|
+
attr_accessor :usage
|
74
|
+
|
75
|
+
# The sampling temperature used for this run. If not set, defaults to 1.
|
76
|
+
attr_accessor :temperature
|
77
|
+
|
78
|
+
# The maximum number of prompt tokens specified to have been used over the course of the run.
|
79
|
+
attr_accessor :max_prompt_tokens
|
80
|
+
|
81
|
+
# The maximum number of completion tokens specified to have been used over the course of the run.
|
82
|
+
attr_accessor :max_completion_tokens
|
83
|
+
|
84
|
+
attr_accessor :truncation_strategy
|
85
|
+
|
86
|
+
attr_accessor :tool_choice
|
87
|
+
|
88
|
+
attr_accessor :response_format
|
89
|
+
|
90
|
+
class EnumAttributeValidator
|
91
|
+
attr_reader :datatype
|
92
|
+
attr_reader :allowable_values
|
93
|
+
|
94
|
+
def initialize(datatype, allowable_values)
|
95
|
+
@allowable_values = allowable_values.map do |value|
|
96
|
+
case datatype.to_s
|
97
|
+
when /Integer/i
|
98
|
+
value.to_i
|
99
|
+
when /Float/i
|
100
|
+
value.to_f
|
101
|
+
else
|
102
|
+
value
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
def valid?(value)
|
108
|
+
!value || allowable_values.include?(value)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
113
|
+
def self.attribute_map
|
114
|
+
{
|
115
|
+
:'id' => :'id',
|
116
|
+
:'object' => :'object',
|
117
|
+
:'created_at' => :'created_at',
|
118
|
+
:'thread_id' => :'thread_id',
|
119
|
+
:'assistant_id' => :'assistant_id',
|
120
|
+
:'status' => :'status',
|
121
|
+
:'required_action' => :'required_action',
|
122
|
+
:'last_error' => :'last_error',
|
123
|
+
:'expires_at' => :'expires_at',
|
124
|
+
:'started_at' => :'started_at',
|
125
|
+
:'cancelled_at' => :'cancelled_at',
|
126
|
+
:'failed_at' => :'failed_at',
|
127
|
+
:'completed_at' => :'completed_at',
|
128
|
+
:'incomplete_details' => :'incomplete_details',
|
129
|
+
:'model' => :'model',
|
130
|
+
:'instructions' => :'instructions',
|
131
|
+
:'tools' => :'tools',
|
132
|
+
:'file_ids' => :'file_ids',
|
133
|
+
:'metadata' => :'metadata',
|
134
|
+
:'usage' => :'usage',
|
135
|
+
:'temperature' => :'temperature',
|
136
|
+
:'max_prompt_tokens' => :'max_prompt_tokens',
|
137
|
+
:'max_completion_tokens' => :'max_completion_tokens',
|
138
|
+
:'truncation_strategy' => :'truncation_strategy',
|
139
|
+
:'tool_choice' => :'tool_choice',
|
140
|
+
:'response_format' => :'response_format'
|
141
|
+
}
|
142
|
+
end
|
143
|
+
|
144
|
+
# Returns all the JSON keys this model knows about
|
145
|
+
def self.acceptable_attributes
|
146
|
+
attribute_map.values
|
147
|
+
end
|
148
|
+
|
149
|
+
# Attribute type mapping.
|
150
|
+
def self.openapi_types
|
151
|
+
{
|
152
|
+
:'id' => :'String',
|
153
|
+
:'object' => :'String',
|
154
|
+
:'created_at' => :'Integer',
|
155
|
+
:'thread_id' => :'String',
|
156
|
+
:'assistant_id' => :'String',
|
157
|
+
:'status' => :'String',
|
158
|
+
:'required_action' => :'RunObjectRequiredAction',
|
159
|
+
:'last_error' => :'RunObjectLastError',
|
160
|
+
:'expires_at' => :'Integer',
|
161
|
+
:'started_at' => :'Integer',
|
162
|
+
:'cancelled_at' => :'Integer',
|
163
|
+
:'failed_at' => :'Integer',
|
164
|
+
:'completed_at' => :'Integer',
|
165
|
+
:'incomplete_details' => :'RunObjectIncompleteDetails',
|
166
|
+
:'model' => :'String',
|
167
|
+
:'instructions' => :'String',
|
168
|
+
:'tools' => :'Array<AssistantObjectToolsInner>',
|
169
|
+
:'file_ids' => :'Array<String>',
|
170
|
+
:'metadata' => :'Object',
|
171
|
+
:'usage' => :'RunCompletionUsage',
|
172
|
+
:'temperature' => :'Float',
|
173
|
+
:'max_prompt_tokens' => :'Integer',
|
174
|
+
:'max_completion_tokens' => :'Integer',
|
175
|
+
:'truncation_strategy' => :'TruncationObject',
|
176
|
+
:'tool_choice' => :'AssistantsApiToolChoiceOption',
|
177
|
+
:'response_format' => :'AssistantsApiResponseFormatOption'
|
178
|
+
}
|
179
|
+
end
|
180
|
+
|
181
|
+
# List of attributes with nullable: true
|
182
|
+
def self.openapi_nullable
|
183
|
+
Set.new([
|
184
|
+
:'required_action',
|
185
|
+
:'last_error',
|
186
|
+
:'expires_at',
|
187
|
+
:'started_at',
|
188
|
+
:'cancelled_at',
|
189
|
+
:'failed_at',
|
190
|
+
:'completed_at',
|
191
|
+
:'incomplete_details',
|
192
|
+
:'metadata',
|
193
|
+
:'usage',
|
194
|
+
:'temperature',
|
195
|
+
:'max_prompt_tokens',
|
196
|
+
:'max_completion_tokens',
|
197
|
+
])
|
198
|
+
end
|
199
|
+
|
200
|
+
# Initializes the object
|
201
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
202
|
+
def initialize(attributes = {})
|
203
|
+
if (!attributes.is_a?(Hash))
|
204
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `OpenApiOpenAIClient::RunObject` initialize method"
|
205
|
+
end
|
206
|
+
|
207
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
208
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
209
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
210
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `OpenApiOpenAIClient::RunObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
211
|
+
end
|
212
|
+
h[k.to_sym] = v
|
213
|
+
}
|
214
|
+
|
215
|
+
if attributes.key?(:'id')
|
216
|
+
self.id = attributes[:'id']
|
217
|
+
else
|
218
|
+
self.id = nil
|
219
|
+
end
|
220
|
+
|
221
|
+
if attributes.key?(:'object')
|
222
|
+
self.object = attributes[:'object']
|
223
|
+
else
|
224
|
+
self.object = nil
|
225
|
+
end
|
226
|
+
|
227
|
+
if attributes.key?(:'created_at')
|
228
|
+
self.created_at = attributes[:'created_at']
|
229
|
+
else
|
230
|
+
self.created_at = nil
|
231
|
+
end
|
232
|
+
|
233
|
+
if attributes.key?(:'thread_id')
|
234
|
+
self.thread_id = attributes[:'thread_id']
|
235
|
+
else
|
236
|
+
self.thread_id = nil
|
237
|
+
end
|
238
|
+
|
239
|
+
if attributes.key?(:'assistant_id')
|
240
|
+
self.assistant_id = attributes[:'assistant_id']
|
241
|
+
else
|
242
|
+
self.assistant_id = nil
|
243
|
+
end
|
244
|
+
|
245
|
+
if attributes.key?(:'status')
|
246
|
+
self.status = attributes[:'status']
|
247
|
+
else
|
248
|
+
self.status = nil
|
249
|
+
end
|
250
|
+
|
251
|
+
if attributes.key?(:'required_action')
|
252
|
+
self.required_action = attributes[:'required_action']
|
253
|
+
else
|
254
|
+
self.required_action = nil
|
255
|
+
end
|
256
|
+
|
257
|
+
if attributes.key?(:'last_error')
|
258
|
+
self.last_error = attributes[:'last_error']
|
259
|
+
else
|
260
|
+
self.last_error = nil
|
261
|
+
end
|
262
|
+
|
263
|
+
if attributes.key?(:'expires_at')
|
264
|
+
self.expires_at = attributes[:'expires_at']
|
265
|
+
else
|
266
|
+
self.expires_at = nil
|
267
|
+
end
|
268
|
+
|
269
|
+
if attributes.key?(:'started_at')
|
270
|
+
self.started_at = attributes[:'started_at']
|
271
|
+
else
|
272
|
+
self.started_at = nil
|
273
|
+
end
|
274
|
+
|
275
|
+
if attributes.key?(:'cancelled_at')
|
276
|
+
self.cancelled_at = attributes[:'cancelled_at']
|
277
|
+
else
|
278
|
+
self.cancelled_at = nil
|
279
|
+
end
|
280
|
+
|
281
|
+
if attributes.key?(:'failed_at')
|
282
|
+
self.failed_at = attributes[:'failed_at']
|
283
|
+
else
|
284
|
+
self.failed_at = nil
|
285
|
+
end
|
286
|
+
|
287
|
+
if attributes.key?(:'completed_at')
|
288
|
+
self.completed_at = attributes[:'completed_at']
|
289
|
+
else
|
290
|
+
self.completed_at = nil
|
291
|
+
end
|
292
|
+
|
293
|
+
if attributes.key?(:'incomplete_details')
|
294
|
+
self.incomplete_details = attributes[:'incomplete_details']
|
295
|
+
else
|
296
|
+
self.incomplete_details = nil
|
297
|
+
end
|
298
|
+
|
299
|
+
if attributes.key?(:'model')
|
300
|
+
self.model = attributes[:'model']
|
301
|
+
else
|
302
|
+
self.model = nil
|
303
|
+
end
|
304
|
+
|
305
|
+
if attributes.key?(:'instructions')
|
306
|
+
self.instructions = attributes[:'instructions']
|
307
|
+
else
|
308
|
+
self.instructions = nil
|
309
|
+
end
|
310
|
+
|
311
|
+
if attributes.key?(:'tools')
|
312
|
+
if (value = attributes[:'tools']).is_a?(Array)
|
313
|
+
self.tools = value
|
314
|
+
end
|
315
|
+
else
|
316
|
+
self.tools = nil
|
317
|
+
end
|
318
|
+
|
319
|
+
if attributes.key?(:'file_ids')
|
320
|
+
if (value = attributes[:'file_ids']).is_a?(Array)
|
321
|
+
self.file_ids = value
|
322
|
+
end
|
323
|
+
else
|
324
|
+
self.file_ids = nil
|
325
|
+
end
|
326
|
+
|
327
|
+
if attributes.key?(:'metadata')
|
328
|
+
self.metadata = attributes[:'metadata']
|
329
|
+
else
|
330
|
+
self.metadata = nil
|
331
|
+
end
|
332
|
+
|
333
|
+
if attributes.key?(:'usage')
|
334
|
+
self.usage = attributes[:'usage']
|
335
|
+
else
|
336
|
+
self.usage = nil
|
337
|
+
end
|
338
|
+
|
339
|
+
if attributes.key?(:'temperature')
|
340
|
+
self.temperature = attributes[:'temperature']
|
341
|
+
end
|
342
|
+
|
343
|
+
if attributes.key?(:'max_prompt_tokens')
|
344
|
+
self.max_prompt_tokens = attributes[:'max_prompt_tokens']
|
345
|
+
else
|
346
|
+
self.max_prompt_tokens = nil
|
347
|
+
end
|
348
|
+
|
349
|
+
if attributes.key?(:'max_completion_tokens')
|
350
|
+
self.max_completion_tokens = attributes[:'max_completion_tokens']
|
351
|
+
else
|
352
|
+
self.max_completion_tokens = nil
|
353
|
+
end
|
354
|
+
|
355
|
+
if attributes.key?(:'truncation_strategy')
|
356
|
+
self.truncation_strategy = attributes[:'truncation_strategy']
|
357
|
+
else
|
358
|
+
self.truncation_strategy = nil
|
359
|
+
end
|
360
|
+
|
361
|
+
if attributes.key?(:'tool_choice')
|
362
|
+
self.tool_choice = attributes[:'tool_choice']
|
363
|
+
else
|
364
|
+
self.tool_choice = nil
|
365
|
+
end
|
366
|
+
|
367
|
+
if attributes.key?(:'response_format')
|
368
|
+
self.response_format = attributes[:'response_format']
|
369
|
+
else
|
370
|
+
self.response_format = nil
|
371
|
+
end
|
372
|
+
end
|
373
|
+
|
374
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
375
|
+
# @return Array for valid properties with the reasons
|
376
|
+
def list_invalid_properties
|
377
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
378
|
+
invalid_properties = Array.new
|
379
|
+
if @id.nil?
|
380
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
381
|
+
end
|
382
|
+
|
383
|
+
if @object.nil?
|
384
|
+
invalid_properties.push('invalid value for "object", object cannot be nil.')
|
385
|
+
end
|
386
|
+
|
387
|
+
if @created_at.nil?
|
388
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
389
|
+
end
|
390
|
+
|
391
|
+
if @thread_id.nil?
|
392
|
+
invalid_properties.push('invalid value for "thread_id", thread_id cannot be nil.')
|
393
|
+
end
|
394
|
+
|
395
|
+
if @assistant_id.nil?
|
396
|
+
invalid_properties.push('invalid value for "assistant_id", assistant_id cannot be nil.')
|
397
|
+
end
|
398
|
+
|
399
|
+
if @status.nil?
|
400
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
401
|
+
end
|
402
|
+
|
403
|
+
if @model.nil?
|
404
|
+
invalid_properties.push('invalid value for "model", model cannot be nil.')
|
405
|
+
end
|
406
|
+
|
407
|
+
if @instructions.nil?
|
408
|
+
invalid_properties.push('invalid value for "instructions", instructions cannot be nil.')
|
409
|
+
end
|
410
|
+
|
411
|
+
if @tools.nil?
|
412
|
+
invalid_properties.push('invalid value for "tools", tools cannot be nil.')
|
413
|
+
end
|
414
|
+
|
415
|
+
if @tools.length > 20
|
416
|
+
invalid_properties.push('invalid value for "tools", number of items must be less than or equal to 20.')
|
417
|
+
end
|
418
|
+
|
419
|
+
if @file_ids.nil?
|
420
|
+
invalid_properties.push('invalid value for "file_ids", file_ids cannot be nil.')
|
421
|
+
end
|
422
|
+
|
423
|
+
if @max_prompt_tokens < 256
|
424
|
+
invalid_properties.push('invalid value for "max_prompt_tokens", must be greater than or equal to 256.')
|
425
|
+
end
|
426
|
+
|
427
|
+
if @max_completion_tokens < 256
|
428
|
+
invalid_properties.push('invalid value for "max_completion_tokens", must be greater than or equal to 256.')
|
429
|
+
end
|
430
|
+
|
431
|
+
if @truncation_strategy.nil?
|
432
|
+
invalid_properties.push('invalid value for "truncation_strategy", truncation_strategy cannot be nil.')
|
433
|
+
end
|
434
|
+
|
435
|
+
if @tool_choice.nil?
|
436
|
+
invalid_properties.push('invalid value for "tool_choice", tool_choice cannot be nil.')
|
437
|
+
end
|
438
|
+
|
439
|
+
if @response_format.nil?
|
440
|
+
invalid_properties.push('invalid value for "response_format", response_format cannot be nil.')
|
441
|
+
end
|
442
|
+
|
443
|
+
invalid_properties
|
444
|
+
end
|
445
|
+
|
446
|
+
# Check to see if the all the properties in the model are valid
|
447
|
+
# @return true if the model is valid
|
448
|
+
def valid?
|
449
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
450
|
+
return false if @id.nil?
|
451
|
+
return false if @object.nil?
|
452
|
+
object_validator = EnumAttributeValidator.new('String', ["thread.run"])
|
453
|
+
return false unless object_validator.valid?(@object)
|
454
|
+
return false if @created_at.nil?
|
455
|
+
return false if @thread_id.nil?
|
456
|
+
return false if @assistant_id.nil?
|
457
|
+
return false if @status.nil?
|
458
|
+
status_validator = EnumAttributeValidator.new('String', ["queued", "in_progress", "requires_action", "cancelling", "cancelled", "failed", "completed", "expired"])
|
459
|
+
return false unless status_validator.valid?(@status)
|
460
|
+
return false if @model.nil?
|
461
|
+
return false if @instructions.nil?
|
462
|
+
return false if @tools.nil?
|
463
|
+
return false if @tools.length > 20
|
464
|
+
return false if @file_ids.nil?
|
465
|
+
return false if @max_prompt_tokens < 256
|
466
|
+
return false if @max_completion_tokens < 256
|
467
|
+
return false if @truncation_strategy.nil?
|
468
|
+
return false if @tool_choice.nil?
|
469
|
+
return false if @response_format.nil?
|
470
|
+
true
|
471
|
+
end
|
472
|
+
|
473
|
+
# Custom attribute writer method checking allowed values (enum).
|
474
|
+
# @param [Object] object Object to be assigned
|
475
|
+
def object=(object)
|
476
|
+
validator = EnumAttributeValidator.new('String', ["thread.run"])
|
477
|
+
unless validator.valid?(object)
|
478
|
+
fail ArgumentError, "invalid value for \"object\", must be one of #{validator.allowable_values}."
|
479
|
+
end
|
480
|
+
@object = object
|
481
|
+
end
|
482
|
+
|
483
|
+
# Custom attribute writer method checking allowed values (enum).
|
484
|
+
# @param [Object] status Object to be assigned
|
485
|
+
def status=(status)
|
486
|
+
validator = EnumAttributeValidator.new('String', ["queued", "in_progress", "requires_action", "cancelling", "cancelled", "failed", "completed", "expired"])
|
487
|
+
unless validator.valid?(status)
|
488
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
489
|
+
end
|
490
|
+
@status = status
|
491
|
+
end
|
492
|
+
|
493
|
+
# Custom attribute writer method with validation
|
494
|
+
# @param [Object] tools Value to be assigned
|
495
|
+
def tools=(tools)
|
496
|
+
if tools.nil?
|
497
|
+
fail ArgumentError, 'tools cannot be nil'
|
498
|
+
end
|
499
|
+
|
500
|
+
if tools.length > 20
|
501
|
+
fail ArgumentError, 'invalid value for "tools", number of items must be less than or equal to 20.'
|
502
|
+
end
|
503
|
+
|
504
|
+
@tools = tools
|
505
|
+
end
|
506
|
+
|
507
|
+
# Custom attribute writer method with validation
|
508
|
+
# @param [Object] max_prompt_tokens Value to be assigned
|
509
|
+
def max_prompt_tokens=(max_prompt_tokens)
|
510
|
+
if !max_prompt_tokens.nil? && max_prompt_tokens < 256
|
511
|
+
fail ArgumentError, 'invalid value for "max_prompt_tokens", must be greater than or equal to 256.'
|
512
|
+
end
|
513
|
+
|
514
|
+
@max_prompt_tokens = max_prompt_tokens
|
515
|
+
end
|
516
|
+
|
517
|
+
# Custom attribute writer method with validation
|
518
|
+
# @param [Object] max_completion_tokens Value to be assigned
|
519
|
+
def max_completion_tokens=(max_completion_tokens)
|
520
|
+
if !max_completion_tokens.nil? && max_completion_tokens < 256
|
521
|
+
fail ArgumentError, 'invalid value for "max_completion_tokens", must be greater than or equal to 256.'
|
522
|
+
end
|
523
|
+
|
524
|
+
@max_completion_tokens = max_completion_tokens
|
525
|
+
end
|
526
|
+
|
527
|
+
# Checks equality by comparing each attribute.
|
528
|
+
# @param [Object] Object to be compared
|
529
|
+
def ==(o)
|
530
|
+
return true if self.equal?(o)
|
531
|
+
self.class == o.class &&
|
532
|
+
id == o.id &&
|
533
|
+
object == o.object &&
|
534
|
+
created_at == o.created_at &&
|
535
|
+
thread_id == o.thread_id &&
|
536
|
+
assistant_id == o.assistant_id &&
|
537
|
+
status == o.status &&
|
538
|
+
required_action == o.required_action &&
|
539
|
+
last_error == o.last_error &&
|
540
|
+
expires_at == o.expires_at &&
|
541
|
+
started_at == o.started_at &&
|
542
|
+
cancelled_at == o.cancelled_at &&
|
543
|
+
failed_at == o.failed_at &&
|
544
|
+
completed_at == o.completed_at &&
|
545
|
+
incomplete_details == o.incomplete_details &&
|
546
|
+
model == o.model &&
|
547
|
+
instructions == o.instructions &&
|
548
|
+
tools == o.tools &&
|
549
|
+
file_ids == o.file_ids &&
|
550
|
+
metadata == o.metadata &&
|
551
|
+
usage == o.usage &&
|
552
|
+
temperature == o.temperature &&
|
553
|
+
max_prompt_tokens == o.max_prompt_tokens &&
|
554
|
+
max_completion_tokens == o.max_completion_tokens &&
|
555
|
+
truncation_strategy == o.truncation_strategy &&
|
556
|
+
tool_choice == o.tool_choice &&
|
557
|
+
response_format == o.response_format
|
558
|
+
end
|
559
|
+
|
560
|
+
# @see the `==` method
|
561
|
+
# @param [Object] Object to be compared
|
562
|
+
def eql?(o)
|
563
|
+
self == o
|
564
|
+
end
|
565
|
+
|
566
|
+
# Calculates hash code according to all attributes.
|
567
|
+
# @return [Integer] Hash code
|
568
|
+
def hash
|
569
|
+
[id, object, created_at, thread_id, assistant_id, status, required_action, last_error, expires_at, started_at, cancelled_at, failed_at, completed_at, incomplete_details, model, instructions, tools, file_ids, metadata, usage, temperature, max_prompt_tokens, max_completion_tokens, truncation_strategy, tool_choice, response_format].hash
|
570
|
+
end
|
571
|
+
|
572
|
+
# Builds the object from hash
|
573
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
574
|
+
# @return [Object] Returns the model itself
|
575
|
+
def self.build_from_hash(attributes)
|
576
|
+
return nil unless attributes.is_a?(Hash)
|
577
|
+
attributes = attributes.transform_keys(&:to_sym)
|
578
|
+
transformed_hash = {}
|
579
|
+
openapi_types.each_pair do |key, type|
|
580
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
581
|
+
transformed_hash["#{key}"] = nil
|
582
|
+
elsif type =~ /\AArray<(.*)>/i
|
583
|
+
# check to ensure the input is an array given that the attribute
|
584
|
+
# is documented as an array but the input is not
|
585
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
586
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
587
|
+
end
|
588
|
+
elsif !attributes[attribute_map[key]].nil?
|
589
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
590
|
+
end
|
591
|
+
end
|
592
|
+
new(transformed_hash)
|
593
|
+
end
|
594
|
+
|
595
|
+
# Deserializes the data based on type
|
596
|
+
# @param string type Data type
|
597
|
+
# @param string value Value to be deserialized
|
598
|
+
# @return [Object] Deserialized data
|
599
|
+
def self._deserialize(type, value)
|
600
|
+
case type.to_sym
|
601
|
+
when :Time
|
602
|
+
Time.parse(value)
|
603
|
+
when :Date
|
604
|
+
Date.parse(value)
|
605
|
+
when :String
|
606
|
+
value.to_s
|
607
|
+
when :Integer
|
608
|
+
value.to_i
|
609
|
+
when :Float
|
610
|
+
value.to_f
|
611
|
+
when :Boolean
|
612
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
613
|
+
true
|
614
|
+
else
|
615
|
+
false
|
616
|
+
end
|
617
|
+
when :Object
|
618
|
+
# generic object (usually a Hash), return directly
|
619
|
+
value
|
620
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
621
|
+
inner_type = Regexp.last_match[:inner_type]
|
622
|
+
value.map { |v| _deserialize(inner_type, v) }
|
623
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
624
|
+
k_type = Regexp.last_match[:k_type]
|
625
|
+
v_type = Regexp.last_match[:v_type]
|
626
|
+
{}.tap do |hash|
|
627
|
+
value.each do |k, v|
|
628
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
629
|
+
end
|
630
|
+
end
|
631
|
+
else # model
|
632
|
+
# models (e.g. Pet) or oneOf
|
633
|
+
klass = OpenApiOpenAIClient.const_get(type)
|
634
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
635
|
+
end
|
636
|
+
end
|
637
|
+
|
638
|
+
# Returns the string representation of the object
|
639
|
+
# @return [String] String presentation of the object
|
640
|
+
def to_s
|
641
|
+
to_hash.to_s
|
642
|
+
end
|
643
|
+
|
644
|
+
# to_body is an alias to to_hash (backward compatibility)
|
645
|
+
# @return [Hash] Returns the object in the form of hash
|
646
|
+
def to_body
|
647
|
+
to_hash
|
648
|
+
end
|
649
|
+
|
650
|
+
# Returns the object in the form of hash
|
651
|
+
# @return [Hash] Returns the object in the form of hash
|
652
|
+
def to_hash
|
653
|
+
hash = {}
|
654
|
+
self.class.attribute_map.each_pair do |attr, param|
|
655
|
+
value = self.send(attr)
|
656
|
+
if value.nil?
|
657
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
658
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
659
|
+
end
|
660
|
+
|
661
|
+
hash[param] = _to_hash(value)
|
662
|
+
end
|
663
|
+
hash
|
664
|
+
end
|
665
|
+
|
666
|
+
# Outputs non-array value in the form of hash
|
667
|
+
# For object, use to_hash. Otherwise, just return the value
|
668
|
+
# @param [Object] value Any valid value
|
669
|
+
# @return [Hash] Returns the value in the form of hash
|
670
|
+
def _to_hash(value)
|
671
|
+
if value.is_a?(Array)
|
672
|
+
value.compact.map { |v| _to_hash(v) }
|
673
|
+
elsif value.is_a?(Hash)
|
674
|
+
{}.tap do |hash|
|
675
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
676
|
+
end
|
677
|
+
elsif value.respond_to? :to_hash
|
678
|
+
value.to_hash
|
679
|
+
else
|
680
|
+
value
|
681
|
+
end
|
682
|
+
end
|
683
|
+
|
684
|
+
end
|
685
|
+
|
686
|
+
end
|