openapi_openai 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (206) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +72 -0
  4. data/README.md +171 -0
  5. data/Rakefile +10 -0
  6. data/bin/bundle +109 -0
  7. data/bin/byebug +27 -0
  8. data/bin/coderay +27 -0
  9. data/bin/htmldiff +27 -0
  10. data/bin/ldiff +27 -0
  11. data/bin/pry +27 -0
  12. data/bin/racc +27 -0
  13. data/bin/rake +27 -0
  14. data/bin/rspec +27 -0
  15. data/bin/rubocop +27 -0
  16. data/bin/ruby-parse +27 -0
  17. data/bin/ruby-rewrite +27 -0
  18. data/docs/ChatCompletionFunctions.md +22 -0
  19. data/docs/ChatCompletionRequestMessage.md +24 -0
  20. data/docs/ChatCompletionRequestMessageFunctionCall.md +20 -0
  21. data/docs/ChatCompletionResponseMessage.md +22 -0
  22. data/docs/ChatCompletionStreamResponseDelta.md +22 -0
  23. data/docs/CreateChatCompletionRequest.md +44 -0
  24. data/docs/CreateChatCompletionRequestFunctionCall.md +49 -0
  25. data/docs/CreateChatCompletionRequestFunctionCallOneOf.md +18 -0
  26. data/docs/CreateChatCompletionRequestModel.md +47 -0
  27. data/docs/CreateChatCompletionRequestStop.md +49 -0
  28. data/docs/CreateChatCompletionResponse.md +28 -0
  29. data/docs/CreateChatCompletionResponseChoicesInner.md +22 -0
  30. data/docs/CreateChatCompletionStreamResponse.md +26 -0
  31. data/docs/CreateChatCompletionStreamResponseChoicesInner.md +22 -0
  32. data/docs/CreateCompletionRequest.md +48 -0
  33. data/docs/CreateCompletionRequestModel.md +47 -0
  34. data/docs/CreateCompletionRequestPrompt.md +53 -0
  35. data/docs/CreateCompletionRequestStop.md +49 -0
  36. data/docs/CreateCompletionResponse.md +28 -0
  37. data/docs/CreateCompletionResponseChoicesInner.md +24 -0
  38. data/docs/CreateCompletionResponseChoicesInnerLogprobs.md +24 -0
  39. data/docs/CreateCompletionResponseUsage.md +22 -0
  40. data/docs/CreateEditRequest.md +28 -0
  41. data/docs/CreateEditRequestModel.md +47 -0
  42. data/docs/CreateEditResponse.md +24 -0
  43. data/docs/CreateEditResponseChoicesInner.md +24 -0
  44. data/docs/CreateEmbeddingRequest.md +22 -0
  45. data/docs/CreateEmbeddingRequestInput.md +53 -0
  46. data/docs/CreateEmbeddingRequestModel.md +47 -0
  47. data/docs/CreateEmbeddingResponse.md +24 -0
  48. data/docs/CreateEmbeddingResponseDataInner.md +22 -0
  49. data/docs/CreateEmbeddingResponseUsage.md +20 -0
  50. data/docs/CreateFineTuneRequest.md +40 -0
  51. data/docs/CreateFineTuneRequestModel.md +47 -0
  52. data/docs/CreateImageRequest.md +26 -0
  53. data/docs/CreateModerationRequest.md +20 -0
  54. data/docs/CreateModerationRequestInput.md +49 -0
  55. data/docs/CreateModerationRequestModel.md +47 -0
  56. data/docs/CreateModerationResponse.md +22 -0
  57. data/docs/CreateModerationResponseResultsInner.md +22 -0
  58. data/docs/CreateModerationResponseResultsInnerCategories.md +30 -0
  59. data/docs/CreateModerationResponseResultsInnerCategoryScores.md +30 -0
  60. data/docs/CreateTranscriptionRequestModel.md +47 -0
  61. data/docs/CreateTranscriptionResponse.md +18 -0
  62. data/docs/CreateTranslationResponse.md +18 -0
  63. data/docs/DeleteFileResponse.md +22 -0
  64. data/docs/DeleteModelResponse.md +22 -0
  65. data/docs/Error.md +24 -0
  66. data/docs/ErrorResponse.md +18 -0
  67. data/docs/FineTune.md +42 -0
  68. data/docs/FineTuneEvent.md +24 -0
  69. data/docs/ImagesResponse.md +20 -0
  70. data/docs/ImagesResponseDataInner.md +20 -0
  71. data/docs/ListFilesResponse.md +20 -0
  72. data/docs/ListFineTuneEventsResponse.md +20 -0
  73. data/docs/ListFineTunesResponse.md +20 -0
  74. data/docs/ListModelsResponse.md +20 -0
  75. data/docs/Model.md +24 -0
  76. data/docs/OpenAIApi.md +1499 -0
  77. data/docs/OpenAIFile.md +32 -0
  78. data/git_push.sh +57 -0
  79. data/lib/openapi_openai/api/open_ai_api.rb +1583 -0
  80. data/lib/openapi_openai/api_client.rb +393 -0
  81. data/lib/openapi_openai/api_error.rb +58 -0
  82. data/lib/openapi_openai/configuration.rb +291 -0
  83. data/lib/openapi_openai/models/chat_completion_functions.rb +244 -0
  84. data/lib/openapi_openai/models/chat_completion_request_message.rb +285 -0
  85. data/lib/openapi_openai/models/chat_completion_request_message_function_call.rb +226 -0
  86. data/lib/openapi_openai/models/chat_completion_response_message.rb +276 -0
  87. data/lib/openapi_openai/models/chat_completion_stream_response_delta.rb +269 -0
  88. data/lib/openapi_openai/models/create_chat_completion_request.rb +537 -0
  89. data/lib/openapi_openai/models/create_chat_completion_request_function_call.rb +106 -0
  90. data/lib/openapi_openai/models/create_chat_completion_request_function_call_one_of.rb +222 -0
  91. data/lib/openapi_openai/models/create_chat_completion_request_model.rb +105 -0
  92. data/lib/openapi_openai/models/create_chat_completion_request_stop.rb +106 -0
  93. data/lib/openapi_openai/models/create_chat_completion_response.rb +296 -0
  94. data/lib/openapi_openai/models/create_chat_completion_response_choices_inner.rb +266 -0
  95. data/lib/openapi_openai/models/create_chat_completion_stream_response.rb +287 -0
  96. data/lib/openapi_openai/models/create_chat_completion_stream_response_choices_inner.rb +266 -0
  97. data/lib/openapi_openai/models/create_completion_request.rb +586 -0
  98. data/lib/openapi_openai/models/create_completion_request_model.rb +105 -0
  99. data/lib/openapi_openai/models/create_completion_request_prompt.rb +108 -0
  100. data/lib/openapi_openai/models/create_completion_request_stop.rb +106 -0
  101. data/lib/openapi_openai/models/create_completion_response.rb +296 -0
  102. data/lib/openapi_openai/models/create_completion_response_choices_inner.rb +299 -0
  103. data/lib/openapi_openai/models/create_completion_response_choices_inner_logprobs.rb +249 -0
  104. data/lib/openapi_openai/models/create_completion_response_usage.rb +253 -0
  105. data/lib/openapi_openai/models/create_edit_request.rb +362 -0
  106. data/lib/openapi_openai/models/create_edit_request_model.rb +105 -0
  107. data/lib/openapi_openai/models/create_edit_response.rb +271 -0
  108. data/lib/openapi_openai/models/create_edit_response_choices_inner.rb +276 -0
  109. data/lib/openapi_openai/models/create_embedding_request.rb +247 -0
  110. data/lib/openapi_openai/models/create_embedding_request_input.rb +108 -0
  111. data/lib/openapi_openai/models/create_embedding_request_model.rb +105 -0
  112. data/lib/openapi_openai/models/create_embedding_response.rb +271 -0
  113. data/lib/openapi_openai/models/create_embedding_response_data_inner.rb +255 -0
  114. data/lib/openapi_openai/models/create_embedding_response_usage.rb +237 -0
  115. data/lib/openapi_openai/models/create_fine_tune_request.rb +374 -0
  116. data/lib/openapi_openai/models/create_fine_tune_request_model.rb +105 -0
  117. data/lib/openapi_openai/models/create_image_request.rb +341 -0
  118. data/lib/openapi_openai/models/create_moderation_request.rb +230 -0
  119. data/lib/openapi_openai/models/create_moderation_request_input.rb +106 -0
  120. data/lib/openapi_openai/models/create_moderation_request_model.rb +105 -0
  121. data/lib/openapi_openai/models/create_moderation_response.rb +255 -0
  122. data/lib/openapi_openai/models/create_moderation_response_results_inner.rb +253 -0
  123. data/lib/openapi_openai/models/create_moderation_response_results_inner_categories.rb +317 -0
  124. data/lib/openapi_openai/models/create_moderation_response_results_inner_category_scores.rb +317 -0
  125. data/lib/openapi_openai/models/create_transcription_request_model.rb +105 -0
  126. data/lib/openapi_openai/models/create_transcription_response.rb +221 -0
  127. data/lib/openapi_openai/models/create_translation_response.rb +221 -0
  128. data/lib/openapi_openai/models/delete_file_response.rb +253 -0
  129. data/lib/openapi_openai/models/delete_model_response.rb +253 -0
  130. data/lib/openapi_openai/models/error.rb +261 -0
  131. data/lib/openapi_openai/models/error_response.rb +221 -0
  132. data/lib/openapi_openai/models/fine_tune.rb +410 -0
  133. data/lib/openapi_openai/models/fine_tune_event.rb +269 -0
  134. data/lib/openapi_openai/models/images_response.rb +239 -0
  135. data/lib/openapi_openai/models/images_response_data_inner.rb +223 -0
  136. data/lib/openapi_openai/models/list_files_response.rb +239 -0
  137. data/lib/openapi_openai/models/list_fine_tune_events_response.rb +239 -0
  138. data/lib/openapi_openai/models/list_fine_tunes_response.rb +239 -0
  139. data/lib/openapi_openai/models/list_models_response.rb +239 -0
  140. data/lib/openapi_openai/models/model.rb +269 -0
  141. data/lib/openapi_openai/models/open_ai_file.rb +320 -0
  142. data/lib/openapi_openai/version.rb +15 -0
  143. data/lib/openapi_openai.rb +99 -0
  144. data/openapi_openai.gemspec +39 -0
  145. data/spec/api/open_ai_api_spec.rb +306 -0
  146. data/spec/models/chat_completion_functions_spec.rb +48 -0
  147. data/spec/models/chat_completion_request_message_function_call_spec.rb +42 -0
  148. data/spec/models/chat_completion_request_message_spec.rb +58 -0
  149. data/spec/models/chat_completion_response_message_spec.rb +52 -0
  150. data/spec/models/chat_completion_stream_response_delta_spec.rb +52 -0
  151. data/spec/models/create_chat_completion_request_function_call_one_of_spec.rb +36 -0
  152. data/spec/models/create_chat_completion_request_function_call_spec.rb +32 -0
  153. data/spec/models/create_chat_completion_request_model_spec.rb +32 -0
  154. data/spec/models/create_chat_completion_request_spec.rb +114 -0
  155. data/spec/models/create_chat_completion_request_stop_spec.rb +32 -0
  156. data/spec/models/create_chat_completion_response_choices_inner_spec.rb +52 -0
  157. data/spec/models/create_chat_completion_response_spec.rb +66 -0
  158. data/spec/models/create_chat_completion_stream_response_choices_inner_spec.rb +52 -0
  159. data/spec/models/create_chat_completion_stream_response_spec.rb +60 -0
  160. data/spec/models/create_completion_request_model_spec.rb +32 -0
  161. data/spec/models/create_completion_request_prompt_spec.rb +32 -0
  162. data/spec/models/create_completion_request_spec.rb +126 -0
  163. data/spec/models/create_completion_request_stop_spec.rb +32 -0
  164. data/spec/models/create_completion_response_choices_inner_logprobs_spec.rb +54 -0
  165. data/spec/models/create_completion_response_choices_inner_spec.rb +58 -0
  166. data/spec/models/create_completion_response_spec.rb +66 -0
  167. data/spec/models/create_completion_response_usage_spec.rb +48 -0
  168. data/spec/models/create_edit_request_model_spec.rb +32 -0
  169. data/spec/models/create_edit_request_spec.rb +66 -0
  170. data/spec/models/create_edit_response_choices_inner_spec.rb +58 -0
  171. data/spec/models/create_edit_response_spec.rb +54 -0
  172. data/spec/models/create_embedding_request_input_spec.rb +32 -0
  173. data/spec/models/create_embedding_request_model_spec.rb +32 -0
  174. data/spec/models/create_embedding_request_spec.rb +48 -0
  175. data/spec/models/create_embedding_response_data_inner_spec.rb +48 -0
  176. data/spec/models/create_embedding_response_spec.rb +54 -0
  177. data/spec/models/create_embedding_response_usage_spec.rb +42 -0
  178. data/spec/models/create_fine_tune_request_model_spec.rb +32 -0
  179. data/spec/models/create_fine_tune_request_spec.rb +102 -0
  180. data/spec/models/create_image_request_spec.rb +68 -0
  181. data/spec/models/create_moderation_request_input_spec.rb +32 -0
  182. data/spec/models/create_moderation_request_model_spec.rb +32 -0
  183. data/spec/models/create_moderation_request_spec.rb +42 -0
  184. data/spec/models/create_moderation_response_results_inner_categories_spec.rb +72 -0
  185. data/spec/models/create_moderation_response_results_inner_category_scores_spec.rb +72 -0
  186. data/spec/models/create_moderation_response_results_inner_spec.rb +48 -0
  187. data/spec/models/create_moderation_response_spec.rb +48 -0
  188. data/spec/models/create_transcription_request_model_spec.rb +32 -0
  189. data/spec/models/create_transcription_response_spec.rb +36 -0
  190. data/spec/models/create_translation_response_spec.rb +36 -0
  191. data/spec/models/delete_file_response_spec.rb +48 -0
  192. data/spec/models/delete_model_response_spec.rb +48 -0
  193. data/spec/models/error_response_spec.rb +36 -0
  194. data/spec/models/error_spec.rb +54 -0
  195. data/spec/models/fine_tune_event_spec.rb +54 -0
  196. data/spec/models/fine_tune_spec.rb +108 -0
  197. data/spec/models/images_response_data_inner_spec.rb +42 -0
  198. data/spec/models/images_response_spec.rb +42 -0
  199. data/spec/models/list_files_response_spec.rb +42 -0
  200. data/spec/models/list_fine_tune_events_response_spec.rb +42 -0
  201. data/spec/models/list_fine_tunes_response_spec.rb +42 -0
  202. data/spec/models/list_models_response_spec.rb +42 -0
  203. data/spec/models/model_spec.rb +54 -0
  204. data/spec/models/open_ai_file_spec.rb +78 -0
  205. data/spec/spec_helper.rb +111 -0
  206. metadata +348 -0
