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,39 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #OpenAI API
5
+
6
+ #APIs for sampling from and fine-tuning language models
7
+
8
+ The version of the OpenAPI document: 2.0.0
9
+ Contact: blah+oapicf@cliffano.com
10
+ Generated by: https://openapi-generator.tech
11
+ Generator version: 7.4.0
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "openapi_openai/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "openapi_openai"
20
+ s.version = OpenApiOpenAIClient::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["OpenAPI Clients Factory"]
23
+ s.email = ["blah+oapicf@cliffano.com"]
24
+ s.homepage = "https://github.com/oapicf/openapi-openai"
25
+ s.summary = "OpenAI API Ruby Gem"
26
+ s.description = "APIs for sampling from and fine-tuning language models"
27
+ s.license = "MIT"
28
+ s.required_ruby_version = ">= 2.0"
29
+ s.metadata = {}
30
+
31
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+
35
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
36
+ s.test_files = `find spec/*`.split("\n")
37
+ s.executables = []
38
+ s.require_paths = ["lib"]
39
+ end
@@ -0,0 +1,306 @@
1
+ =begin
2
+ #OpenAI API
3
+
4
+ #APIs for sampling from and fine-tuning language models
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: blah+oapicf@cliffano.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for OpenApiOpenAIClient::OpenAIApi
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
18
+ # Please update as you see appropriate
19
+ describe 'OpenAIApi' do
20
+ before do
21
+ # run before each test
22
+ @api_instance = OpenApiOpenAIClient::OpenAIApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of OpenAIApi' do
30
+ it 'should create an instance of OpenAIApi' do
31
+ expect(@api_instance).to be_instance_of(OpenApiOpenAIClient::OpenAIApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for cancel_fine_tune
36
+ # Immediately cancel a fine-tune job.
37
+ # @param fine_tune_id The ID of the fine-tune job to cancel
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [FineTune]
40
+ describe 'cancel_fine_tune test' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ # unit tests for create_chat_completion
47
+ # Creates a model response for the given chat conversation.
48
+ # @param create_chat_completion_request
49
+ # @param [Hash] opts the optional parameters
50
+ # @return [CreateChatCompletionResponse]
51
+ describe 'create_chat_completion test' do
52
+ it 'should work' do
53
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
54
+ end
55
+ end
56
+
57
+ # unit tests for create_completion
58
+ # Creates a completion for the provided prompt and parameters.
59
+ # @param create_completion_request
60
+ # @param [Hash] opts the optional parameters
61
+ # @return [CreateCompletionResponse]
62
+ describe 'create_completion test' do
63
+ it 'should work' do
64
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
65
+ end
66
+ end
67
+
68
+ # unit tests for create_edit
69
+ # Creates a new edit for the provided input, instruction, and parameters.
70
+ # @param create_edit_request
71
+ # @param [Hash] opts the optional parameters
72
+ # @return [CreateEditResponse]
73
+ describe 'create_edit test' do
74
+ it 'should work' do
75
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
76
+ end
77
+ end
78
+
79
+ # unit tests for create_embedding
80
+ # Creates an embedding vector representing the input text.
81
+ # @param create_embedding_request
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [CreateEmbeddingResponse]
84
+ describe 'create_embedding test' do
85
+ it 'should work' do
86
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
87
+ end
88
+ end
89
+
90
+ # unit tests for create_file
91
+ # 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.
92
+ # @param 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).
93
+ # @param purpose 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.
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [OpenAIFile]
96
+ describe 'create_file test' do
97
+ it 'should work' do
98
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
99
+ end
100
+ end
101
+
102
+ # unit tests for create_fine_tune
103
+ # 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)
104
+ # @param create_fine_tune_request
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [FineTune]
107
+ describe 'create_fine_tune test' do
108
+ it 'should work' do
109
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
110
+ end
111
+ end
112
+
113
+ # unit tests for create_image
114
+ # Creates an image given a prompt.
115
+ # @param create_image_request
116
+ # @param [Hash] opts the optional parameters
117
+ # @return [ImagesResponse]
118
+ describe 'create_image test' do
119
+ it 'should work' do
120
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
121
+ end
122
+ end
123
+
124
+ # unit tests for create_image_edit
125
+ # Creates an edited or extended image given an original image and a prompt.
126
+ # @param image 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.
127
+ # @param prompt A text description of the desired image(s). The maximum length is 1000 characters.
128
+ # @param [Hash] opts the optional parameters
129
+ # @option opts [File] :mask 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`.
130
+ # @option opts [Integer] :n The number of images to generate. Must be between 1 and 10.
131
+ # @option opts [String] :size The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
132
+ # @option opts [String] :response_format The format in which the generated images are returned. Must be one of `url` or `b64_json`.
133
+ # @option opts [String] :user 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).
134
+ # @return [ImagesResponse]
135
+ describe 'create_image_edit test' do
136
+ it 'should work' do
137
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
138
+ end
139
+ end
140
+
141
+ # unit tests for create_image_variation
142
+ # Creates a variation of a given image.
143
+ # @param image The image to use as the basis for the variation(s). Must be a valid PNG file, less than 4MB, and square.
144
+ # @param [Hash] opts the optional parameters
145
+ # @option opts [Integer] :n The number of images to generate. Must be between 1 and 10.
146
+ # @option opts [String] :size The size of the generated images. Must be one of `256x256`, `512x512`, or `1024x1024`.
147
+ # @option opts [String] :response_format The format in which the generated images are returned. Must be one of `url` or `b64_json`.
148
+ # @option opts [String] :user 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).
149
+ # @return [ImagesResponse]
150
+ describe 'create_image_variation test' do
151
+ it 'should work' do
152
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
153
+ end
154
+ end
155
+
156
+ # unit tests for create_moderation
157
+ # Classifies if text violates OpenAI's Content Policy
158
+ # @param create_moderation_request
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [CreateModerationResponse]
161
+ describe 'create_moderation test' do
162
+ it 'should work' do
163
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
164
+ end
165
+ end
166
+
167
+ # unit tests for create_transcription
168
+ # Transcribes audio into the input language.
169
+ # @param file The audio file object (not file name) to transcribe, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
170
+ # @param model
171
+ # @param [Hash] opts the optional parameters
172
+ # @option opts [String] :prompt 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.
173
+ # @option opts [String] :response_format The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
174
+ # @option opts [Float] :temperature 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.
175
+ # @option opts [String] :language 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.
176
+ # @return [CreateTranscriptionResponse]
177
+ describe 'create_transcription test' do
178
+ it 'should work' do
179
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
180
+ end
181
+ end
182
+
183
+ # unit tests for create_translation
184
+ # Translates audio into English.
185
+ # @param file The audio file object (not file name) translate, in one of these formats: mp3, mp4, mpeg, mpga, m4a, wav, or webm.
186
+ # @param model
187
+ # @param [Hash] opts the optional parameters
188
+ # @option opts [String] :prompt 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.
189
+ # @option opts [String] :response_format The format of the transcript output, in one of these options: json, text, srt, verbose_json, or vtt.
190
+ # @option opts [Float] :temperature 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.
191
+ # @return [CreateTranslationResponse]
192
+ describe 'create_translation test' do
193
+ it 'should work' do
194
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
195
+ end
196
+ end
197
+
198
+ # unit tests for delete_file
199
+ # Delete a file.
200
+ # @param file_id The ID of the file to use for this request
201
+ # @param [Hash] opts the optional parameters
202
+ # @return [DeleteFileResponse]
203
+ describe 'delete_file test' do
204
+ it 'should work' do
205
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
206
+ end
207
+ end
208
+
209
+ # unit tests for delete_model
210
+ # Delete a fine-tuned model. You must have the Owner role in your organization.
211
+ # @param model The model to delete
212
+ # @param [Hash] opts the optional parameters
213
+ # @return [DeleteModelResponse]
214
+ describe 'delete_model test' do
215
+ it 'should work' do
216
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
217
+ end
218
+ end
219
+
220
+ # unit tests for download_file
221
+ # Returns the contents of the specified file
222
+ # @param file_id The ID of the file to use for this request
223
+ # @param [Hash] opts the optional parameters
224
+ # @return [String]
225
+ describe 'download_file test' do
226
+ it 'should work' do
227
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
228
+ end
229
+ end
230
+
231
+ # unit tests for list_files
232
+ # Returns a list of files that belong to the user's organization.
233
+ # @param [Hash] opts the optional parameters
234
+ # @return [ListFilesResponse]
235
+ describe 'list_files test' do
236
+ it 'should work' do
237
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
238
+ end
239
+ end
240
+
241
+ # unit tests for list_fine_tune_events
242
+ # Get fine-grained status updates for a fine-tune job.
243
+ # @param fine_tune_id The ID of the fine-tune job to get events for.
244
+ # @param [Hash] opts the optional parameters
245
+ # @option opts [Boolean] :stream 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.
246
+ # @return [ListFineTuneEventsResponse]
247
+ describe 'list_fine_tune_events test' do
248
+ it 'should work' do
249
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
250
+ end
251
+ end
252
+
253
+ # unit tests for list_fine_tunes
254
+ # List your organization's fine-tuning jobs
255
+ # @param [Hash] opts the optional parameters
256
+ # @return [ListFineTunesResponse]
257
+ describe 'list_fine_tunes test' do
258
+ it 'should work' do
259
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
260
+ end
261
+ end
262
+
263
+ # unit tests for list_models
264
+ # Lists the currently available models, and provides basic information about each one such as the owner and availability.
265
+ # @param [Hash] opts the optional parameters
266
+ # @return [ListModelsResponse]
267
+ describe 'list_models test' do
268
+ it 'should work' do
269
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
270
+ end
271
+ end
272
+
273
+ # unit tests for retrieve_file
274
+ # Returns information about a specific file.
275
+ # @param file_id The ID of the file to use for this request
276
+ # @param [Hash] opts the optional parameters
277
+ # @return [OpenAIFile]
278
+ describe 'retrieve_file test' do
279
+ it 'should work' do
280
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
281
+ end
282
+ end
283
+
284
+ # unit tests for retrieve_fine_tune
285
+ # Gets info about the fine-tune job. [Learn more about Fine-tuning](/docs/guides/fine-tuning)
286
+ # @param fine_tune_id The ID of the fine-tune job
287
+ # @param [Hash] opts the optional parameters
288
+ # @return [FineTune]
289
+ describe 'retrieve_fine_tune test' do
290
+ it 'should work' do
291
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
292
+ end
293
+ end
294
+
295
+ # unit tests for retrieve_model
296
+ # Retrieves a model instance, providing basic information about the model such as the owner and permissioning.
297
+ # @param model The ID of the model to use for this request
298
+ # @param [Hash] opts the optional parameters
299
+ # @return [Model]
300
+ describe 'retrieve_model test' do
301
+ it 'should work' do
302
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
303
+ end
304
+ end
305
+
306
+ end
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #OpenAI API
3
+
4
+ #APIs for sampling from and fine-tuning language models
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: blah+oapicf@cliffano.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for OpenApiOpenAIClient::ChatCompletionFunctions
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe OpenApiOpenAIClient::ChatCompletionFunctions do
21
+ let(:instance) { OpenApiOpenAIClient::ChatCompletionFunctions.new }
22
+
23
+ describe 'test an instance of ChatCompletionFunctions' do
24
+ it 'should create an instance of ChatCompletionFunctions' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(OpenApiOpenAIClient::ChatCompletionFunctions)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "name"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "description"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "parameters"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ end
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #OpenAI API
3
+
4
+ #APIs for sampling from and fine-tuning language models
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: blah+oapicf@cliffano.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for OpenApiOpenAIClient::ChatCompletionRequestMessageFunctionCall
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe OpenApiOpenAIClient::ChatCompletionRequestMessageFunctionCall do
21
+ let(:instance) { OpenApiOpenAIClient::ChatCompletionRequestMessageFunctionCall.new }
22
+
23
+ describe 'test an instance of ChatCompletionRequestMessageFunctionCall' do
24
+ it 'should create an instance of ChatCompletionRequestMessageFunctionCall' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(OpenApiOpenAIClient::ChatCompletionRequestMessageFunctionCall)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "name"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "arguments"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ end
@@ -0,0 +1,58 @@
1
+ =begin
2
+ #OpenAI API
3
+
4
+ #APIs for sampling from and fine-tuning language models
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: blah+oapicf@cliffano.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for OpenApiOpenAIClient::ChatCompletionRequestMessage
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe OpenApiOpenAIClient::ChatCompletionRequestMessage do
21
+ let(:instance) { OpenApiOpenAIClient::ChatCompletionRequestMessage.new }
22
+
23
+ describe 'test an instance of ChatCompletionRequestMessage' do
24
+ it 'should create an instance of ChatCompletionRequestMessage' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(OpenApiOpenAIClient::ChatCompletionRequestMessage)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "role"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["system", "user", "assistant", "function"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.role = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "content"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "name"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
+ end
50
+ end
51
+
52
+ describe 'test attribute "function_call"' do
53
+ it 'should work' do
54
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
55
+ end
56
+ end
57
+
58
+ end
@@ -0,0 +1,52 @@
1
+ =begin
2
+ #OpenAI API
3
+
4
+ #APIs for sampling from and fine-tuning language models
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: blah+oapicf@cliffano.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for OpenApiOpenAIClient::ChatCompletionResponseMessage
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe OpenApiOpenAIClient::ChatCompletionResponseMessage do
21
+ let(:instance) { OpenApiOpenAIClient::ChatCompletionResponseMessage.new }
22
+
23
+ describe 'test an instance of ChatCompletionResponseMessage' do
24
+ it 'should create an instance of ChatCompletionResponseMessage' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(OpenApiOpenAIClient::ChatCompletionResponseMessage)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "role"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["system", "user", "assistant", "function"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.role = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "content"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "function_call"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
+ end
50
+ end
51
+
52
+ end
@@ -0,0 +1,52 @@
1
+ =begin
2
+ #OpenAI API
3
+
4
+ #APIs for sampling from and fine-tuning language models
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: blah+oapicf@cliffano.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for OpenApiOpenAIClient::ChatCompletionStreamResponseDelta
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe OpenApiOpenAIClient::ChatCompletionStreamResponseDelta do
21
+ let(:instance) { OpenApiOpenAIClient::ChatCompletionStreamResponseDelta.new }
22
+
23
+ describe 'test an instance of ChatCompletionStreamResponseDelta' do
24
+ it 'should create an instance of ChatCompletionStreamResponseDelta' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(OpenApiOpenAIClient::ChatCompletionStreamResponseDelta)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "role"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["system", "user", "assistant", "function"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.role = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "content"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "function_call"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
49
+ end
50
+ end
51
+
52
+ end
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #OpenAI API
3
+
4
+ #APIs for sampling from and fine-tuning language models
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: blah+oapicf@cliffano.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for OpenApiOpenAIClient::CreateChatCompletionRequestFunctionCallOneOf
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe OpenApiOpenAIClient::CreateChatCompletionRequestFunctionCallOneOf do
21
+ let(:instance) { OpenApiOpenAIClient::CreateChatCompletionRequestFunctionCallOneOf.new }
22
+
23
+ describe 'test an instance of CreateChatCompletionRequestFunctionCallOneOf' do
24
+ it 'should create an instance of CreateChatCompletionRequestFunctionCallOneOf' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(OpenApiOpenAIClient::CreateChatCompletionRequestFunctionCallOneOf)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "name"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ end
@@ -0,0 +1,32 @@
1
+ =begin
2
+ #OpenAI API
3
+
4
+ #APIs for sampling from and fine-tuning language models
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: blah+oapicf@cliffano.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.4.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for OpenApiOpenAIClient::CreateChatCompletionRequestFunctionCall
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe OpenApiOpenAIClient::CreateChatCompletionRequestFunctionCall do
21
+ describe '.openapi_one_of' do
22
+ it 'lists the items referenced in the oneOf array' do
23
+ expect(described_class.openapi_one_of).to_not be_empty
24
+ end
25
+ end
26
+
27
+ describe '.build' do
28
+ it 'returns the correct model' do
29
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
30
+ end
31
+ end
32
+ end