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
@@ -1,7 +1,7 @@
|
|
1
1
|
=begin
|
2
2
|
#OpenAI API
|
3
3
|
|
4
|
-
#
|
4
|
+
#The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
|
5
5
|
|
6
6
|
The version of the OpenAPI document: 2.0.0
|
7
7
|
Contact: blah+oapicf@cliffano.com
|
@@ -15,62 +15,84 @@ require 'time'
|
|
15
15
|
|
16
16
|
module OpenApiOpenAIClient
|
17
17
|
class CreateChatCompletionRequest
|
18
|
+
# A list of messages comprising the conversation so far. [Example Python code](https://cookbook.openai.com/examples/how_to_format_inputs_to_chatgpt_models).
|
19
|
+
attr_accessor :messages
|
20
|
+
|
18
21
|
attr_accessor :model
|
19
22
|
|
20
|
-
#
|
21
|
-
attr_accessor :
|
23
|
+
# Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. [See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)
|
24
|
+
attr_accessor :frequency_penalty
|
22
25
|
|
23
|
-
#
|
24
|
-
attr_accessor :
|
26
|
+
# Modify the likelihood of specified tokens appearing in the completion. Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
|
27
|
+
attr_accessor :logit_bias
|
25
28
|
|
26
|
-
|
29
|
+
# Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.
|
30
|
+
attr_accessor :logprobs
|
27
31
|
|
28
|
-
#
|
29
|
-
attr_accessor :
|
32
|
+
# An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.
|
33
|
+
attr_accessor :top_logprobs
|
30
34
|
|
31
|
-
#
|
32
|
-
attr_accessor :
|
35
|
+
# The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. The total length of input tokens and generated tokens is limited by the model's context length. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.
|
36
|
+
attr_accessor :max_tokens
|
33
37
|
|
34
|
-
# How many chat completion choices to generate for each input message.
|
38
|
+
# How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.
|
35
39
|
attr_accessor :n
|
36
40
|
|
37
|
-
#
|
38
|
-
attr_accessor :
|
41
|
+
# Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. [See more information about frequency and presence penalties.](/docs/guides/text-generation/parameter-details)
|
42
|
+
attr_accessor :presence_penalty
|
43
|
+
|
44
|
+
attr_accessor :response_format
|
45
|
+
|
46
|
+
# This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same `seed` and parameters should return the same result. Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.
|
47
|
+
attr_accessor :seed
|
39
48
|
|
40
49
|
attr_accessor :stop
|
41
50
|
|
42
|
-
#
|
43
|
-
attr_accessor :
|
51
|
+
# If set, partial message deltas will be sent, like in ChatGPT. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).
|
52
|
+
attr_accessor :stream
|
44
53
|
|
45
|
-
#
|
46
|
-
attr_accessor :
|
54
|
+
# What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both.
|
55
|
+
attr_accessor :temperature
|
47
56
|
|
48
|
-
#
|
49
|
-
attr_accessor :
|
57
|
+
# An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both.
|
58
|
+
attr_accessor :top_p
|
50
59
|
|
51
|
-
#
|
52
|
-
attr_accessor :
|
60
|
+
# A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
|
61
|
+
attr_accessor :tools
|
62
|
+
|
63
|
+
attr_accessor :tool_choice
|
53
64
|
|
54
65
|
# A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices/end-user-ids).
|
55
66
|
attr_accessor :user
|
56
67
|
|
68
|
+
attr_accessor :function_call
|
69
|
+
|
70
|
+
# Deprecated in favor of `tools`. A list of functions the model may generate JSON inputs for.
|
71
|
+
attr_accessor :functions
|
72
|
+
|
57
73
|
# Attribute mapping from ruby-style variable name to JSON key.
|
58
74
|
def self.attribute_map
|
59
75
|
{
|
60
|
-
:'model' => :'model',
|
61
76
|
:'messages' => :'messages',
|
62
|
-
:'
|
63
|
-
:'function_call' => :'function_call',
|
64
|
-
:'temperature' => :'temperature',
|
65
|
-
:'top_p' => :'top_p',
|
66
|
-
:'n' => :'n',
|
67
|
-
:'stream' => :'stream',
|
68
|
-
:'stop' => :'stop',
|
69
|
-
:'max_tokens' => :'max_tokens',
|
70
|
-
:'presence_penalty' => :'presence_penalty',
|
77
|
+
:'model' => :'model',
|
71
78
|
:'frequency_penalty' => :'frequency_penalty',
|
72
79
|
:'logit_bias' => :'logit_bias',
|
73
|
-
:'
|
80
|
+
:'logprobs' => :'logprobs',
|
81
|
+
:'top_logprobs' => :'top_logprobs',
|
82
|
+
:'max_tokens' => :'max_tokens',
|
83
|
+
:'n' => :'n',
|
84
|
+
:'presence_penalty' => :'presence_penalty',
|
85
|
+
:'response_format' => :'response_format',
|
86
|
+
:'seed' => :'seed',
|
87
|
+
:'stop' => :'stop',
|
88
|
+
:'stream' => :'stream',
|
89
|
+
:'temperature' => :'temperature',
|
90
|
+
:'top_p' => :'top_p',
|
91
|
+
:'tools' => :'tools',
|
92
|
+
:'tool_choice' => :'tool_choice',
|
93
|
+
:'user' => :'user',
|
94
|
+
:'function_call' => :'function_call',
|
95
|
+
:'functions' => :'functions'
|
74
96
|
}
|
75
97
|
end
|
76
98
|
|
@@ -82,33 +104,43 @@ module OpenApiOpenAIClient
|
|
82
104
|
# Attribute type mapping.
|
83
105
|
def self.openapi_types
|
84
106
|
{
|
85
|
-
:'model' => :'CreateChatCompletionRequestModel',
|
86
107
|
:'messages' => :'Array<ChatCompletionRequestMessage>',
|
87
|
-
:'
|
88
|
-
:'
|
89
|
-
:'
|
90
|
-
:'
|
91
|
-
:'
|
92
|
-
:'stream' => :'Boolean',
|
93
|
-
:'stop' => :'CreateChatCompletionRequestStop',
|
108
|
+
:'model' => :'CreateChatCompletionRequestModel',
|
109
|
+
:'frequency_penalty' => :'Float',
|
110
|
+
:'logit_bias' => :'Hash<String, Integer>',
|
111
|
+
:'logprobs' => :'Boolean',
|
112
|
+
:'top_logprobs' => :'Integer',
|
94
113
|
:'max_tokens' => :'Integer',
|
114
|
+
:'n' => :'Integer',
|
95
115
|
:'presence_penalty' => :'Float',
|
96
|
-
:'
|
97
|
-
:'
|
98
|
-
:'
|
116
|
+
:'response_format' => :'CreateChatCompletionRequestResponseFormat',
|
117
|
+
:'seed' => :'Integer',
|
118
|
+
:'stop' => :'CreateChatCompletionRequestStop',
|
119
|
+
:'stream' => :'Boolean',
|
120
|
+
:'temperature' => :'Float',
|
121
|
+
:'top_p' => :'Float',
|
122
|
+
:'tools' => :'Array<ChatCompletionTool>',
|
123
|
+
:'tool_choice' => :'ChatCompletionToolChoiceOption',
|
124
|
+
:'user' => :'String',
|
125
|
+
:'function_call' => :'CreateChatCompletionRequestFunctionCall',
|
126
|
+
:'functions' => :'Array<ChatCompletionFunctions>'
|
99
127
|
}
|
100
128
|
end
|
101
129
|
|
102
130
|
# List of attributes with nullable: true
|
103
131
|
def self.openapi_nullable
|
104
132
|
Set.new([
|
105
|
-
:'temperature',
|
106
|
-
:'top_p',
|
107
|
-
:'n',
|
108
|
-
:'stream',
|
109
|
-
:'presence_penalty',
|
110
133
|
:'frequency_penalty',
|
111
134
|
:'logit_bias',
|
135
|
+
:'logprobs',
|
136
|
+
:'top_logprobs',
|
137
|
+
:'max_tokens',
|
138
|
+
:'n',
|
139
|
+
:'presence_penalty',
|
140
|
+
:'seed',
|
141
|
+
:'stream',
|
142
|
+
:'temperature',
|
143
|
+
:'top_p',
|
112
144
|
])
|
113
145
|
end
|
114
146
|
|
@@ -127,40 +159,44 @@ module OpenApiOpenAIClient
|
|
127
159
|
h[k.to_sym] = v
|
128
160
|
}
|
129
161
|
|
162
|
+
if attributes.key?(:'messages')
|
163
|
+
if (value = attributes[:'messages']).is_a?(Array)
|
164
|
+
self.messages = value
|
165
|
+
end
|
166
|
+
else
|
167
|
+
self.messages = nil
|
168
|
+
end
|
169
|
+
|
130
170
|
if attributes.key?(:'model')
|
131
171
|
self.model = attributes[:'model']
|
132
172
|
else
|
133
173
|
self.model = nil
|
134
174
|
end
|
135
175
|
|
136
|
-
if attributes.key?(:'
|
137
|
-
|
138
|
-
self.messages = value
|
139
|
-
end
|
176
|
+
if attributes.key?(:'frequency_penalty')
|
177
|
+
self.frequency_penalty = attributes[:'frequency_penalty']
|
140
178
|
else
|
141
|
-
self.
|
179
|
+
self.frequency_penalty = 0
|
142
180
|
end
|
143
181
|
|
144
|
-
if attributes.key?(:'
|
145
|
-
if (value = attributes[:'
|
146
|
-
self.
|
182
|
+
if attributes.key?(:'logit_bias')
|
183
|
+
if (value = attributes[:'logit_bias']).is_a?(Hash)
|
184
|
+
self.logit_bias = value
|
147
185
|
end
|
148
186
|
end
|
149
187
|
|
150
|
-
if attributes.key?(:'
|
151
|
-
self.
|
188
|
+
if attributes.key?(:'logprobs')
|
189
|
+
self.logprobs = attributes[:'logprobs']
|
190
|
+
else
|
191
|
+
self.logprobs = false
|
152
192
|
end
|
153
193
|
|
154
|
-
if attributes.key?(:'
|
155
|
-
self.
|
156
|
-
else
|
157
|
-
self.temperature = 1
|
194
|
+
if attributes.key?(:'top_logprobs')
|
195
|
+
self.top_logprobs = attributes[:'top_logprobs']
|
158
196
|
end
|
159
197
|
|
160
|
-
if attributes.key?(:'
|
161
|
-
self.
|
162
|
-
else
|
163
|
-
self.top_p = 1
|
198
|
+
if attributes.key?(:'max_tokens')
|
199
|
+
self.max_tokens = attributes[:'max_tokens']
|
164
200
|
end
|
165
201
|
|
166
202
|
if attributes.key?(:'n')
|
@@ -169,39 +205,65 @@ module OpenApiOpenAIClient
|
|
169
205
|
self.n = 1
|
170
206
|
end
|
171
207
|
|
172
|
-
if attributes.key?(:'
|
173
|
-
self.
|
208
|
+
if attributes.key?(:'presence_penalty')
|
209
|
+
self.presence_penalty = attributes[:'presence_penalty']
|
174
210
|
else
|
175
|
-
self.
|
211
|
+
self.presence_penalty = 0
|
212
|
+
end
|
213
|
+
|
214
|
+
if attributes.key?(:'response_format')
|
215
|
+
self.response_format = attributes[:'response_format']
|
216
|
+
end
|
217
|
+
|
218
|
+
if attributes.key?(:'seed')
|
219
|
+
self.seed = attributes[:'seed']
|
176
220
|
end
|
177
221
|
|
178
222
|
if attributes.key?(:'stop')
|
179
223
|
self.stop = attributes[:'stop']
|
180
224
|
end
|
181
225
|
|
182
|
-
if attributes.key?(:'
|
183
|
-
self.
|
226
|
+
if attributes.key?(:'stream')
|
227
|
+
self.stream = attributes[:'stream']
|
228
|
+
else
|
229
|
+
self.stream = false
|
184
230
|
end
|
185
231
|
|
186
|
-
if attributes.key?(:'
|
187
|
-
self.
|
232
|
+
if attributes.key?(:'temperature')
|
233
|
+
self.temperature = attributes[:'temperature']
|
188
234
|
else
|
189
|
-
self.
|
235
|
+
self.temperature = 1
|
190
236
|
end
|
191
237
|
|
192
|
-
if attributes.key?(:'
|
193
|
-
self.
|
238
|
+
if attributes.key?(:'top_p')
|
239
|
+
self.top_p = attributes[:'top_p']
|
194
240
|
else
|
195
|
-
self.
|
241
|
+
self.top_p = 1
|
196
242
|
end
|
197
243
|
|
198
|
-
if attributes.key?(:'
|
199
|
-
|
244
|
+
if attributes.key?(:'tools')
|
245
|
+
if (value = attributes[:'tools']).is_a?(Array)
|
246
|
+
self.tools = value
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
if attributes.key?(:'tool_choice')
|
251
|
+
self.tool_choice = attributes[:'tool_choice']
|
200
252
|
end
|
201
253
|
|
202
254
|
if attributes.key?(:'user')
|
203
255
|
self.user = attributes[:'user']
|
204
256
|
end
|
257
|
+
|
258
|
+
if attributes.key?(:'function_call')
|
259
|
+
self.function_call = attributes[:'function_call']
|
260
|
+
end
|
261
|
+
|
262
|
+
if attributes.key?(:'functions')
|
263
|
+
if (value = attributes[:'functions']).is_a?(Array)
|
264
|
+
self.functions = value
|
265
|
+
end
|
266
|
+
end
|
205
267
|
end
|
206
268
|
|
207
269
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -209,10 +271,6 @@ module OpenApiOpenAIClient
|
|
209
271
|
def list_invalid_properties
|
210
272
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
211
273
|
invalid_properties = Array.new
|
212
|
-
if @model.nil?
|
213
|
-
invalid_properties.push('invalid value for "model", model cannot be nil.')
|
214
|
-
end
|
215
|
-
|
216
274
|
if @messages.nil?
|
217
275
|
invalid_properties.push('invalid value for "messages", messages cannot be nil.')
|
218
276
|
end
|
@@ -221,24 +279,24 @@ module OpenApiOpenAIClient
|
|
221
279
|
invalid_properties.push('invalid value for "messages", number of items must be greater than or equal to 1.')
|
222
280
|
end
|
223
281
|
|
224
|
-
if
|
225
|
-
invalid_properties.push('invalid value for "
|
282
|
+
if @model.nil?
|
283
|
+
invalid_properties.push('invalid value for "model", model cannot be nil.')
|
226
284
|
end
|
227
285
|
|
228
|
-
if !@
|
229
|
-
invalid_properties.push('invalid value for "
|
286
|
+
if !@frequency_penalty.nil? && @frequency_penalty > 2
|
287
|
+
invalid_properties.push('invalid value for "frequency_penalty", must be smaller than or equal to 2.')
|
230
288
|
end
|
231
289
|
|
232
|
-
if !@
|
233
|
-
invalid_properties.push('invalid value for "
|
290
|
+
if !@frequency_penalty.nil? && @frequency_penalty < -2
|
291
|
+
invalid_properties.push('invalid value for "frequency_penalty", must be greater than or equal to -2.')
|
234
292
|
end
|
235
293
|
|
236
|
-
if !@
|
237
|
-
invalid_properties.push('invalid value for "
|
294
|
+
if !@top_logprobs.nil? && @top_logprobs > 20
|
295
|
+
invalid_properties.push('invalid value for "top_logprobs", must be smaller than or equal to 20.')
|
238
296
|
end
|
239
297
|
|
240
|
-
if !@
|
241
|
-
invalid_properties.push('invalid value for "
|
298
|
+
if !@top_logprobs.nil? && @top_logprobs < 0
|
299
|
+
invalid_properties.push('invalid value for "top_logprobs", must be greater than or equal to 0.')
|
242
300
|
end
|
243
301
|
|
244
302
|
if !@n.nil? && @n > 128
|
@@ -257,12 +315,36 @@ module OpenApiOpenAIClient
|
|
257
315
|
invalid_properties.push('invalid value for "presence_penalty", must be greater than or equal to -2.')
|
258
316
|
end
|
259
317
|
|
260
|
-
if !@
|
261
|
-
invalid_properties.push('invalid value for "
|
318
|
+
if !@seed.nil? && @seed > 9223372036854775807
|
319
|
+
invalid_properties.push('invalid value for "seed", must be smaller than or equal to 9223372036854775807.')
|
262
320
|
end
|
263
321
|
|
264
|
-
if !@
|
265
|
-
invalid_properties.push('invalid value for "
|
322
|
+
if !@seed.nil? && @seed < -9223372036854775808
|
323
|
+
invalid_properties.push('invalid value for "seed", must be greater than or equal to -9223372036854775808.')
|
324
|
+
end
|
325
|
+
|
326
|
+
if !@temperature.nil? && @temperature > 2
|
327
|
+
invalid_properties.push('invalid value for "temperature", must be smaller than or equal to 2.')
|
328
|
+
end
|
329
|
+
|
330
|
+
if !@temperature.nil? && @temperature < 0
|
331
|
+
invalid_properties.push('invalid value for "temperature", must be greater than or equal to 0.')
|
332
|
+
end
|
333
|
+
|
334
|
+
if !@top_p.nil? && @top_p > 1
|
335
|
+
invalid_properties.push('invalid value for "top_p", must be smaller than or equal to 1.')
|
336
|
+
end
|
337
|
+
|
338
|
+
if !@top_p.nil? && @top_p < 0
|
339
|
+
invalid_properties.push('invalid value for "top_p", must be greater than or equal to 0.')
|
340
|
+
end
|
341
|
+
|
342
|
+
if !@functions.nil? && @functions.length > 128
|
343
|
+
invalid_properties.push('invalid value for "functions", number of items must be less than or equal to 128.')
|
344
|
+
end
|
345
|
+
|
346
|
+
if !@functions.nil? && @functions.length < 1
|
347
|
+
invalid_properties.push('invalid value for "functions", number of items must be greater than or equal to 1.')
|
266
348
|
end
|
267
349
|
|
268
350
|
invalid_properties
|
@@ -272,20 +354,25 @@ module OpenApiOpenAIClient
|
|
272
354
|
# @return true if the model is valid
|
273
355
|
def valid?
|
274
356
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
275
|
-
return false if @model.nil?
|
276
357
|
return false if @messages.nil?
|
277
358
|
return false if @messages.length < 1
|
278
|
-
return false if
|
279
|
-
return false if !@
|
280
|
-
return false if !@
|
281
|
-
return false if !@
|
282
|
-
return false if !@
|
359
|
+
return false if @model.nil?
|
360
|
+
return false if !@frequency_penalty.nil? && @frequency_penalty > 2
|
361
|
+
return false if !@frequency_penalty.nil? && @frequency_penalty < -2
|
362
|
+
return false if !@top_logprobs.nil? && @top_logprobs > 20
|
363
|
+
return false if !@top_logprobs.nil? && @top_logprobs < 0
|
283
364
|
return false if !@n.nil? && @n > 128
|
284
365
|
return false if !@n.nil? && @n < 1
|
285
366
|
return false if !@presence_penalty.nil? && @presence_penalty > 2
|
286
367
|
return false if !@presence_penalty.nil? && @presence_penalty < -2
|
287
|
-
return false if !@
|
288
|
-
return false if !@
|
368
|
+
return false if !@seed.nil? && @seed > 9223372036854775807
|
369
|
+
return false if !@seed.nil? && @seed < -9223372036854775808
|
370
|
+
return false if !@temperature.nil? && @temperature > 2
|
371
|
+
return false if !@temperature.nil? && @temperature < 0
|
372
|
+
return false if !@top_p.nil? && @top_p > 1
|
373
|
+
return false if !@top_p.nil? && @top_p < 0
|
374
|
+
return false if !@functions.nil? && @functions.length > 128
|
375
|
+
return false if !@functions.nil? && @functions.length < 1
|
289
376
|
true
|
290
377
|
end
|
291
378
|
|
@@ -304,45 +391,31 @@ module OpenApiOpenAIClient
|
|
304
391
|
end
|
305
392
|
|
306
393
|
# Custom attribute writer method with validation
|
307
|
-
# @param [Object]
|
308
|
-
def
|
309
|
-
if
|
310
|
-
fail ArgumentError, '
|
311
|
-
end
|
312
|
-
|
313
|
-
if functions.length < 1
|
314
|
-
fail ArgumentError, 'invalid value for "functions", number of items must be greater than or equal to 1.'
|
315
|
-
end
|
316
|
-
|
317
|
-
@functions = functions
|
318
|
-
end
|
319
|
-
|
320
|
-
# Custom attribute writer method with validation
|
321
|
-
# @param [Object] temperature Value to be assigned
|
322
|
-
def temperature=(temperature)
|
323
|
-
if !temperature.nil? && temperature > 2
|
324
|
-
fail ArgumentError, 'invalid value for "temperature", must be smaller than or equal to 2.'
|
394
|
+
# @param [Object] frequency_penalty Value to be assigned
|
395
|
+
def frequency_penalty=(frequency_penalty)
|
396
|
+
if !frequency_penalty.nil? && frequency_penalty > 2
|
397
|
+
fail ArgumentError, 'invalid value for "frequency_penalty", must be smaller than or equal to 2.'
|
325
398
|
end
|
326
399
|
|
327
|
-
if !
|
328
|
-
fail ArgumentError, 'invalid value for "
|
400
|
+
if !frequency_penalty.nil? && frequency_penalty < -2
|
401
|
+
fail ArgumentError, 'invalid value for "frequency_penalty", must be greater than or equal to -2.'
|
329
402
|
end
|
330
403
|
|
331
|
-
@
|
404
|
+
@frequency_penalty = frequency_penalty
|
332
405
|
end
|
333
406
|
|
334
407
|
# Custom attribute writer method with validation
|
335
|
-
# @param [Object]
|
336
|
-
def
|
337
|
-
if !
|
338
|
-
fail ArgumentError, 'invalid value for "
|
408
|
+
# @param [Object] top_logprobs Value to be assigned
|
409
|
+
def top_logprobs=(top_logprobs)
|
410
|
+
if !top_logprobs.nil? && top_logprobs > 20
|
411
|
+
fail ArgumentError, 'invalid value for "top_logprobs", must be smaller than or equal to 20.'
|
339
412
|
end
|
340
413
|
|
341
|
-
if !
|
342
|
-
fail ArgumentError, 'invalid value for "
|
414
|
+
if !top_logprobs.nil? && top_logprobs < 0
|
415
|
+
fail ArgumentError, 'invalid value for "top_logprobs", must be greater than or equal to 0.'
|
343
416
|
end
|
344
417
|
|
345
|
-
@
|
418
|
+
@top_logprobs = top_logprobs
|
346
419
|
end
|
347
420
|
|
348
421
|
# Custom attribute writer method with validation
|
@@ -374,17 +447,63 @@ module OpenApiOpenAIClient
|
|
374
447
|
end
|
375
448
|
|
376
449
|
# Custom attribute writer method with validation
|
377
|
-
# @param [Object]
|
378
|
-
def
|
379
|
-
if !
|
380
|
-
fail ArgumentError, 'invalid value for "
|
450
|
+
# @param [Object] seed Value to be assigned
|
451
|
+
def seed=(seed)
|
452
|
+
if !seed.nil? && seed > 9223372036854775807
|
453
|
+
fail ArgumentError, 'invalid value for "seed", must be smaller than or equal to 9223372036854775807.'
|
381
454
|
end
|
382
455
|
|
383
|
-
if !
|
384
|
-
fail ArgumentError, 'invalid value for "
|
456
|
+
if !seed.nil? && seed < -9223372036854775808
|
457
|
+
fail ArgumentError, 'invalid value for "seed", must be greater than or equal to -9223372036854775808.'
|
385
458
|
end
|
386
459
|
|
387
|
-
@
|
460
|
+
@seed = seed
|
461
|
+
end
|
462
|
+
|
463
|
+
# Custom attribute writer method with validation
|
464
|
+
# @param [Object] temperature Value to be assigned
|
465
|
+
def temperature=(temperature)
|
466
|
+
if !temperature.nil? && temperature > 2
|
467
|
+
fail ArgumentError, 'invalid value for "temperature", must be smaller than or equal to 2.'
|
468
|
+
end
|
469
|
+
|
470
|
+
if !temperature.nil? && temperature < 0
|
471
|
+
fail ArgumentError, 'invalid value for "temperature", must be greater than or equal to 0.'
|
472
|
+
end
|
473
|
+
|
474
|
+
@temperature = temperature
|
475
|
+
end
|
476
|
+
|
477
|
+
# Custom attribute writer method with validation
|
478
|
+
# @param [Object] top_p Value to be assigned
|
479
|
+
def top_p=(top_p)
|
480
|
+
if !top_p.nil? && top_p > 1
|
481
|
+
fail ArgumentError, 'invalid value for "top_p", must be smaller than or equal to 1.'
|
482
|
+
end
|
483
|
+
|
484
|
+
if !top_p.nil? && top_p < 0
|
485
|
+
fail ArgumentError, 'invalid value for "top_p", must be greater than or equal to 0.'
|
486
|
+
end
|
487
|
+
|
488
|
+
@top_p = top_p
|
489
|
+
end
|
490
|
+
|
491
|
+
# Custom attribute writer method with validation
|
492
|
+
# @param [Object] functions Value to be assigned
|
493
|
+
def functions=(functions)
|
494
|
+
if functions.nil?
|
495
|
+
fail ArgumentError, 'functions cannot be nil'
|
496
|
+
end
|
497
|
+
|
498
|
+
if functions.length > 128
|
499
|
+
fail ArgumentError, 'invalid value for "functions", number of items must be less than or equal to 128.'
|
500
|
+
end
|
501
|
+
|
502
|
+
if functions.length < 1
|
503
|
+
fail ArgumentError, 'invalid value for "functions", number of items must be greater than or equal to 1.'
|
504
|
+
end
|
505
|
+
|
506
|
+
@functions = functions
|
388
507
|
end
|
389
508
|
|
390
509
|
# Checks equality by comparing each attribute.
|
@@ -392,20 +511,26 @@ module OpenApiOpenAIClient
|
|
392
511
|
def ==(o)
|
393
512
|
return true if self.equal?(o)
|
394
513
|
self.class == o.class &&
|
395
|
-
model == o.model &&
|
396
514
|
messages == o.messages &&
|
397
|
-
|
398
|
-
function_call == o.function_call &&
|
399
|
-
temperature == o.temperature &&
|
400
|
-
top_p == o.top_p &&
|
401
|
-
n == o.n &&
|
402
|
-
stream == o.stream &&
|
403
|
-
stop == o.stop &&
|
404
|
-
max_tokens == o.max_tokens &&
|
405
|
-
presence_penalty == o.presence_penalty &&
|
515
|
+
model == o.model &&
|
406
516
|
frequency_penalty == o.frequency_penalty &&
|
407
517
|
logit_bias == o.logit_bias &&
|
408
|
-
|
518
|
+
logprobs == o.logprobs &&
|
519
|
+
top_logprobs == o.top_logprobs &&
|
520
|
+
max_tokens == o.max_tokens &&
|
521
|
+
n == o.n &&
|
522
|
+
presence_penalty == o.presence_penalty &&
|
523
|
+
response_format == o.response_format &&
|
524
|
+
seed == o.seed &&
|
525
|
+
stop == o.stop &&
|
526
|
+
stream == o.stream &&
|
527
|
+
temperature == o.temperature &&
|
528
|
+
top_p == o.top_p &&
|
529
|
+
tools == o.tools &&
|
530
|
+
tool_choice == o.tool_choice &&
|
531
|
+
user == o.user &&
|
532
|
+
function_call == o.function_call &&
|
533
|
+
functions == o.functions
|
409
534
|
end
|
410
535
|
|
411
536
|
# @see the `==` method
|
@@ -417,7 +542,7 @@ module OpenApiOpenAIClient
|
|
417
542
|
# Calculates hash code according to all attributes.
|
418
543
|
# @return [Integer] Hash code
|
419
544
|
def hash
|
420
|
-
[model,
|
545
|
+
[messages, model, frequency_penalty, logit_bias, logprobs, top_logprobs, max_tokens, n, presence_penalty, response_format, seed, stop, stream, temperature, top_p, tools, tool_choice, user, function_call, functions].hash
|
421
546
|
end
|
422
547
|
|
423
548
|
# Builds the object from hash
|