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
data/docs/OpenAIApi.md
DELETED
@@ -1,1499 +0,0 @@
|
|
1
|
-
# OpenApiOpenAIClient::OpenAIApi
|
2
|
-
|
3
|
-
All URIs are relative to *https://api.openai.com/v1*
|
4
|
-
|
5
|
-
| Method | HTTP request | Description |
|
6
|
-
| ------ | ------------ | ----------- |
|
7
|
-
| [**cancel_fine_tune**](OpenAIApi.md#cancel_fine_tune) | **POST** /fine-tunes/{fine_tune_id}/cancel | Immediately cancel a fine-tune job. |
|
8
|
-
| [**create_chat_completion**](OpenAIApi.md#create_chat_completion) | **POST** /chat/completions | Creates a model response for the given chat conversation. |
|
9
|
-
| [**create_completion**](OpenAIApi.md#create_completion) | **POST** /completions | Creates a completion for the provided prompt and parameters. |
|
10
|
-
| [**create_edit**](OpenAIApi.md#create_edit) | **POST** /edits | Creates a new edit for the provided input, instruction, and parameters. |
|
11
|
-
| [**create_embedding**](OpenAIApi.md#create_embedding) | **POST** /embeddings | Creates an embedding vector representing the input text. |
|
12
|
-
| [**create_file**](OpenAIApi.md#create_file) | **POST** /files | Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit. |
|
13
|
-
| [**create_fine_tune**](OpenAIApi.md#create_fine_tune) | **POST** /fine-tunes | Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning) |
|
14
|
-
| [**create_image**](OpenAIApi.md#create_image) | **POST** /images/generations | Creates an image given a prompt. |
|
15
|
-
| [**create_image_edit**](OpenAIApi.md#create_image_edit) | **POST** /images/edits | Creates an edited or extended image given an original image and a prompt. |
|
16
|
-
| [**create_image_variation**](OpenAIApi.md#create_image_variation) | **POST** /images/variations | Creates a variation of a given image. |
|
17
|
-
| [**create_moderation**](OpenAIApi.md#create_moderation) | **POST** /moderations | Classifies if text violates OpenAI's Content Policy |
|
18
|
-
| [**create_transcription**](OpenAIApi.md#create_transcription) | **POST** /audio/transcriptions | Transcribes audio into the input language. |
|
19
|
-
| [**create_translation**](OpenAIApi.md#create_translation) | **POST** /audio/translations | Translates audio into English. |
|
20
|
-
| [**delete_file**](OpenAIApi.md#delete_file) | **DELETE** /files/{file_id} | Delete a file. |
|
21
|
-
| [**delete_model**](OpenAIApi.md#delete_model) | **DELETE** /models/{model} | Delete a fine-tuned model. You must have the Owner role in your organization. |
|
22
|
-
| [**download_file**](OpenAIApi.md#download_file) | **GET** /files/{file_id}/content | Returns the contents of the specified file |
|
23
|
-
| [**list_files**](OpenAIApi.md#list_files) | **GET** /files | Returns a list of files that belong to the user's organization. |
|
24
|
-
| [**list_fine_tune_events**](OpenAIApi.md#list_fine_tune_events) | **GET** /fine-tunes/{fine_tune_id}/events | Get fine-grained status updates for a fine-tune job. |
|
25
|
-
| [**list_fine_tunes**](OpenAIApi.md#list_fine_tunes) | **GET** /fine-tunes | List your organization's fine-tuning jobs |
|
26
|
-
| [**list_models**](OpenAIApi.md#list_models) | **GET** /models | Lists the currently available models, and provides basic information about each one such as the owner and availability. |
|
27
|
-
| [**retrieve_file**](OpenAIApi.md#retrieve_file) | **GET** /files/{file_id} | Returns information about a specific file. |
|
28
|
-
| [**retrieve_fine_tune**](OpenAIApi.md#retrieve_fine_tune) | **GET** /fine-tunes/{fine_tune_id} | Gets info about the fine-tune job. [Learn more about Fine-tuning](/docs/guides/fine-tuning) |
|
29
|
-
| [**retrieve_model**](OpenAIApi.md#retrieve_model) | **GET** /models/{model} | Retrieves a model instance, providing basic information about the model such as the owner and permissioning. |
|
30
|
-
|
31
|
-
|
32
|
-
## cancel_fine_tune
|
33
|
-
|
34
|
-
> <FineTune> cancel_fine_tune(fine_tune_id)
|
35
|
-
|
36
|
-
Immediately cancel a fine-tune job.
|
37
|
-
|
38
|
-
### Examples
|
39
|
-
|
40
|
-
```ruby
|
41
|
-
require 'time'
|
42
|
-
require 'openapi_openai'
|
43
|
-
|
44
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
45
|
-
fine_tune_id = 'ft-AF1WoRqd3aJAHsqc9NY7iL8F' # String | The ID of the fine-tune job to cancel
|
46
|
-
|
47
|
-
begin
|
48
|
-
# Immediately cancel a fine-tune job.
|
49
|
-
result = api_instance.cancel_fine_tune(fine_tune_id)
|
50
|
-
p result
|
51
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
52
|
-
puts "Error when calling OpenAIApi->cancel_fine_tune: #{e}"
|
53
|
-
end
|
54
|
-
```
|
55
|
-
|
56
|
-
#### Using the cancel_fine_tune_with_http_info variant
|
57
|
-
|
58
|
-
This returns an Array which contains the response data, status code and headers.
|
59
|
-
|
60
|
-
> <Array(<FineTune>, Integer, Hash)> cancel_fine_tune_with_http_info(fine_tune_id)
|
61
|
-
|
62
|
-
```ruby
|
63
|
-
begin
|
64
|
-
# Immediately cancel a fine-tune job.
|
65
|
-
data, status_code, headers = api_instance.cancel_fine_tune_with_http_info(fine_tune_id)
|
66
|
-
p status_code # => 2xx
|
67
|
-
p headers # => { ... }
|
68
|
-
p data # => <FineTune>
|
69
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
70
|
-
puts "Error when calling OpenAIApi->cancel_fine_tune_with_http_info: #{e}"
|
71
|
-
end
|
72
|
-
```
|
73
|
-
|
74
|
-
### Parameters
|
75
|
-
|
76
|
-
| Name | Type | Description | Notes |
|
77
|
-
| ---- | ---- | ----------- | ----- |
|
78
|
-
| **fine_tune_id** | **String** | The ID of the fine-tune job to cancel | |
|
79
|
-
|
80
|
-
### Return type
|
81
|
-
|
82
|
-
[**FineTune**](FineTune.md)
|
83
|
-
|
84
|
-
### Authorization
|
85
|
-
|
86
|
-
No authorization required
|
87
|
-
|
88
|
-
### HTTP request headers
|
89
|
-
|
90
|
-
- **Content-Type**: Not defined
|
91
|
-
- **Accept**: application/json
|
92
|
-
|
93
|
-
|
94
|
-
## create_chat_completion
|
95
|
-
|
96
|
-
> <CreateChatCompletionResponse> create_chat_completion(create_chat_completion_request)
|
97
|
-
|
98
|
-
Creates a model response for the given chat conversation.
|
99
|
-
|
100
|
-
### Examples
|
101
|
-
|
102
|
-
```ruby
|
103
|
-
require 'time'
|
104
|
-
require 'openapi_openai'
|
105
|
-
|
106
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
107
|
-
create_chat_completion_request = OpenApiOpenAIClient::CreateChatCompletionRequest.new({model: nil, messages: [OpenApiOpenAIClient::ChatCompletionRequestMessage.new({role: 'system'})]}) # CreateChatCompletionRequest |
|
108
|
-
|
109
|
-
begin
|
110
|
-
# Creates a model response for the given chat conversation.
|
111
|
-
result = api_instance.create_chat_completion(create_chat_completion_request)
|
112
|
-
p result
|
113
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
114
|
-
puts "Error when calling OpenAIApi->create_chat_completion: #{e}"
|
115
|
-
end
|
116
|
-
```
|
117
|
-
|
118
|
-
#### Using the create_chat_completion_with_http_info variant
|
119
|
-
|
120
|
-
This returns an Array which contains the response data, status code and headers.
|
121
|
-
|
122
|
-
> <Array(<CreateChatCompletionResponse>, Integer, Hash)> create_chat_completion_with_http_info(create_chat_completion_request)
|
123
|
-
|
124
|
-
```ruby
|
125
|
-
begin
|
126
|
-
# Creates a model response for the given chat conversation.
|
127
|
-
data, status_code, headers = api_instance.create_chat_completion_with_http_info(create_chat_completion_request)
|
128
|
-
p status_code # => 2xx
|
129
|
-
p headers # => { ... }
|
130
|
-
p data # => <CreateChatCompletionResponse>
|
131
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
132
|
-
puts "Error when calling OpenAIApi->create_chat_completion_with_http_info: #{e}"
|
133
|
-
end
|
134
|
-
```
|
135
|
-
|
136
|
-
### Parameters
|
137
|
-
|
138
|
-
| Name | Type | Description | Notes |
|
139
|
-
| ---- | ---- | ----------- | ----- |
|
140
|
-
| **create_chat_completion_request** | [**CreateChatCompletionRequest**](CreateChatCompletionRequest.md) | | |
|
141
|
-
|
142
|
-
### Return type
|
143
|
-
|
144
|
-
[**CreateChatCompletionResponse**](CreateChatCompletionResponse.md)
|
145
|
-
|
146
|
-
### Authorization
|
147
|
-
|
148
|
-
No authorization required
|
149
|
-
|
150
|
-
### HTTP request headers
|
151
|
-
|
152
|
-
- **Content-Type**: application/json
|
153
|
-
- **Accept**: application/json
|
154
|
-
|
155
|
-
|
156
|
-
## create_completion
|
157
|
-
|
158
|
-
> <CreateCompletionResponse> create_completion(create_completion_request)
|
159
|
-
|
160
|
-
Creates a completion for the provided prompt and parameters.
|
161
|
-
|
162
|
-
### Examples
|
163
|
-
|
164
|
-
```ruby
|
165
|
-
require 'time'
|
166
|
-
require 'openapi_openai'
|
167
|
-
|
168
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
169
|
-
create_completion_request = OpenApiOpenAIClient::CreateCompletionRequest.new({model: nil, prompt: nil}) # CreateCompletionRequest |
|
170
|
-
|
171
|
-
begin
|
172
|
-
# Creates a completion for the provided prompt and parameters.
|
173
|
-
result = api_instance.create_completion(create_completion_request)
|
174
|
-
p result
|
175
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
176
|
-
puts "Error when calling OpenAIApi->create_completion: #{e}"
|
177
|
-
end
|
178
|
-
```
|
179
|
-
|
180
|
-
#### Using the create_completion_with_http_info variant
|
181
|
-
|
182
|
-
This returns an Array which contains the response data, status code and headers.
|
183
|
-
|
184
|
-
> <Array(<CreateCompletionResponse>, Integer, Hash)> create_completion_with_http_info(create_completion_request)
|
185
|
-
|
186
|
-
```ruby
|
187
|
-
begin
|
188
|
-
# Creates a completion for the provided prompt and parameters.
|
189
|
-
data, status_code, headers = api_instance.create_completion_with_http_info(create_completion_request)
|
190
|
-
p status_code # => 2xx
|
191
|
-
p headers # => { ... }
|
192
|
-
p data # => <CreateCompletionResponse>
|
193
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
194
|
-
puts "Error when calling OpenAIApi->create_completion_with_http_info: #{e}"
|
195
|
-
end
|
196
|
-
```
|
197
|
-
|
198
|
-
### Parameters
|
199
|
-
|
200
|
-
| Name | Type | Description | Notes |
|
201
|
-
| ---- | ---- | ----------- | ----- |
|
202
|
-
| **create_completion_request** | [**CreateCompletionRequest**](CreateCompletionRequest.md) | | |
|
203
|
-
|
204
|
-
### Return type
|
205
|
-
|
206
|
-
[**CreateCompletionResponse**](CreateCompletionResponse.md)
|
207
|
-
|
208
|
-
### Authorization
|
209
|
-
|
210
|
-
No authorization required
|
211
|
-
|
212
|
-
### HTTP request headers
|
213
|
-
|
214
|
-
- **Content-Type**: application/json
|
215
|
-
- **Accept**: application/json
|
216
|
-
|
217
|
-
|
218
|
-
## create_edit
|
219
|
-
|
220
|
-
> <CreateEditResponse> create_edit(create_edit_request)
|
221
|
-
|
222
|
-
Creates a new edit for the provided input, instruction, and parameters.
|
223
|
-
|
224
|
-
### Examples
|
225
|
-
|
226
|
-
```ruby
|
227
|
-
require 'time'
|
228
|
-
require 'openapi_openai'
|
229
|
-
|
230
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
231
|
-
create_edit_request = OpenApiOpenAIClient::CreateEditRequest.new({model: nil, instruction: 'Fix the spelling mistakes.'}) # CreateEditRequest |
|
232
|
-
|
233
|
-
begin
|
234
|
-
# Creates a new edit for the provided input, instruction, and parameters.
|
235
|
-
result = api_instance.create_edit(create_edit_request)
|
236
|
-
p result
|
237
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
238
|
-
puts "Error when calling OpenAIApi->create_edit: #{e}"
|
239
|
-
end
|
240
|
-
```
|
241
|
-
|
242
|
-
#### Using the create_edit_with_http_info variant
|
243
|
-
|
244
|
-
This returns an Array which contains the response data, status code and headers.
|
245
|
-
|
246
|
-
> <Array(<CreateEditResponse>, Integer, Hash)> create_edit_with_http_info(create_edit_request)
|
247
|
-
|
248
|
-
```ruby
|
249
|
-
begin
|
250
|
-
# Creates a new edit for the provided input, instruction, and parameters.
|
251
|
-
data, status_code, headers = api_instance.create_edit_with_http_info(create_edit_request)
|
252
|
-
p status_code # => 2xx
|
253
|
-
p headers # => { ... }
|
254
|
-
p data # => <CreateEditResponse>
|
255
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
256
|
-
puts "Error when calling OpenAIApi->create_edit_with_http_info: #{e}"
|
257
|
-
end
|
258
|
-
```
|
259
|
-
|
260
|
-
### Parameters
|
261
|
-
|
262
|
-
| Name | Type | Description | Notes |
|
263
|
-
| ---- | ---- | ----------- | ----- |
|
264
|
-
| **create_edit_request** | [**CreateEditRequest**](CreateEditRequest.md) | | |
|
265
|
-
|
266
|
-
### Return type
|
267
|
-
|
268
|
-
[**CreateEditResponse**](CreateEditResponse.md)
|
269
|
-
|
270
|
-
### Authorization
|
271
|
-
|
272
|
-
No authorization required
|
273
|
-
|
274
|
-
### HTTP request headers
|
275
|
-
|
276
|
-
- **Content-Type**: application/json
|
277
|
-
- **Accept**: application/json
|
278
|
-
|
279
|
-
|
280
|
-
## create_embedding
|
281
|
-
|
282
|
-
> <CreateEmbeddingResponse> create_embedding(create_embedding_request)
|
283
|
-
|
284
|
-
Creates an embedding vector representing the input text.
|
285
|
-
|
286
|
-
### Examples
|
287
|
-
|
288
|
-
```ruby
|
289
|
-
require 'time'
|
290
|
-
require 'openapi_openai'
|
291
|
-
|
292
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
293
|
-
create_embedding_request = OpenApiOpenAIClient::CreateEmbeddingRequest.new({model: nil, input: nil}) # CreateEmbeddingRequest |
|
294
|
-
|
295
|
-
begin
|
296
|
-
# Creates an embedding vector representing the input text.
|
297
|
-
result = api_instance.create_embedding(create_embedding_request)
|
298
|
-
p result
|
299
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
300
|
-
puts "Error when calling OpenAIApi->create_embedding: #{e}"
|
301
|
-
end
|
302
|
-
```
|
303
|
-
|
304
|
-
#### Using the create_embedding_with_http_info variant
|
305
|
-
|
306
|
-
This returns an Array which contains the response data, status code and headers.
|
307
|
-
|
308
|
-
> <Array(<CreateEmbeddingResponse>, Integer, Hash)> create_embedding_with_http_info(create_embedding_request)
|
309
|
-
|
310
|
-
```ruby
|
311
|
-
begin
|
312
|
-
# Creates an embedding vector representing the input text.
|
313
|
-
data, status_code, headers = api_instance.create_embedding_with_http_info(create_embedding_request)
|
314
|
-
p status_code # => 2xx
|
315
|
-
p headers # => { ... }
|
316
|
-
p data # => <CreateEmbeddingResponse>
|
317
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
318
|
-
puts "Error when calling OpenAIApi->create_embedding_with_http_info: #{e}"
|
319
|
-
end
|
320
|
-
```
|
321
|
-
|
322
|
-
### Parameters
|
323
|
-
|
324
|
-
| Name | Type | Description | Notes |
|
325
|
-
| ---- | ---- | ----------- | ----- |
|
326
|
-
| **create_embedding_request** | [**CreateEmbeddingRequest**](CreateEmbeddingRequest.md) | | |
|
327
|
-
|
328
|
-
### Return type
|
329
|
-
|
330
|
-
[**CreateEmbeddingResponse**](CreateEmbeddingResponse.md)
|
331
|
-
|
332
|
-
### Authorization
|
333
|
-
|
334
|
-
No authorization required
|
335
|
-
|
336
|
-
### HTTP request headers
|
337
|
-
|
338
|
-
- **Content-Type**: application/json
|
339
|
-
- **Accept**: application/json
|
340
|
-
|
341
|
-
|
342
|
-
## create_file
|
343
|
-
|
344
|
-
> <OpenAIFile> create_file(file, purpose)
|
345
|
-
|
346
|
-
Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.
|
347
|
-
|
348
|
-
### Examples
|
349
|
-
|
350
|
-
```ruby
|
351
|
-
require 'time'
|
352
|
-
require 'openapi_openai'
|
353
|
-
|
354
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
355
|
-
file = File.new('/path/to/some/file') # File | Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the `purpose` is set to \\\"fine-tune\\\", each line is a JSON record with \\\"prompt\\\" and \\\"completion\\\" fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data).
|
356
|
-
purpose = 'purpose_example' # String | The intended purpose of the uploaded documents. Use \\\"fine-tune\\\" for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file.
|
357
|
-
|
358
|
-
begin
|
359
|
-
# Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.
|
360
|
-
result = api_instance.create_file(file, purpose)
|
361
|
-
p result
|
362
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
363
|
-
puts "Error when calling OpenAIApi->create_file: #{e}"
|
364
|
-
end
|
365
|
-
```
|
366
|
-
|
367
|
-
#### Using the create_file_with_http_info variant
|
368
|
-
|
369
|
-
This returns an Array which contains the response data, status code and headers.
|
370
|
-
|
371
|
-
> <Array(<OpenAIFile>, Integer, Hash)> create_file_with_http_info(file, purpose)
|
372
|
-
|
373
|
-
```ruby
|
374
|
-
begin
|
375
|
-
# Upload a file that contains document(s) to be used across various endpoints/features. Currently, the size of all the files uploaded by one organization can be up to 1 GB. Please contact us if you need to increase the storage limit.
|
376
|
-
data, status_code, headers = api_instance.create_file_with_http_info(file, purpose)
|
377
|
-
p status_code # => 2xx
|
378
|
-
p headers # => { ... }
|
379
|
-
p data # => <OpenAIFile>
|
380
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
381
|
-
puts "Error when calling OpenAIApi->create_file_with_http_info: #{e}"
|
382
|
-
end
|
383
|
-
```
|
384
|
-
|
385
|
-
### Parameters
|
386
|
-
|
387
|
-
| Name | Type | Description | Notes |
|
388
|
-
| ---- | ---- | ----------- | ----- |
|
389
|
-
| **file** | **File** | Name of the [JSON Lines](https://jsonlines.readthedocs.io/en/latest/) file to be uploaded. If the `purpose` is set to \\\"fine-tune\\\", each line is a JSON record with \\\"prompt\\\" and \\\"completion\\\" fields representing your [training examples](/docs/guides/fine-tuning/prepare-training-data). | |
|
390
|
-
| **purpose** | **String** | The intended purpose of the uploaded documents. Use \\\"fine-tune\\\" for [Fine-tuning](/docs/api-reference/fine-tunes). This allows us to validate the format of the uploaded file. | |
|
391
|
-
|
392
|
-
### Return type
|
393
|
-
|
394
|
-
[**OpenAIFile**](OpenAIFile.md)
|
395
|
-
|
396
|
-
### Authorization
|
397
|
-
|
398
|
-
No authorization required
|
399
|
-
|
400
|
-
### HTTP request headers
|
401
|
-
|
402
|
-
- **Content-Type**: multipart/form-data
|
403
|
-
- **Accept**: application/json
|
404
|
-
|
405
|
-
|
406
|
-
## create_fine_tune
|
407
|
-
|
408
|
-
> <FineTune> create_fine_tune(create_fine_tune_request)
|
409
|
-
|
410
|
-
Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
|
411
|
-
|
412
|
-
### Examples
|
413
|
-
|
414
|
-
```ruby
|
415
|
-
require 'time'
|
416
|
-
require 'openapi_openai'
|
417
|
-
|
418
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
419
|
-
create_fine_tune_request = OpenApiOpenAIClient::CreateFineTuneRequest.new({training_file: 'file-ajSREls59WBbvgSzJSVWxMCB'}) # CreateFineTuneRequest |
|
420
|
-
|
421
|
-
begin
|
422
|
-
# Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
|
423
|
-
result = api_instance.create_fine_tune(create_fine_tune_request)
|
424
|
-
p result
|
425
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
426
|
-
puts "Error when calling OpenAIApi->create_fine_tune: #{e}"
|
427
|
-
end
|
428
|
-
```
|
429
|
-
|
430
|
-
#### Using the create_fine_tune_with_http_info variant
|
431
|
-
|
432
|
-
This returns an Array which contains the response data, status code and headers.
|
433
|
-
|
434
|
-
> <Array(<FineTune>, Integer, Hash)> create_fine_tune_with_http_info(create_fine_tune_request)
|
435
|
-
|
436
|
-
```ruby
|
437
|
-
begin
|
438
|
-
# Creates a job that fine-tunes a specified model from a given dataset. Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
|
439
|
-
data, status_code, headers = api_instance.create_fine_tune_with_http_info(create_fine_tune_request)
|
440
|
-
p status_code # => 2xx
|
441
|
-
p headers # => { ... }
|
442
|
-
p data # => <FineTune>
|
443
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
444
|
-
puts "Error when calling OpenAIApi->create_fine_tune_with_http_info: #{e}"
|
445
|
-
end
|
446
|
-
```
|
447
|
-
|
448
|
-
### Parameters
|
449
|
-
|
450
|
-
| Name | Type | Description | Notes |
|
451
|
-
| ---- | ---- | ----------- | ----- |
|
452
|
-
| **create_fine_tune_request** | [**CreateFineTuneRequest**](CreateFineTuneRequest.md) | | |
|
453
|
-
|
454
|
-
### Return type
|
455
|
-
|
456
|
-
[**FineTune**](FineTune.md)
|
457
|
-
|
458
|
-
### Authorization
|
459
|
-
|
460
|
-
No authorization required
|
461
|
-
|
462
|
-
### HTTP request headers
|
463
|
-
|
464
|
-
- **Content-Type**: application/json
|
465
|
-
- **Accept**: application/json
|
466
|
-
|
467
|
-
|
468
|
-
## create_image
|
469
|
-
|
470
|
-
> <ImagesResponse> create_image(create_image_request)
|
471
|
-
|
472
|
-
Creates an image given a prompt.
|
473
|
-
|
474
|
-
### Examples
|
475
|
-
|
476
|
-
```ruby
|
477
|
-
require 'time'
|
478
|
-
require 'openapi_openai'
|
479
|
-
|
480
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
481
|
-
create_image_request = OpenApiOpenAIClient::CreateImageRequest.new({prompt: 'A cute baby sea otter'}) # CreateImageRequest |
|
482
|
-
|
483
|
-
begin
|
484
|
-
# Creates an image given a prompt.
|
485
|
-
result = api_instance.create_image(create_image_request)
|
486
|
-
p result
|
487
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
488
|
-
puts "Error when calling OpenAIApi->create_image: #{e}"
|
489
|
-
end
|
490
|
-
```
|
491
|
-
|
492
|
-
#### Using the create_image_with_http_info variant
|
493
|
-
|
494
|
-
This returns an Array which contains the response data, status code and headers.
|
495
|
-
|
496
|
-
> <Array(<ImagesResponse>, Integer, Hash)> create_image_with_http_info(create_image_request)
|
497
|
-
|
498
|
-
```ruby
|
499
|
-
begin
|
500
|
-
# Creates an image given a prompt.
|
501
|
-
data, status_code, headers = api_instance.create_image_with_http_info(create_image_request)
|
502
|
-
p status_code # => 2xx
|
503
|
-
p headers # => { ... }
|
504
|
-
p data # => <ImagesResponse>
|
505
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
506
|
-
puts "Error when calling OpenAIApi->create_image_with_http_info: #{e}"
|
507
|
-
end
|
508
|
-
```
|
509
|
-
|
510
|
-
### Parameters
|
511
|
-
|
512
|
-
| Name | Type | Description | Notes |
|
513
|
-
| ---- | ---- | ----------- | ----- |
|
514
|
-
| **create_image_request** | [**CreateImageRequest**](CreateImageRequest.md) | | |
|
515
|
-
|
516
|
-
### Return type
|
517
|
-
|
518
|
-
[**ImagesResponse**](ImagesResponse.md)
|
519
|
-
|
520
|
-
### Authorization
|
521
|
-
|
522
|
-
No authorization required
|
523
|
-
|
524
|
-
### HTTP request headers
|
525
|
-
|
526
|
-
- **Content-Type**: application/json
|
527
|
-
- **Accept**: application/json
|
528
|
-
|
529
|
-
|
530
|
-
## create_image_edit
|
531
|
-
|
532
|
-
> <ImagesResponse> create_image_edit(image, prompt, opts)
|
533
|
-
|
534
|
-
Creates an edited or extended image given an original image and a prompt.
|
535
|
-
|
536
|
-
### Examples
|
537
|
-
|
538
|
-
```ruby
|
539
|
-
require 'time'
|
540
|
-
require 'openapi_openai'
|
541
|
-
|
542
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
543
|
-
image = File.new('/path/to/some/file') # File | The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask.
|
544
|
-
prompt = 'prompt_example' # String | A text description of the desired image(s). The maximum length is 1000 characters.
|
545
|
-
opts = {
|
546
|
-
mask: File.new('/path/to/some/file'), # File | An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`.
|
547
|
-
n: 56, # Integer | The number of images to generate. Must be between 1 and 10.
|
548
|
-
size: '256x256', # String | The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
549
|
-
response_format: 'url', # String | The format in which the generated images are returned. Must be one of `url` or `b64_json`.
|
550
|
-
user: 'user_example' # String | 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).
|
551
|
-
}
|
552
|
-
|
553
|
-
begin
|
554
|
-
# Creates an edited or extended image given an original image and a prompt.
|
555
|
-
result = api_instance.create_image_edit(image, prompt, opts)
|
556
|
-
p result
|
557
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
558
|
-
puts "Error when calling OpenAIApi->create_image_edit: #{e}"
|
559
|
-
end
|
560
|
-
```
|
561
|
-
|
562
|
-
#### Using the create_image_edit_with_http_info variant
|
563
|
-
|
564
|
-
This returns an Array which contains the response data, status code and headers.
|
565
|
-
|
566
|
-
> <Array(<ImagesResponse>, Integer, Hash)> create_image_edit_with_http_info(image, prompt, opts)
|
567
|
-
|
568
|
-
```ruby
|
569
|
-
begin
|
570
|
-
# Creates an edited or extended image given an original image and a prompt.
|
571
|
-
data, status_code, headers = api_instance.create_image_edit_with_http_info(image, prompt, opts)
|
572
|
-
p status_code # => 2xx
|
573
|
-
p headers # => { ... }
|
574
|
-
p data # => <ImagesResponse>
|
575
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
576
|
-
puts "Error when calling OpenAIApi->create_image_edit_with_http_info: #{e}"
|
577
|
-
end
|
578
|
-
```
|
579
|
-
|
580
|
-
### Parameters
|
581
|
-
|
582
|
-
| Name | Type | Description | Notes |
|
583
|
-
| ---- | ---- | ----------- | ----- |
|
584
|
-
| **image** | **File** | The image to edit. Must be a valid PNG file, less than 4MB, and square. If mask is not provided, image must have transparency, which will be used as the mask. | |
|
585
|
-
| **prompt** | **String** | A text description of the desired image(s). The maximum length is 1000 characters. | |
|
586
|
-
| **mask** | **File** | An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where `image` should be edited. Must be a valid PNG file, less than 4MB, and have the same dimensions as `image`. | [optional] |
|
587
|
-
| **n** | **Integer** | The number of images to generate. Must be between 1 and 10. | [optional][default to 1] |
|
588
|
-
| **size** | **String** | The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. | [optional][default to '1024x1024'] |
|
589
|
-
| **response_format** | **String** | The format in which the generated images are returned. Must be one of `url` or `b64_json`. | [optional][default to 'url'] |
|
590
|
-
| **user** | **String** | 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). | [optional] |
|
591
|
-
|
592
|
-
### Return type
|
593
|
-
|
594
|
-
[**ImagesResponse**](ImagesResponse.md)
|
595
|
-
|
596
|
-
### Authorization
|
597
|
-
|
598
|
-
No authorization required
|
599
|
-
|
600
|
-
### HTTP request headers
|
601
|
-
|
602
|
-
- **Content-Type**: multipart/form-data
|
603
|
-
- **Accept**: application/json
|
604
|
-
|
605
|
-
|
606
|
-
## create_image_variation
|
607
|
-
|
608
|
-
> <ImagesResponse> create_image_variation(image, opts)
|
609
|
-
|
610
|
-
Creates a variation of a given image.
|
611
|
-
|
612
|
-
### Examples
|
613
|
-
|
614
|
-
```ruby
|
615
|
-
require 'time'
|
616
|
-
require 'openapi_openai'
|
617
|
-
|
618
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
619
|
-
image = File.new('/path/to/some/file') # File | The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
|
620
|
-
opts = {
|
621
|
-
n: 56, # Integer | The number of images to generate. Must be between 1 and 10.
|
622
|
-
size: '256x256', # String | The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
|
623
|
-
response_format: 'url', # String | The format in which the generated images are returned. Must be one of `url` or `b64_json`.
|
624
|
-
user: 'user_example' # String | 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).
|
625
|
-
}
|
626
|
-
|
627
|
-
begin
|
628
|
-
# Creates a variation of a given image.
|
629
|
-
result = api_instance.create_image_variation(image, opts)
|
630
|
-
p result
|
631
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
632
|
-
puts "Error when calling OpenAIApi->create_image_variation: #{e}"
|
633
|
-
end
|
634
|
-
```
|
635
|
-
|
636
|
-
#### Using the create_image_variation_with_http_info variant
|
637
|
-
|
638
|
-
This returns an Array which contains the response data, status code and headers.
|
639
|
-
|
640
|
-
> <Array(<ImagesResponse>, Integer, Hash)> create_image_variation_with_http_info(image, opts)
|
641
|
-
|
642
|
-
```ruby
|
643
|
-
begin
|
644
|
-
# Creates a variation of a given image.
|
645
|
-
data, status_code, headers = api_instance.create_image_variation_with_http_info(image, opts)
|
646
|
-
p status_code # => 2xx
|
647
|
-
p headers # => { ... }
|
648
|
-
p data # => <ImagesResponse>
|
649
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
650
|
-
puts "Error when calling OpenAIApi->create_image_variation_with_http_info: #{e}"
|
651
|
-
end
|
652
|
-
```
|
653
|
-
|
654
|
-
### Parameters
|
655
|
-
|
656
|
-
| Name | Type | Description | Notes |
|
657
|
-
| ---- | ---- | ----------- | ----- |
|
658
|
-
| **image** | **File** | The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square. | |
|
659
|
-
| **n** | **Integer** | The number of images to generate. Must be between 1 and 10. | [optional][default to 1] |
|
660
|
-
| **size** | **String** | The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`. | [optional][default to '1024x1024'] |
|
661
|
-
| **response_format** | **String** | The format in which the generated images are returned. Must be one of `url` or `b64_json`. | [optional][default to 'url'] |
|
662
|
-
| **user** | **String** | 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). | [optional] |
|
663
|
-
|
664
|
-
### Return type
|
665
|
-
|
666
|
-
[**ImagesResponse**](ImagesResponse.md)
|
667
|
-
|
668
|
-
### Authorization
|
669
|
-
|
670
|
-
No authorization required
|
671
|
-
|
672
|
-
### HTTP request headers
|
673
|
-
|
674
|
-
- **Content-Type**: multipart/form-data
|
675
|
-
- **Accept**: application/json
|
676
|
-
|
677
|
-
|
678
|
-
## create_moderation
|
679
|
-
|
680
|
-
> <CreateModerationResponse> create_moderation(create_moderation_request)
|
681
|
-
|
682
|
-
Classifies if text violates OpenAI's Content Policy
|
683
|
-
|
684
|
-
### Examples
|
685
|
-
|
686
|
-
```ruby
|
687
|
-
require 'time'
|
688
|
-
require 'openapi_openai'
|
689
|
-
|
690
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
691
|
-
create_moderation_request = OpenApiOpenAIClient::CreateModerationRequest.new({input: nil}) # CreateModerationRequest |
|
692
|
-
|
693
|
-
begin
|
694
|
-
# Classifies if text violates OpenAI's Content Policy
|
695
|
-
result = api_instance.create_moderation(create_moderation_request)
|
696
|
-
p result
|
697
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
698
|
-
puts "Error when calling OpenAIApi->create_moderation: #{e}"
|
699
|
-
end
|
700
|
-
```
|
701
|
-
|
702
|
-
#### Using the create_moderation_with_http_info variant
|
703
|
-
|
704
|
-
This returns an Array which contains the response data, status code and headers.
|
705
|
-
|
706
|
-
> <Array(<CreateModerationResponse>, Integer, Hash)> create_moderation_with_http_info(create_moderation_request)
|
707
|
-
|
708
|
-
```ruby
|
709
|
-
begin
|
710
|
-
# Classifies if text violates OpenAI's Content Policy
|
711
|
-
data, status_code, headers = api_instance.create_moderation_with_http_info(create_moderation_request)
|
712
|
-
p status_code # => 2xx
|
713
|
-
p headers # => { ... }
|
714
|
-
p data # => <CreateModerationResponse>
|
715
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
716
|
-
puts "Error when calling OpenAIApi->create_moderation_with_http_info: #{e}"
|
717
|
-
end
|
718
|
-
```
|
719
|
-
|
720
|
-
### Parameters
|
721
|
-
|
722
|
-
| Name | Type | Description | Notes |
|
723
|
-
| ---- | ---- | ----------- | ----- |
|
724
|
-
| **create_moderation_request** | [**CreateModerationRequest**](CreateModerationRequest.md) | | |
|
725
|
-
|
726
|
-
### Return type
|
727
|
-
|
728
|
-
[**CreateModerationResponse**](CreateModerationResponse.md)
|
729
|
-
|
730
|
-
### Authorization
|
731
|
-
|
732
|
-
No authorization required
|
733
|
-
|
734
|
-
### HTTP request headers
|
735
|
-
|
736
|
-
- **Content-Type**: application/json
|
737
|
-
- **Accept**: application/json
|
738
|
-
|
739
|
-
|
740
|
-
## create_transcription
|
741
|
-
|
742
|
-
> <CreateTranscriptionResponse> create_transcription(file, model, opts)
|
743
|
-
|
744
|
-
Transcribes audio into the input language.
|
745
|
-
|
746
|
-
### Examples
|
747
|
-
|
748
|
-
```ruby
|
749
|
-
require 'time'
|
750
|
-
require 'openapi_openai'
|
751
|
-
|
752
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
753
|
-
file = File.new('/path/to/some/file') # File | The audio file object (not file name) to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
|
754
|
-
model = nil # CreateTranscriptionRequestModel |
|
755
|
-
opts = {
|
756
|
-
prompt: 'prompt_example', # String | An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language.
|
757
|
-
response_format: 'response_format_example', # String | The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
|
758
|
-
temperature: 8.14, # Float | The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
|
759
|
-
language: 'language_example' # String | The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency.
|
760
|
-
}
|
761
|
-
|
762
|
-
begin
|
763
|
-
# Transcribes audio into the input language.
|
764
|
-
result = api_instance.create_transcription(file, model, opts)
|
765
|
-
p result
|
766
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
767
|
-
puts "Error when calling OpenAIApi->create_transcription: #{e}"
|
768
|
-
end
|
769
|
-
```
|
770
|
-
|
771
|
-
#### Using the create_transcription_with_http_info variant
|
772
|
-
|
773
|
-
This returns an Array which contains the response data, status code and headers.
|
774
|
-
|
775
|
-
> <Array(<CreateTranscriptionResponse>, Integer, Hash)> create_transcription_with_http_info(file, model, opts)
|
776
|
-
|
777
|
-
```ruby
|
778
|
-
begin
|
779
|
-
# Transcribes audio into the input language.
|
780
|
-
data, status_code, headers = api_instance.create_transcription_with_http_info(file, model, opts)
|
781
|
-
p status_code # => 2xx
|
782
|
-
p headers # => { ... }
|
783
|
-
p data # => <CreateTranscriptionResponse>
|
784
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
785
|
-
puts "Error when calling OpenAIApi->create_transcription_with_http_info: #{e}"
|
786
|
-
end
|
787
|
-
```
|
788
|
-
|
789
|
-
### Parameters
|
790
|
-
|
791
|
-
| Name | Type | Description | Notes |
|
792
|
-
| ---- | ---- | ----------- | ----- |
|
793
|
-
| **file** | **File** | The audio file object (not file name) to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm. | |
|
794
|
-
| **model** | [**CreateTranscriptionRequestModel**](CreateTranscriptionRequestModel.md) | | |
|
795
|
-
| **prompt** | **String** | An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should match the audio language. | [optional] |
|
796
|
-
| **response_format** | **String** | The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt. | [optional][default to 'json'] |
|
797
|
-
| **temperature** | **Float** | The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit. | [optional][default to 0] |
|
798
|
-
| **language** | **String** | The language of the input audio. Supplying the input language in [ISO-639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format will improve accuracy and latency. | [optional] |
|
799
|
-
|
800
|
-
### Return type
|
801
|
-
|
802
|
-
[**CreateTranscriptionResponse**](CreateTranscriptionResponse.md)
|
803
|
-
|
804
|
-
### Authorization
|
805
|
-
|
806
|
-
No authorization required
|
807
|
-
|
808
|
-
### HTTP request headers
|
809
|
-
|
810
|
-
- **Content-Type**: multipart/form-data
|
811
|
-
- **Accept**: application/json
|
812
|
-
|
813
|
-
|
814
|
-
## create_translation
|
815
|
-
|
816
|
-
> <CreateTranslationResponse> create_translation(file, model, opts)
|
817
|
-
|
818
|
-
Translates audio into English.
|
819
|
-
|
820
|
-
### Examples
|
821
|
-
|
822
|
-
```ruby
|
823
|
-
require 'time'
|
824
|
-
require 'openapi_openai'
|
825
|
-
|
826
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
827
|
-
file = File.new('/path/to/some/file') # File | The audio file object (not file name) translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
|
828
|
-
model = nil # CreateTranscriptionRequestModel |
|
829
|
-
opts = {
|
830
|
-
prompt: 'prompt_example', # String | An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English.
|
831
|
-
response_format: 'response_format_example', # String | The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
|
832
|
-
temperature: 8.14 # Float | The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit.
|
833
|
-
}
|
834
|
-
|
835
|
-
begin
|
836
|
-
# Translates audio into English.
|
837
|
-
result = api_instance.create_translation(file, model, opts)
|
838
|
-
p result
|
839
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
840
|
-
puts "Error when calling OpenAIApi->create_translation: #{e}"
|
841
|
-
end
|
842
|
-
```
|
843
|
-
|
844
|
-
#### Using the create_translation_with_http_info variant
|
845
|
-
|
846
|
-
This returns an Array which contains the response data, status code and headers.
|
847
|
-
|
848
|
-
> <Array(<CreateTranslationResponse>, Integer, Hash)> create_translation_with_http_info(file, model, opts)
|
849
|
-
|
850
|
-
```ruby
|
851
|
-
begin
|
852
|
-
# Translates audio into English.
|
853
|
-
data, status_code, headers = api_instance.create_translation_with_http_info(file, model, opts)
|
854
|
-
p status_code # => 2xx
|
855
|
-
p headers # => { ... }
|
856
|
-
p data # => <CreateTranslationResponse>
|
857
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
858
|
-
puts "Error when calling OpenAIApi->create_translation_with_http_info: #{e}"
|
859
|
-
end
|
860
|
-
```
|
861
|
-
|
862
|
-
### Parameters
|
863
|
-
|
864
|
-
| Name | Type | Description | Notes |
|
865
|
-
| ---- | ---- | ----------- | ----- |
|
866
|
-
| **file** | **File** | The audio file object (not file name) translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm. | |
|
867
|
-
| **model** | [**CreateTranscriptionRequestModel**](CreateTranscriptionRequestModel.md) | | |
|
868
|
-
| **prompt** | **String** | An optional text to guide the model's style or continue a previous audio segment. The [prompt](/docs/guides/speech-to-text/prompting) should be in English. | [optional] |
|
869
|
-
| **response_format** | **String** | The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt. | [optional][default to 'json'] |
|
870
|
-
| **temperature** | **Float** | The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use [log probability](https://en.wikipedia.org/wiki/Log_probability) to automatically increase the temperature until certain thresholds are hit. | [optional][default to 0] |
|
871
|
-
|
872
|
-
### Return type
|
873
|
-
|
874
|
-
[**CreateTranslationResponse**](CreateTranslationResponse.md)
|
875
|
-
|
876
|
-
### Authorization
|
877
|
-
|
878
|
-
No authorization required
|
879
|
-
|
880
|
-
### HTTP request headers
|
881
|
-
|
882
|
-
- **Content-Type**: multipart/form-data
|
883
|
-
- **Accept**: application/json
|
884
|
-
|
885
|
-
|
886
|
-
## delete_file
|
887
|
-
|
888
|
-
> <DeleteFileResponse> delete_file(file_id)
|
889
|
-
|
890
|
-
Delete a file.
|
891
|
-
|
892
|
-
### Examples
|
893
|
-
|
894
|
-
```ruby
|
895
|
-
require 'time'
|
896
|
-
require 'openapi_openai'
|
897
|
-
|
898
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
899
|
-
file_id = 'file_id_example' # String | The ID of the file to use for this request
|
900
|
-
|
901
|
-
begin
|
902
|
-
# Delete a file.
|
903
|
-
result = api_instance.delete_file(file_id)
|
904
|
-
p result
|
905
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
906
|
-
puts "Error when calling OpenAIApi->delete_file: #{e}"
|
907
|
-
end
|
908
|
-
```
|
909
|
-
|
910
|
-
#### Using the delete_file_with_http_info variant
|
911
|
-
|
912
|
-
This returns an Array which contains the response data, status code and headers.
|
913
|
-
|
914
|
-
> <Array(<DeleteFileResponse>, Integer, Hash)> delete_file_with_http_info(file_id)
|
915
|
-
|
916
|
-
```ruby
|
917
|
-
begin
|
918
|
-
# Delete a file.
|
919
|
-
data, status_code, headers = api_instance.delete_file_with_http_info(file_id)
|
920
|
-
p status_code # => 2xx
|
921
|
-
p headers # => { ... }
|
922
|
-
p data # => <DeleteFileResponse>
|
923
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
924
|
-
puts "Error when calling OpenAIApi->delete_file_with_http_info: #{e}"
|
925
|
-
end
|
926
|
-
```
|
927
|
-
|
928
|
-
### Parameters
|
929
|
-
|
930
|
-
| Name | Type | Description | Notes |
|
931
|
-
| ---- | ---- | ----------- | ----- |
|
932
|
-
| **file_id** | **String** | The ID of the file to use for this request | |
|
933
|
-
|
934
|
-
### Return type
|
935
|
-
|
936
|
-
[**DeleteFileResponse**](DeleteFileResponse.md)
|
937
|
-
|
938
|
-
### Authorization
|
939
|
-
|
940
|
-
No authorization required
|
941
|
-
|
942
|
-
### HTTP request headers
|
943
|
-
|
944
|
-
- **Content-Type**: Not defined
|
945
|
-
- **Accept**: application/json
|
946
|
-
|
947
|
-
|
948
|
-
## delete_model
|
949
|
-
|
950
|
-
> <DeleteModelResponse> delete_model(model)
|
951
|
-
|
952
|
-
Delete a fine-tuned model. You must have the Owner role in your organization.
|
953
|
-
|
954
|
-
### Examples
|
955
|
-
|
956
|
-
```ruby
|
957
|
-
require 'time'
|
958
|
-
require 'openapi_openai'
|
959
|
-
|
960
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
961
|
-
model = 'curie:ft-acmeco-2021-03-03-21-44-20' # String | The model to delete
|
962
|
-
|
963
|
-
begin
|
964
|
-
# Delete a fine-tuned model. You must have the Owner role in your organization.
|
965
|
-
result = api_instance.delete_model(model)
|
966
|
-
p result
|
967
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
968
|
-
puts "Error when calling OpenAIApi->delete_model: #{e}"
|
969
|
-
end
|
970
|
-
```
|
971
|
-
|
972
|
-
#### Using the delete_model_with_http_info variant
|
973
|
-
|
974
|
-
This returns an Array which contains the response data, status code and headers.
|
975
|
-
|
976
|
-
> <Array(<DeleteModelResponse>, Integer, Hash)> delete_model_with_http_info(model)
|
977
|
-
|
978
|
-
```ruby
|
979
|
-
begin
|
980
|
-
# Delete a fine-tuned model. You must have the Owner role in your organization.
|
981
|
-
data, status_code, headers = api_instance.delete_model_with_http_info(model)
|
982
|
-
p status_code # => 2xx
|
983
|
-
p headers # => { ... }
|
984
|
-
p data # => <DeleteModelResponse>
|
985
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
986
|
-
puts "Error when calling OpenAIApi->delete_model_with_http_info: #{e}"
|
987
|
-
end
|
988
|
-
```
|
989
|
-
|
990
|
-
### Parameters
|
991
|
-
|
992
|
-
| Name | Type | Description | Notes |
|
993
|
-
| ---- | ---- | ----------- | ----- |
|
994
|
-
| **model** | **String** | The model to delete | |
|
995
|
-
|
996
|
-
### Return type
|
997
|
-
|
998
|
-
[**DeleteModelResponse**](DeleteModelResponse.md)
|
999
|
-
|
1000
|
-
### Authorization
|
1001
|
-
|
1002
|
-
No authorization required
|
1003
|
-
|
1004
|
-
### HTTP request headers
|
1005
|
-
|
1006
|
-
- **Content-Type**: Not defined
|
1007
|
-
- **Accept**: application/json
|
1008
|
-
|
1009
|
-
|
1010
|
-
## download_file
|
1011
|
-
|
1012
|
-
> String download_file(file_id)
|
1013
|
-
|
1014
|
-
Returns the contents of the specified file
|
1015
|
-
|
1016
|
-
### Examples
|
1017
|
-
|
1018
|
-
```ruby
|
1019
|
-
require 'time'
|
1020
|
-
require 'openapi_openai'
|
1021
|
-
|
1022
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
1023
|
-
file_id = 'file_id_example' # String | The ID of the file to use for this request
|
1024
|
-
|
1025
|
-
begin
|
1026
|
-
# Returns the contents of the specified file
|
1027
|
-
result = api_instance.download_file(file_id)
|
1028
|
-
p result
|
1029
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1030
|
-
puts "Error when calling OpenAIApi->download_file: #{e}"
|
1031
|
-
end
|
1032
|
-
```
|
1033
|
-
|
1034
|
-
#### Using the download_file_with_http_info variant
|
1035
|
-
|
1036
|
-
This returns an Array which contains the response data, status code and headers.
|
1037
|
-
|
1038
|
-
> <Array(String, Integer, Hash)> download_file_with_http_info(file_id)
|
1039
|
-
|
1040
|
-
```ruby
|
1041
|
-
begin
|
1042
|
-
# Returns the contents of the specified file
|
1043
|
-
data, status_code, headers = api_instance.download_file_with_http_info(file_id)
|
1044
|
-
p status_code # => 2xx
|
1045
|
-
p headers # => { ... }
|
1046
|
-
p data # => String
|
1047
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1048
|
-
puts "Error when calling OpenAIApi->download_file_with_http_info: #{e}"
|
1049
|
-
end
|
1050
|
-
```
|
1051
|
-
|
1052
|
-
### Parameters
|
1053
|
-
|
1054
|
-
| Name | Type | Description | Notes |
|
1055
|
-
| ---- | ---- | ----------- | ----- |
|
1056
|
-
| **file_id** | **String** | The ID of the file to use for this request | |
|
1057
|
-
|
1058
|
-
### Return type
|
1059
|
-
|
1060
|
-
**String**
|
1061
|
-
|
1062
|
-
### Authorization
|
1063
|
-
|
1064
|
-
No authorization required
|
1065
|
-
|
1066
|
-
### HTTP request headers
|
1067
|
-
|
1068
|
-
- **Content-Type**: Not defined
|
1069
|
-
- **Accept**: application/json
|
1070
|
-
|
1071
|
-
|
1072
|
-
## list_files
|
1073
|
-
|
1074
|
-
> <ListFilesResponse> list_files
|
1075
|
-
|
1076
|
-
Returns a list of files that belong to the user's organization.
|
1077
|
-
|
1078
|
-
### Examples
|
1079
|
-
|
1080
|
-
```ruby
|
1081
|
-
require 'time'
|
1082
|
-
require 'openapi_openai'
|
1083
|
-
|
1084
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
1085
|
-
|
1086
|
-
begin
|
1087
|
-
# Returns a list of files that belong to the user's organization.
|
1088
|
-
result = api_instance.list_files
|
1089
|
-
p result
|
1090
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1091
|
-
puts "Error when calling OpenAIApi->list_files: #{e}"
|
1092
|
-
end
|
1093
|
-
```
|
1094
|
-
|
1095
|
-
#### Using the list_files_with_http_info variant
|
1096
|
-
|
1097
|
-
This returns an Array which contains the response data, status code and headers.
|
1098
|
-
|
1099
|
-
> <Array(<ListFilesResponse>, Integer, Hash)> list_files_with_http_info
|
1100
|
-
|
1101
|
-
```ruby
|
1102
|
-
begin
|
1103
|
-
# Returns a list of files that belong to the user's organization.
|
1104
|
-
data, status_code, headers = api_instance.list_files_with_http_info
|
1105
|
-
p status_code # => 2xx
|
1106
|
-
p headers # => { ... }
|
1107
|
-
p data # => <ListFilesResponse>
|
1108
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1109
|
-
puts "Error when calling OpenAIApi->list_files_with_http_info: #{e}"
|
1110
|
-
end
|
1111
|
-
```
|
1112
|
-
|
1113
|
-
### Parameters
|
1114
|
-
|
1115
|
-
This endpoint does not need any parameter.
|
1116
|
-
|
1117
|
-
### Return type
|
1118
|
-
|
1119
|
-
[**ListFilesResponse**](ListFilesResponse.md)
|
1120
|
-
|
1121
|
-
### Authorization
|
1122
|
-
|
1123
|
-
No authorization required
|
1124
|
-
|
1125
|
-
### HTTP request headers
|
1126
|
-
|
1127
|
-
- **Content-Type**: Not defined
|
1128
|
-
- **Accept**: application/json
|
1129
|
-
|
1130
|
-
|
1131
|
-
## list_fine_tune_events
|
1132
|
-
|
1133
|
-
> <ListFineTuneEventsResponse> list_fine_tune_events(fine_tune_id, opts)
|
1134
|
-
|
1135
|
-
Get fine-grained status updates for a fine-tune job.
|
1136
|
-
|
1137
|
-
### Examples
|
1138
|
-
|
1139
|
-
```ruby
|
1140
|
-
require 'time'
|
1141
|
-
require 'openapi_openai'
|
1142
|
-
|
1143
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
1144
|
-
fine_tune_id = 'ft-AF1WoRqd3aJAHsqc9NY7iL8F' # String | The ID of the fine-tune job to get events for.
|
1145
|
-
opts = {
|
1146
|
-
stream: true # Boolean | Whether to stream events for the fine-tune job. If set to true, events 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. The stream will terminate with a `data: [DONE]` message when the job is finished (succeeded, cancelled, or failed). If set to false, only events generated so far will be returned.
|
1147
|
-
}
|
1148
|
-
|
1149
|
-
begin
|
1150
|
-
# Get fine-grained status updates for a fine-tune job.
|
1151
|
-
result = api_instance.list_fine_tune_events(fine_tune_id, opts)
|
1152
|
-
p result
|
1153
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1154
|
-
puts "Error when calling OpenAIApi->list_fine_tune_events: #{e}"
|
1155
|
-
end
|
1156
|
-
```
|
1157
|
-
|
1158
|
-
#### Using the list_fine_tune_events_with_http_info variant
|
1159
|
-
|
1160
|
-
This returns an Array which contains the response data, status code and headers.
|
1161
|
-
|
1162
|
-
> <Array(<ListFineTuneEventsResponse>, Integer, Hash)> list_fine_tune_events_with_http_info(fine_tune_id, opts)
|
1163
|
-
|
1164
|
-
```ruby
|
1165
|
-
begin
|
1166
|
-
# Get fine-grained status updates for a fine-tune job.
|
1167
|
-
data, status_code, headers = api_instance.list_fine_tune_events_with_http_info(fine_tune_id, opts)
|
1168
|
-
p status_code # => 2xx
|
1169
|
-
p headers # => { ... }
|
1170
|
-
p data # => <ListFineTuneEventsResponse>
|
1171
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1172
|
-
puts "Error when calling OpenAIApi->list_fine_tune_events_with_http_info: #{e}"
|
1173
|
-
end
|
1174
|
-
```
|
1175
|
-
|
1176
|
-
### Parameters
|
1177
|
-
|
1178
|
-
| Name | Type | Description | Notes |
|
1179
|
-
| ---- | ---- | ----------- | ----- |
|
1180
|
-
| **fine_tune_id** | **String** | The ID of the fine-tune job to get events for. | |
|
1181
|
-
| **stream** | **Boolean** | Whether to stream events for the fine-tune job. If set to true, events 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. The stream will terminate with a `data: [DONE]` message when the job is finished (succeeded, cancelled, or failed). If set to false, only events generated so far will be returned. | [optional][default to false] |
|
1182
|
-
|
1183
|
-
### Return type
|
1184
|
-
|
1185
|
-
[**ListFineTuneEventsResponse**](ListFineTuneEventsResponse.md)
|
1186
|
-
|
1187
|
-
### Authorization
|
1188
|
-
|
1189
|
-
No authorization required
|
1190
|
-
|
1191
|
-
### HTTP request headers
|
1192
|
-
|
1193
|
-
- **Content-Type**: Not defined
|
1194
|
-
- **Accept**: application/json
|
1195
|
-
|
1196
|
-
|
1197
|
-
## list_fine_tunes
|
1198
|
-
|
1199
|
-
> <ListFineTunesResponse> list_fine_tunes
|
1200
|
-
|
1201
|
-
List your organization's fine-tuning jobs
|
1202
|
-
|
1203
|
-
### Examples
|
1204
|
-
|
1205
|
-
```ruby
|
1206
|
-
require 'time'
|
1207
|
-
require 'openapi_openai'
|
1208
|
-
|
1209
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
1210
|
-
|
1211
|
-
begin
|
1212
|
-
# List your organization's fine-tuning jobs
|
1213
|
-
result = api_instance.list_fine_tunes
|
1214
|
-
p result
|
1215
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1216
|
-
puts "Error when calling OpenAIApi->list_fine_tunes: #{e}"
|
1217
|
-
end
|
1218
|
-
```
|
1219
|
-
|
1220
|
-
#### Using the list_fine_tunes_with_http_info variant
|
1221
|
-
|
1222
|
-
This returns an Array which contains the response data, status code and headers.
|
1223
|
-
|
1224
|
-
> <Array(<ListFineTunesResponse>, Integer, Hash)> list_fine_tunes_with_http_info
|
1225
|
-
|
1226
|
-
```ruby
|
1227
|
-
begin
|
1228
|
-
# List your organization's fine-tuning jobs
|
1229
|
-
data, status_code, headers = api_instance.list_fine_tunes_with_http_info
|
1230
|
-
p status_code # => 2xx
|
1231
|
-
p headers # => { ... }
|
1232
|
-
p data # => <ListFineTunesResponse>
|
1233
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1234
|
-
puts "Error when calling OpenAIApi->list_fine_tunes_with_http_info: #{e}"
|
1235
|
-
end
|
1236
|
-
```
|
1237
|
-
|
1238
|
-
### Parameters
|
1239
|
-
|
1240
|
-
This endpoint does not need any parameter.
|
1241
|
-
|
1242
|
-
### Return type
|
1243
|
-
|
1244
|
-
[**ListFineTunesResponse**](ListFineTunesResponse.md)
|
1245
|
-
|
1246
|
-
### Authorization
|
1247
|
-
|
1248
|
-
No authorization required
|
1249
|
-
|
1250
|
-
### HTTP request headers
|
1251
|
-
|
1252
|
-
- **Content-Type**: Not defined
|
1253
|
-
- **Accept**: application/json
|
1254
|
-
|
1255
|
-
|
1256
|
-
## list_models
|
1257
|
-
|
1258
|
-
> <ListModelsResponse> list_models
|
1259
|
-
|
1260
|
-
Lists the currently available models, and provides basic information about each one such as the owner and availability.
|
1261
|
-
|
1262
|
-
### Examples
|
1263
|
-
|
1264
|
-
```ruby
|
1265
|
-
require 'time'
|
1266
|
-
require 'openapi_openai'
|
1267
|
-
|
1268
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
1269
|
-
|
1270
|
-
begin
|
1271
|
-
# Lists the currently available models, and provides basic information about each one such as the owner and availability.
|
1272
|
-
result = api_instance.list_models
|
1273
|
-
p result
|
1274
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1275
|
-
puts "Error when calling OpenAIApi->list_models: #{e}"
|
1276
|
-
end
|
1277
|
-
```
|
1278
|
-
|
1279
|
-
#### Using the list_models_with_http_info variant
|
1280
|
-
|
1281
|
-
This returns an Array which contains the response data, status code and headers.
|
1282
|
-
|
1283
|
-
> <Array(<ListModelsResponse>, Integer, Hash)> list_models_with_http_info
|
1284
|
-
|
1285
|
-
```ruby
|
1286
|
-
begin
|
1287
|
-
# Lists the currently available models, and provides basic information about each one such as the owner and availability.
|
1288
|
-
data, status_code, headers = api_instance.list_models_with_http_info
|
1289
|
-
p status_code # => 2xx
|
1290
|
-
p headers # => { ... }
|
1291
|
-
p data # => <ListModelsResponse>
|
1292
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1293
|
-
puts "Error when calling OpenAIApi->list_models_with_http_info: #{e}"
|
1294
|
-
end
|
1295
|
-
```
|
1296
|
-
|
1297
|
-
### Parameters
|
1298
|
-
|
1299
|
-
This endpoint does not need any parameter.
|
1300
|
-
|
1301
|
-
### Return type
|
1302
|
-
|
1303
|
-
[**ListModelsResponse**](ListModelsResponse.md)
|
1304
|
-
|
1305
|
-
### Authorization
|
1306
|
-
|
1307
|
-
No authorization required
|
1308
|
-
|
1309
|
-
### HTTP request headers
|
1310
|
-
|
1311
|
-
- **Content-Type**: Not defined
|
1312
|
-
- **Accept**: application/json
|
1313
|
-
|
1314
|
-
|
1315
|
-
## retrieve_file
|
1316
|
-
|
1317
|
-
> <OpenAIFile> retrieve_file(file_id)
|
1318
|
-
|
1319
|
-
Returns information about a specific file.
|
1320
|
-
|
1321
|
-
### Examples
|
1322
|
-
|
1323
|
-
```ruby
|
1324
|
-
require 'time'
|
1325
|
-
require 'openapi_openai'
|
1326
|
-
|
1327
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
1328
|
-
file_id = 'file_id_example' # String | The ID of the file to use for this request
|
1329
|
-
|
1330
|
-
begin
|
1331
|
-
# Returns information about a specific file.
|
1332
|
-
result = api_instance.retrieve_file(file_id)
|
1333
|
-
p result
|
1334
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1335
|
-
puts "Error when calling OpenAIApi->retrieve_file: #{e}"
|
1336
|
-
end
|
1337
|
-
```
|
1338
|
-
|
1339
|
-
#### Using the retrieve_file_with_http_info variant
|
1340
|
-
|
1341
|
-
This returns an Array which contains the response data, status code and headers.
|
1342
|
-
|
1343
|
-
> <Array(<OpenAIFile>, Integer, Hash)> retrieve_file_with_http_info(file_id)
|
1344
|
-
|
1345
|
-
```ruby
|
1346
|
-
begin
|
1347
|
-
# Returns information about a specific file.
|
1348
|
-
data, status_code, headers = api_instance.retrieve_file_with_http_info(file_id)
|
1349
|
-
p status_code # => 2xx
|
1350
|
-
p headers # => { ... }
|
1351
|
-
p data # => <OpenAIFile>
|
1352
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1353
|
-
puts "Error when calling OpenAIApi->retrieve_file_with_http_info: #{e}"
|
1354
|
-
end
|
1355
|
-
```
|
1356
|
-
|
1357
|
-
### Parameters
|
1358
|
-
|
1359
|
-
| Name | Type | Description | Notes |
|
1360
|
-
| ---- | ---- | ----------- | ----- |
|
1361
|
-
| **file_id** | **String** | The ID of the file to use for this request | |
|
1362
|
-
|
1363
|
-
### Return type
|
1364
|
-
|
1365
|
-
[**OpenAIFile**](OpenAIFile.md)
|
1366
|
-
|
1367
|
-
### Authorization
|
1368
|
-
|
1369
|
-
No authorization required
|
1370
|
-
|
1371
|
-
### HTTP request headers
|
1372
|
-
|
1373
|
-
- **Content-Type**: Not defined
|
1374
|
-
- **Accept**: application/json
|
1375
|
-
|
1376
|
-
|
1377
|
-
## retrieve_fine_tune
|
1378
|
-
|
1379
|
-
> <FineTune> retrieve_fine_tune(fine_tune_id)
|
1380
|
-
|
1381
|
-
Gets info about the fine-tune job. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
|
1382
|
-
|
1383
|
-
### Examples
|
1384
|
-
|
1385
|
-
```ruby
|
1386
|
-
require 'time'
|
1387
|
-
require 'openapi_openai'
|
1388
|
-
|
1389
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
1390
|
-
fine_tune_id = 'ft-AF1WoRqd3aJAHsqc9NY7iL8F' # String | The ID of the fine-tune job
|
1391
|
-
|
1392
|
-
begin
|
1393
|
-
# Gets info about the fine-tune job. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
|
1394
|
-
result = api_instance.retrieve_fine_tune(fine_tune_id)
|
1395
|
-
p result
|
1396
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1397
|
-
puts "Error when calling OpenAIApi->retrieve_fine_tune: #{e}"
|
1398
|
-
end
|
1399
|
-
```
|
1400
|
-
|
1401
|
-
#### Using the retrieve_fine_tune_with_http_info variant
|
1402
|
-
|
1403
|
-
This returns an Array which contains the response data, status code and headers.
|
1404
|
-
|
1405
|
-
> <Array(<FineTune>, Integer, Hash)> retrieve_fine_tune_with_http_info(fine_tune_id)
|
1406
|
-
|
1407
|
-
```ruby
|
1408
|
-
begin
|
1409
|
-
# Gets info about the fine-tune job. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
|
1410
|
-
data, status_code, headers = api_instance.retrieve_fine_tune_with_http_info(fine_tune_id)
|
1411
|
-
p status_code # => 2xx
|
1412
|
-
p headers # => { ... }
|
1413
|
-
p data # => <FineTune>
|
1414
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1415
|
-
puts "Error when calling OpenAIApi->retrieve_fine_tune_with_http_info: #{e}"
|
1416
|
-
end
|
1417
|
-
```
|
1418
|
-
|
1419
|
-
### Parameters
|
1420
|
-
|
1421
|
-
| Name | Type | Description | Notes |
|
1422
|
-
| ---- | ---- | ----------- | ----- |
|
1423
|
-
| **fine_tune_id** | **String** | The ID of the fine-tune job | |
|
1424
|
-
|
1425
|
-
### Return type
|
1426
|
-
|
1427
|
-
[**FineTune**](FineTune.md)
|
1428
|
-
|
1429
|
-
### Authorization
|
1430
|
-
|
1431
|
-
No authorization required
|
1432
|
-
|
1433
|
-
### HTTP request headers
|
1434
|
-
|
1435
|
-
- **Content-Type**: Not defined
|
1436
|
-
- **Accept**: application/json
|
1437
|
-
|
1438
|
-
|
1439
|
-
## retrieve_model
|
1440
|
-
|
1441
|
-
> <Model> retrieve_model(model)
|
1442
|
-
|
1443
|
-
Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
|
1444
|
-
|
1445
|
-
### Examples
|
1446
|
-
|
1447
|
-
```ruby
|
1448
|
-
require 'time'
|
1449
|
-
require 'openapi_openai'
|
1450
|
-
|
1451
|
-
api_instance = OpenApiOpenAIClient::OpenAIApi.new
|
1452
|
-
model = 'text-davinci-001' # String | The ID of the model to use for this request
|
1453
|
-
|
1454
|
-
begin
|
1455
|
-
# Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
|
1456
|
-
result = api_instance.retrieve_model(model)
|
1457
|
-
p result
|
1458
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1459
|
-
puts "Error when calling OpenAIApi->retrieve_model: #{e}"
|
1460
|
-
end
|
1461
|
-
```
|
1462
|
-
|
1463
|
-
#### Using the retrieve_model_with_http_info variant
|
1464
|
-
|
1465
|
-
This returns an Array which contains the response data, status code and headers.
|
1466
|
-
|
1467
|
-
> <Array(<Model>, Integer, Hash)> retrieve_model_with_http_info(model)
|
1468
|
-
|
1469
|
-
```ruby
|
1470
|
-
begin
|
1471
|
-
# Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
|
1472
|
-
data, status_code, headers = api_instance.retrieve_model_with_http_info(model)
|
1473
|
-
p status_code # => 2xx
|
1474
|
-
p headers # => { ... }
|
1475
|
-
p data # => <Model>
|
1476
|
-
rescue OpenApiOpenAIClient::ApiError => e
|
1477
|
-
puts "Error when calling OpenAIApi->retrieve_model_with_http_info: #{e}"
|
1478
|
-
end
|
1479
|
-
```
|
1480
|
-
|
1481
|
-
### Parameters
|
1482
|
-
|
1483
|
-
| Name | Type | Description | Notes |
|
1484
|
-
| ---- | ---- | ----------- | ----- |
|
1485
|
-
| **model** | **String** | The ID of the model to use for this request | |
|
1486
|
-
|
1487
|
-
### Return type
|
1488
|
-
|
1489
|
-
[**Model**](Model.md)
|
1490
|
-
|
1491
|
-
### Authorization
|
1492
|
-
|
1493
|
-
No authorization required
|
1494
|
-
|
1495
|
-
### HTTP request headers
|
1496
|
-
|
1497
|
-
- **Content-Type**: Not defined
|
1498
|
-
- **Accept**: application/json
|
1499
|
-
|