@@ -0,0 +1,28 @@
1
+ # OpenApiOpenAIClient::CreateCompletionResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | |
8
+ | **object** | **String** | | |
9
+ | **created** | **Integer** | | |
10
+ | **model** | **String** | | |
11
+ | **choices** | [**Array<CreateCompletionResponseChoicesInner>**](CreateCompletionResponseChoicesInner.md) | | |
12
+ | **usage** | [**CreateCompletionResponseUsage**](CreateCompletionResponseUsage.md) | | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'openapi_openai'
18
+
19
+ instance = OpenApiOpenAIClient::CreateCompletionResponse.new(
20
+ id: null,
21
+ object: null,
22
+ created: null,
23
+ model: null,
24
+ choices: null,
25
+ usage: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,24 @@
1
+ # OpenApiOpenAIClient::CreateCompletionResponseChoicesInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **text** | **String** | | |
8
+ | **index** | **Integer** | | |
9
+ | **logprobs** | [**CreateCompletionResponseChoicesInnerLogprobs**](CreateCompletionResponseChoicesInnerLogprobs.md) | | |
10
+ | **finish_reason** | **String** | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'openapi_openai'
16
+
17
+ instance = OpenApiOpenAIClient::CreateCompletionResponseChoicesInner.new(
18
+ text: null,
19
+ index: null,
20
+ logprobs: null,
21
+ finish_reason: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,24 @@
1
+ # OpenApiOpenAIClient::CreateCompletionResponseChoicesInnerLogprobs
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **tokens** | **Array<String>** | | [optional] |
8
+ | **token_logprobs** | **Array<Float>** | | [optional] |
9
+ | **top_logprobs** | **Array<Object>** | | [optional] |
10
+ | **text_offset** | **Array<Integer>** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'openapi_openai'
16
+
17
+ instance = OpenApiOpenAIClient::CreateCompletionResponseChoicesInnerLogprobs.new(
18
+ tokens: null,
19
+ token_logprobs: null,
20
+ top_logprobs: null,
21
+ text_offset: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,22 @@
1
+ # OpenApiOpenAIClient::CreateCompletionResponseUsage
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **prompt_tokens** | **Integer** | | |
8
+ | **completion_tokens** | **Integer** | | |
9
+ | **total_tokens** | **Integer** | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'openapi_openai'
15
+
16
+ instance = OpenApiOpenAIClient::CreateCompletionResponseUsage.new(
17
+ prompt_tokens: null,
18
+ completion_tokens: null,
19
+ total_tokens: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,28 @@
1
+ # OpenApiOpenAIClient::CreateEditRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **model** | [**CreateEditRequestModel**](CreateEditRequestModel.md) | | |
8
+ | **input** | **String** | The input text to use as a starting point for the edit. | [optional][default to ''] |
9
+ | **instruction** | **String** | The instruction that tells the model how to edit the prompt. | |
10
+ | **n** | **Integer** | How many edits to generate for the input and instruction. | [optional][default to 1] |
11
+ | **temperature** | **Float** | What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or `top_p` but not both. | [optional][default to 1] |
12
+ | **top_p** | **Float** | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered. We generally recommend altering this or `temperature` but not both. | [optional][default to 1] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'openapi_openai'
18
+
19
+ instance = OpenApiOpenAIClient::CreateEditRequest.new(
20
+ model: null,
21
+ input: What day of the wek is it?,
22
+ instruction: Fix the spelling mistakes.,
23
+ n: 1,
24
+ temperature: 1,
25
+ top_p: 1
26
+ )
27
+ ```
28
+
@@ -0,0 +1,47 @@
1
+ # OpenApiOpenAIClient::CreateEditRequestModel
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'openapi_openai'
13
+
14
+ OpenApiOpenAIClient::CreateEditRequestModel.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'String'
18
+ # ]
19
+ ```
20
+
21
+ ### build
22
+
23
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
24
+
25
+ #### Example
26
+
27
+ ```ruby
28
+ require 'openapi_openai'
29
+
30
+ OpenApiOpenAIClient::CreateEditRequestModel.build(data)
31
+ # => #<String:0x00007fdd4aab02a0>
32
+
33
+ OpenApiOpenAIClient::CreateEditRequestModel.build(data_that_doesnt_match)
34
+ # => nil
35
+ ```
36
+
37
+ #### Parameters
38
+
39
+ | Name | Type | Description |
40
+ | ---- | ---- | ----------- |
41
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
42
+
43
+ #### Return type
44
+
45
+ - `String`
46
+ - `nil` (if no type matches)
47
+
@@ -0,0 +1,24 @@
1
+ # OpenApiOpenAIClient::CreateEditResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **object** | **String** | | |
8
+ | **created** | **Integer** | | |
9
+ | **choices** | [**Array&lt;CreateEditResponseChoicesInner&gt;**](CreateEditResponseChoicesInner.md) | | |
10
+ | **usage** | [**CreateCompletionResponseUsage**](CreateCompletionResponseUsage.md) | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'openapi_openai'
16
+
17
+ instance = OpenApiOpenAIClient::CreateEditResponse.new(
18
+ object: null,
19
+ created: null,
20
+ choices: null,
21
+ usage: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,24 @@
1
+ # OpenApiOpenAIClient::CreateEditResponseChoicesInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **text** | **String** | | [optional] |
8
+ | **index** | **Integer** | | [optional] |
9
+ | **logprobs** | [**CreateCompletionResponseChoicesInnerLogprobs**](CreateCompletionResponseChoicesInnerLogprobs.md) | | [optional] |
10
+ | **finish_reason** | **String** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'openapi_openai'
16
+
17
+ instance = OpenApiOpenAIClient::CreateEditResponseChoicesInner.new(
18
+ text: null,
19
+ index: null,
20
+ logprobs: null,
21
+ finish_reason: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,22 @@
1
+ # OpenApiOpenAIClient::CreateEmbeddingRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **model** | [**CreateEmbeddingRequestModel**](CreateEmbeddingRequestModel.md) | | |
8
+ | **input** | [**CreateEmbeddingRequestInput**](CreateEmbeddingRequestInput.md) | | |
9
+ | **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] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'openapi_openai'
15
+
16
+ instance = OpenApiOpenAIClient::CreateEmbeddingRequest.new(
17
+ model: null,
18
+ input: null,
19
+ user: user-1234
20
+ )
21
+ ```
22
+
@@ -0,0 +1,53 @@
1
+ # OpenApiOpenAIClient::CreateEmbeddingRequestInput
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'openapi_openai'
13
+
14
+ OpenApiOpenAIClient::CreateEmbeddingRequestInput.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'Array<Array<Integer>>',
18
+ # :'Array<Integer>',
19
+ # :'Array<String>',
20
+ # :'String'
21
+ # ]
22
+ ```
23
+
24
+ ### build
25
+
26
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
27
+
28
+ #### Example
29
+
30
+ ```ruby
31
+ require 'openapi_openai'
32
+
33
+ OpenApiOpenAIClient::CreateEmbeddingRequestInput.build(data)
34
+ # => #<Array<Array<Integer>>:0x00007fdd4aab02a0>
35
+
36
+ OpenApiOpenAIClient::CreateEmbeddingRequestInput.build(data_that_doesnt_match)
37
+ # => nil
38
+ ```
39
+
40
+ #### Parameters
41
+
42
+ | Name | Type | Description |
43
+ | ---- | ---- | ----------- |
44
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
45
+
46
+ #### Return type
47
+
48
+ - `Array<Array<Integer>>`
49
+ - `Array<Integer>`
50
+ - `Array<String>`
51
+ - `String`
52
+ - `nil` (if no type matches)
53
+
@@ -0,0 +1,47 @@
1
+ # OpenApiOpenAIClient::CreateEmbeddingRequestModel
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'openapi_openai'
13
+
14
+ OpenApiOpenAIClient::CreateEmbeddingRequestModel.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'String'
18
+ # ]
19
+ ```
20
+
21
+ ### build
22
+
23
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
24
+
25
+ #### Example
26
+
27
+ ```ruby
28
+ require 'openapi_openai'
29
+
30
+ OpenApiOpenAIClient::CreateEmbeddingRequestModel.build(data)
31
+ # => #<String:0x00007fdd4aab02a0>
32
+
33
+ OpenApiOpenAIClient::CreateEmbeddingRequestModel.build(data_that_doesnt_match)
34
+ # => nil
35
+ ```
36
+
37
+ #### Parameters
38
+
39
+ | Name | Type | Description |
40
+ | ---- | ---- | ----------- |
41
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
42
+
43
+ #### Return type
44
+
45
+ - `String`
46
+ - `nil` (if no type matches)
47
+
@@ -0,0 +1,24 @@
1
+ # OpenApiOpenAIClient::CreateEmbeddingResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **object** | **String** | | |
8
+ | **model** | **String** | | |
9
+ | **data** | [**Array&lt;CreateEmbeddingResponseDataInner&gt;**](CreateEmbeddingResponseDataInner.md) | | |
10
+ | **usage** | [**CreateEmbeddingResponseUsage**](CreateEmbeddingResponseUsage.md) | | |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'openapi_openai'
16
+
17
+ instance = OpenApiOpenAIClient::CreateEmbeddingResponse.new(
18
+ object: null,
19
+ model: null,
20
+ data: null,
21
+ usage: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,22 @@
1
+ # OpenApiOpenAIClient::CreateEmbeddingResponseDataInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **index** | **Integer** | | |
8
+ | **object** | **String** | | |
9
+ | **embedding** | **Array&lt;Float&gt;** | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'openapi_openai'
15
+
16
+ instance = OpenApiOpenAIClient::CreateEmbeddingResponseDataInner.new(
17
+ index: null,
18
+ object: null,
19
+ embedding: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # OpenApiOpenAIClient::CreateEmbeddingResponseUsage
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **prompt_tokens** | **Integer** | | |
8
+ | **total_tokens** | **Integer** | | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'openapi_openai'
14
+
15
+ instance = OpenApiOpenAIClient::CreateEmbeddingResponseUsage.new(
16
+ prompt_tokens: null,
17
+ total_tokens: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,40 @@
1
+ # OpenApiOpenAIClient::CreateFineTuneRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **training_file** | **String** | The ID of an uploaded file that contains training data. See [upload file](/docs/api-reference/files/upload) for how to upload a file. Your dataset must be formatted as a JSONL file, where each training example is a JSON object with the keys \&quot;prompt\&quot; and \&quot;completion\&quot;. Additionally, you must upload your file with the purpose &#x60;fine-tune&#x60;. See the [fine-tuning guide](/docs/guides/fine-tuning/creating-training-data) for more details. | |
8
+ | **validation_file** | **String** | The ID of an uploaded file that contains validation data. If you provide this file, the data is used to generate validation metrics periodically during fine-tuning. These metrics can be viewed in the [fine-tuning results file](/docs/guides/fine-tuning/analyzing-your-fine-tuned-model). Your train and validation data should be mutually exclusive. Your dataset must be formatted as a JSONL file, where each validation example is a JSON object with the keys \&quot;prompt\&quot; and \&quot;completion\&quot;. Additionally, you must upload your file with the purpose &#x60;fine-tune&#x60;. See the [fine-tuning guide](/docs/guides/fine-tuning/creating-training-data) for more details. | [optional] |
9
+ | **model** | [**CreateFineTuneRequestModel**](CreateFineTuneRequestModel.md) | | [optional] |
10
+ | **n_epochs** | **Integer** | The number of epochs to train the model for. An epoch refers to one full cycle through the training dataset. | [optional][default to 4] |
11
+ | **batch_size** | **Integer** | The batch size to use for training. The batch size is the number of training examples used to train a single forward and backward pass. By default, the batch size will be dynamically configured to be ~0.2% of the number of examples in the training set, capped at 256 - in general, we&#39;ve found that larger batch sizes tend to work better for larger datasets. | [optional] |
12
+ | **learning_rate_multiplier** | **Float** | The learning rate multiplier to use for training. The fine-tuning learning rate is the original learning rate used for pretraining multiplied by this value. By default, the learning rate multiplier is the 0.05, 0.1, or 0.2 depending on final &#x60;batch_size&#x60; (larger learning rates tend to perform better with larger batch sizes). We recommend experimenting with values in the range 0.02 to 0.2 to see what produces the best results. | [optional] |
13
+ | **prompt_loss_weight** | **Float** | The weight to use for loss on the prompt tokens. This controls how much the model tries to learn to generate the prompt (as compared to the completion which always has a weight of 1.0), and can add a stabilizing effect to training when completions are short. If prompts are extremely long (relative to completions), it may make sense to reduce this weight so as to avoid over-prioritizing learning the prompt. | [optional][default to 0.01] |
14
+ | **compute_classification_metrics** | **Boolean** | If set, we calculate classification-specific metrics such as accuracy and F-1 score using the validation set at the end of every epoch. These metrics can be viewed in the [results file](/docs/guides/fine-tuning/analyzing-your-fine-tuned-model). In order to compute classification metrics, you must provide a &#x60;validation_file&#x60;. Additionally, you must specify &#x60;classification_n_classes&#x60; for multiclass classification or &#x60;classification_positive_class&#x60; for binary classification. | [optional][default to false] |
15
+ | **classification_n_classes** | **Integer** | The number of classes in a classification task. This parameter is required for multiclass classification. | [optional] |
16
+ | **classification_positive_class** | **String** | The positive class in binary classification. This parameter is needed to generate precision, recall, and F1 metrics when doing binary classification. | [optional] |
17
+ | **classification_betas** | **Array&lt;Float&gt;** | If this is provided, we calculate F-beta scores at the specified beta values. The F-beta score is a generalization of F-1 score. This is only used for binary classification. With a beta of 1 (i.e. the F-1 score), precision and recall are given the same weight. A larger beta score puts more weight on recall and less on precision. A smaller beta score puts more weight on precision and less on recall. | [optional] |
18
+ | **suffix** | **String** | A string of up to 40 characters that will be added to your fine-tuned model name. For example, a &#x60;suffix&#x60; of \&quot;custom-model-name\&quot; would produce a model name like &#x60;ada:ft-your-org:custom-model-name-2022-02-15-04-21-04&#x60;. | [optional] |
19
+
20
+ ## Example
21
+
22
+ ```ruby
23
+ require 'openapi_openai'
24
+
25
+ instance = OpenApiOpenAIClient::CreateFineTuneRequest.new(
26
+ training_file: file-ajSREls59WBbvgSzJSVWxMCB,
27
+ validation_file: file-XjSREls59WBbvgSzJSVWxMCa,
28
+ model: null,
29
+ n_epochs: null,
30
+ batch_size: null,
31
+ learning_rate_multiplier: null,
32
+ prompt_loss_weight: null,
33
+ compute_classification_metrics: null,
34
+ classification_n_classes: null,
35
+ classification_positive_class: null,
36
+ classification_betas: [0.6,1,1.5,2],
37
+ suffix: null
38
+ )
39
+ ```
40
+
@@ -0,0 +1,47 @@
1
+ # OpenApiOpenAIClient::CreateFineTuneRequestModel
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'openapi_openai'
13
+
14
+ OpenApiOpenAIClient::CreateFineTuneRequestModel.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'String'
18
+ # ]
19
+ ```
20
+
21
+ ### build
22
+
23
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
24
+
25
+ #### Example
26
+
27
+ ```ruby
28
+ require 'openapi_openai'
29
+
30
+ OpenApiOpenAIClient::CreateFineTuneRequestModel.build(data)
31
+ # => #<String:0x00007fdd4aab02a0>
32
+
33
+ OpenApiOpenAIClient::CreateFineTuneRequestModel.build(data_that_doesnt_match)
34
+ # => nil
35
+ ```
36
+
37
+ #### Parameters
38
+
39
+ | Name | Type | Description |
40
+ | ---- | ---- | ----------- |
41
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
42
+
43
+ #### Return type
44
+
45
+ - `String`
46
+ - `nil` (if no type matches)
47
+
@@ -0,0 +1,26 @@
1
+ # OpenApiOpenAIClient::CreateImageRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **prompt** | **String** | A text description of the desired image(s). The maximum length is 1000 characters. | |
8
+ | **n** | **Integer** | The number of images to generate. Must be between 1 and 10. | [optional][default to 1] |
9
+ | **size** | **String** | The size of the generated images. Must be one of &#x60;256x256&#x60;, &#x60;512x512&#x60;, or &#x60;1024x1024&#x60;. | [optional][default to &#39;1024x1024&#39;] |
10
+ | **response_format** | **String** | The format in which the generated images are returned. Must be one of &#x60;url&#x60; or &#x60;b64_json&#x60;. | [optional][default to &#39;url&#39;] |
11
+ | **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] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'openapi_openai'
17
+
18
+ instance = OpenApiOpenAIClient::CreateImageRequest.new(
19
+ prompt: A cute baby sea otter,
20
+ n: 1,
21
+ size: 1024x1024,
22
+ response_format: url,
23
+ user: user-1234
24
+ )
25
+ ```
26
+
@@ -0,0 +1,20 @@
1
+ # OpenApiOpenAIClient::CreateModerationRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **input** | [**CreateModerationRequestInput**](CreateModerationRequestInput.md) | | |
8
+ | **model** | [**CreateModerationRequestModel**](CreateModerationRequestModel.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'openapi_openai'
14
+
15
+ instance = OpenApiOpenAIClient::CreateModerationRequest.new(
16
+ input: null,
17
+ model: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,49 @@
1
+ # OpenApiOpenAIClient::CreateModerationRequestInput
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'openapi_openai'
13
+
14
+ OpenApiOpenAIClient::CreateModerationRequestInput.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'Array<String>',
18
+ # :'String'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'openapi_openai'
30
+
31
+ OpenApiOpenAIClient::CreateModerationRequestInput.build(data)
32
+ # => #<Array<String>:0x00007fdd4aab02a0>
33
+
34
+ OpenApiOpenAIClient::CreateModerationRequestInput.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `Array<String>`
47
+ - `String`
48
+ - `nil` (if no type matches)
49
+
@@ -0,0 +1,47 @@
1
+ # OpenApiOpenAIClient::CreateModerationRequestModel
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'openapi_openai'
13
+
14
+ OpenApiOpenAIClient::CreateModerationRequestModel.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'String'
18
+ # ]
19
+ ```
20
+
21
+ ### build
22
+
23
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
24
+
25
+ #### Example
26
+
27
+ ```ruby
28
+ require 'openapi_openai'
29
+
30
+ OpenApiOpenAIClient::CreateModerationRequestModel.build(data)
31
+ # => #<String:0x00007fdd4aab02a0>
32
+
33
+ OpenApiOpenAIClient::CreateModerationRequestModel.build(data_that_doesnt_match)
34
+ # => nil
35
+ ```
36
+
37
+ #### Parameters
38
+
39
+ | Name | Type | Description |
40
+ | ---- | ---- | ----------- |
41
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
42
+
43
+ #### Return type
44
+
45
+ - `String`
46
+ - `nil` (if no type matches)
47
+
@@ -0,0 +1,22 @@
1
+ # OpenApiOpenAIClient::CreateModerationResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | |
8
+ | **model** | **String** | | |
9
+ | **results** | [**Array&lt;CreateModerationResponseResultsInner&gt;**](CreateModerationResponseResultsInner.md) | | |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'openapi_openai'
15
+
16
+ instance = OpenApiOpenAIClient::CreateModerationResponse.new(
17
+ id: null,
18
+ model: null,
19
+ results: null
20
+ )
21
+ ```
22
+