azure_openai_client 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +10 -0
  3. data/Gemfile.lock +76 -0
  4. data/README.md +50 -87
  5. data/Rakefile +10 -0
  6. data/azure_openai_client.gemspec +38 -0
  7. data/docs/ChatCompletionsCreate200Response.md +28 -0
  8. data/docs/ChatCompletionsCreate200ResponseChoicesInner.md +22 -0
  9. data/docs/ChatCompletionsCreate200ResponseChoicesInnerMessage.md +20 -0
  10. data/docs/ChatCompletionsCreate200ResponseUsage.md +22 -0
  11. data/docs/ChatCompletionsCreateRequest.md +38 -0
  12. data/docs/ChatCompletionsCreateRequestMessagesInner.md +22 -0
  13. data/docs/ChatCompletionsCreateRequestStop.md +49 -0
  14. data/docs/CompletionsCreate200Response.md +28 -0
  15. data/docs/CompletionsCreate200ResponseChoicesInner.md +24 -0
  16. data/docs/CompletionsCreate200ResponseChoicesInnerLogprobs.md +24 -0
  17. data/docs/CompletionsCreate200ResponseUsage.md +22 -0
  18. data/docs/CompletionsCreateRequest.md +52 -0
  19. data/docs/CompletionsCreateRequestPrompt.md +49 -0
  20. data/docs/CompletionsCreateRequestStop.md +49 -0
  21. data/docs/DefaultApi.md +238 -0
  22. data/docs/EmbeddingsCreate200Response.md +24 -0
  23. data/docs/EmbeddingsCreate200ResponseDataInner.md +22 -0
  24. data/docs/EmbeddingsCreate200ResponseUsage.md +20 -0
  25. data/docs/EmbeddingsCreateRequest.md +24 -0
  26. data/docs/EmbeddingsCreateRequestInput.md +49 -0
  27. data/docs/ErrorResponse.md +18 -0
  28. data/docs/ErrorResponseError.md +24 -0
  29. data/git_push.sh +57 -0
  30. data/inference.json +816 -0
  31. data/lib/azure_openai_client/api/default_api.rb +120 -93
  32. data/lib/azure_openai_client/api_client.rb +77 -75
  33. data/lib/azure_openai_client/api_error.rb +5 -5
  34. data/lib/azure_openai_client/configuration.rb +114 -22
  35. data/lib/azure_openai_client/models/{inline_response_200_2.rb → chat_completions_create200_response.rb} +34 -26
  36. data/lib/azure_openai_client/models/{inline_response_200_2_choices.rb → chat_completions_create200_response_choices_inner.rb} +28 -20
  37. data/lib/azure_openai_client/models/{inline_response_200_2_message.rb → chat_completions_create200_response_choices_inner_message.rb} +28 -20
  38. data/lib/azure_openai_client/models/{inline_response_200_2_usage.rb → chat_completions_create200_response_usage.rb} +28 -20
  39. data/lib/azure_openai_client/models/{chat_completions_body.rb → chat_completions_create_request.rb} +183 -37
  40. data/lib/azure_openai_client/models/{deploymentsdeploymentidchatcompletions_messages.rb → chat_completions_create_request_messages_inner.rb} +30 -22
  41. data/lib/azure_openai_client/models/chat_completions_create_request_stop.rb +105 -0
  42. data/lib/azure_openai_client/models/{inline_response_200.rb → completions_create200_response.rb} +34 -26
  43. data/lib/azure_openai_client/models/{inline_response_200_choices.rb → completions_create200_response_choices_inner.rb} +30 -22
  44. data/lib/azure_openai_client/models/{inline_response_200_logprobs.rb → completions_create200_response_choices_inner_logprobs.rb} +30 -22
  45. data/lib/azure_openai_client/models/{inline_response_200_usage.rb → completions_create200_response_usage.rb} +28 -20
  46. data/lib/azure_openai_client/models/{deploymentid_completions_body.rb → completions_create_request.rb} +58 -52
  47. data/lib/azure_openai_client/models/completions_create_request_prompt.rb +105 -0
  48. data/lib/azure_openai_client/models/completions_create_request_stop.rb +105 -0
  49. data/lib/azure_openai_client/models/{inline_response_200_1.rb → embeddings_create200_response.rb} +30 -22
  50. data/lib/azure_openai_client/models/{inline_response_200_1_data.rb → embeddings_create200_response_data_inner.rb} +28 -20
  51. data/lib/azure_openai_client/models/{inline_response_200_1_usage.rb → embeddings_create200_response_usage.rb} +26 -18
  52. data/lib/azure_openai_client/models/embeddings_create_request.rb +252 -0
  53. data/lib/azure_openai_client/models/embeddings_create_request_input.rb +105 -0
  54. data/lib/azure_openai_client/models/error_response.rb +21 -13
  55. data/lib/azure_openai_client/models/error_response_error.rb +27 -19
  56. data/lib/azure_openai_client/version.rb +5 -6
  57. data/lib/azure_openai_client.rb +23 -23
  58. data/openapi-codegen.sh +12 -0
  59. data/openapi_config.yaml +14 -0
  60. data/spec/api/default_api_spec.rb +21 -22
  61. data/spec/api_client_spec.rb +15 -16
  62. data/spec/configuration_spec.rb +3 -3
  63. data/spec/models/chat_completions_create200_response_choices_inner_message_spec.rb +44 -0
  64. data/spec/models/chat_completions_create200_response_choices_inner_spec.rb +46 -0
  65. data/spec/models/chat_completions_create200_response_spec.rb +64 -0
  66. data/spec/models/chat_completions_create200_response_usage_spec.rb +46 -0
  67. data/spec/models/chat_completions_create_request_messages_inner_spec.rb +50 -0
  68. data/spec/models/chat_completions_create_request_spec.rb +94 -0
  69. data/spec/models/chat_completions_create_request_stop_spec.rb +31 -0
  70. data/spec/models/completions_create200_response_choices_inner_logprobs_spec.rb +52 -0
  71. data/spec/models/completions_create200_response_choices_inner_spec.rb +52 -0
  72. data/spec/models/completions_create200_response_spec.rb +64 -0
  73. data/spec/models/completions_create200_response_usage_spec.rb +46 -0
  74. data/spec/models/completions_create_request_prompt_spec.rb +31 -0
  75. data/spec/models/completions_create_request_spec.rb +136 -0
  76. data/spec/models/completions_create_request_stop_spec.rb +31 -0
  77. data/spec/models/embeddings_create200_response_data_inner_spec.rb +46 -0
  78. data/spec/models/embeddings_create200_response_spec.rb +52 -0
  79. data/spec/models/embeddings_create200_response_usage_spec.rb +40 -0
  80. data/spec/models/embeddings_create_request_input_spec.rb +31 -0
  81. data/spec/models/embeddings_create_request_spec.rb +52 -0
  82. data/spec/models/error_response_error_spec.rb +12 -20
  83. data/spec/models/error_response_spec.rb +9 -17
  84. data/spec/spec_helper.rb +4 -5
  85. metadata +91 -77
  86. data/lib/azure_openai_client/models/deploymentid_embeddings_body.rb +0 -202
  87. data/lib/azure_openai_client/models/one_ofchat_completions_body_stop.rb +0 -198
  88. data/lib/azure_openai_client/models/one_ofdeploymentid_completions_body_prompt.rb +0 -198
  89. data/lib/azure_openai_client/models/one_ofdeploymentid_completions_body_stop.rb +0 -198
  90. data/spec/models/chat_completions_body_spec.rb +0 -102
  91. data/spec/models/deploymentid_completions_body_spec.rb +0 -144
  92. data/spec/models/deploymentid_embeddings_body_spec.rb +0 -36
  93. data/spec/models/deploymentsdeploymentidchatcompletions_messages_spec.rb +0 -58
  94. data/spec/models/inline_response_200_1_data_spec.rb +0 -54
  95. data/spec/models/inline_response_200_1_spec.rb +0 -60
  96. data/spec/models/inline_response_200_1_usage_spec.rb +0 -48
  97. data/spec/models/inline_response_200_2_choices_spec.rb +0 -54
  98. data/spec/models/inline_response_200_2_message_spec.rb +0 -52
  99. data/spec/models/inline_response_200_2_spec.rb +0 -72
  100. data/spec/models/inline_response_200_2_usage_spec.rb +0 -54
  101. data/spec/models/inline_response_200_choices_spec.rb +0 -60
  102. data/spec/models/inline_response_200_logprobs_spec.rb +0 -60
  103. data/spec/models/inline_response_200_spec.rb +0 -72
  104. data/spec/models/inline_response_200_usage_spec.rb +0 -54
  105. data/spec/models/one_ofchat_completions_body_stop_spec.rb +0 -36
  106. data/spec/models/one_ofdeploymentid_completions_body_prompt_spec.rb +0 -36
  107. data/spec/models/one_ofdeploymentid_completions_body_stop_spec.rb +0 -36
@@ -1,26 +1,25 @@
1
- # frozen_string_literal: true
2
-
3
1
  =begin
4
2
  #Azure OpenAI Service API
5
3
 
6
4
  #Azure OpenAI APIs for completions and search
7
5
 
8
- OpenAPI spec version: 2023-05-15
6
+ The version of the OpenAPI document: 2023-05-15
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
9
10
 
10
- Generated by: https://github.com/swagger-api/swagger-codegen.git
11
- Swagger Codegen version: 3.0.42
12
11
  =end
13
12
 
14
13
  require 'spec_helper'
15
14
  require 'json'
16
15
 
17
16
  # Unit tests for AzureOpenaiClient::DefaultApi
18
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
17
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
18
  # Please update as you see appropriate
20
19
  describe 'DefaultApi' do
21
20
  before do
22
21
  # run before each test
23
- @instance = AzureOpenaiClient::DefaultApi.new
22
+ @api_instance = AzureOpenaiClient::DefaultApi.new
24
23
  end
25
24
 
26
25
  after do
@@ -29,46 +28,46 @@ describe 'DefaultApi' do
29
28
 
30
29
  describe 'test an instance of DefaultApi' do
31
30
  it 'should create an instance of DefaultApi' do
32
- expect(@instance).to be_instance_of(AzureOpenaiClient::DefaultApi)
31
+ expect(@api_instance).to be_instance_of(AzureOpenaiClient::DefaultApi)
33
32
  end
34
33
  end
35
34
 
36
35
  # unit tests for chat_completions_create
37
36
  # Creates a completion for the chat message
38
- # @param body
39
- # @param api_version
40
- # @param deployment_id
37
+ # @param deployment_id
38
+ # @param api_version
39
+ # @param chat_completions_create_request
41
40
  # @param [Hash] opts the optional parameters
42
- # @return [InlineResponse2002]
41
+ # @return [ChatCompletionsCreate200Response]
43
42
  describe 'chat_completions_create test' do
44
43
  it 'should work' do
45
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
46
45
  end
47
46
  end
48
47
 
49
48
  # unit tests for completions_create
50
49
  # Creates a completion for the provided prompt, parameters and chosen model.
51
- # @param body
52
- # @param api_version
53
- # @param deployment_id
50
+ # @param deployment_id
51
+ # @param api_version
52
+ # @param completions_create_request
54
53
  # @param [Hash] opts the optional parameters
55
- # @return [InlineResponse200]
54
+ # @return [CompletionsCreate200Response]
56
55
  describe 'completions_create test' do
57
56
  it 'should work' do
58
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
57
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
59
58
  end
60
59
  end
61
60
 
62
61
  # unit tests for embeddings_create
63
62
  # Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.
64
- # @param body
65
- # @param api_version
66
63
  # @param deployment_id The deployment id of the model which was deployed.
64
+ # @param api_version
65
+ # @param request_body
67
66
  # @param [Hash] opts the optional parameters
68
- # @return [InlineResponse2001]
67
+ # @return [EmbeddingsCreate200Response]
69
68
  describe 'embeddings_create test' do
70
69
  it 'should work' do
71
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
70
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
72
71
  end
73
72
  end
74
73
 
@@ -1,14 +1,13 @@
1
- # frozen_string_literal: true
2
-
3
1
  =begin
4
2
  #Azure OpenAI Service API
5
3
 
6
4
  #Azure OpenAI APIs for completions and search
7
5
 
8
- OpenAPI spec version: 2023-05-15
6
+ The version of the OpenAPI document: 2023-05-15
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
9
10
 
10
- Generated by: https://github.com/swagger-api/swagger-codegen.git
11
- Swagger Codegen version: 3.0.42
12
11
  =end
13
12
 
14
13
  require 'spec_helper'
@@ -90,6 +89,8 @@ describe AzureOpenaiClient::ApiClient do
90
89
  end
91
90
  end
92
91
 
92
+
93
+
93
94
  describe '#deserialize' do
94
95
  it "handles Array<Integer>" do
95
96
  api_client = AzureOpenaiClient::ApiClient.new
@@ -115,20 +116,20 @@ describe AzureOpenaiClient::ApiClient do
115
116
  response = double('response', headers: headers, body: '{"message": "Hello"}')
116
117
  data = api_client.deserialize(response, 'Hash<String, String>')
117
118
  expect(data).to be_instance_of(Hash)
118
- expect(data).to eq(message: 'Hello')
119
+ expect(data).to eq(:message => 'Hello')
119
120
  end
120
121
  end
121
122
 
122
123
  describe "#object_to_hash" do
123
124
  it 'ignores nils and includes empty arrays' do
124
125
  # uncomment below to test object_to_hash for model
125
- api_client = AzureOpenaiClient::ApiClient.new
126
- _model = AzureOpenaiClient::InlineResponse200.new
126
+ # api_client = AzureOpenaiClient::ApiClient.new
127
+ # _model = AzureOpenaiClient::ModelName.new
127
128
  # update the model attribute below
128
- _model.id = 1
129
+ # _model.id = 1
129
130
  # update the expected value (hash) below
130
- expected = { id: 1 }
131
- expect(api_client.object_to_hash(_model)).to eq(expected)
131
+ # expected = {id: 1, name: '', tags: []}
132
+ # expect(api_client.object_to_hash(_model)).to eq(expected)
132
133
  end
133
134
  end
134
135
 
@@ -157,9 +158,7 @@ describe AzureOpenaiClient::ApiClient do
157
158
  end
158
159
 
159
160
  it 'fails for invalid collection format' do
160
- expect {
161
- api_client.build_collection_param(param, :INVALID)
162
- }.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
161
+ expect { api_client.build_collection_param(param, :INVALID) }.to raise_error(RuntimeError, 'unknown collection format: :INVALID')
163
162
  end
164
163
  end
165
164
 
@@ -200,8 +199,8 @@ describe AzureOpenaiClient::ApiClient do
200
199
  let(:api_client) { AzureOpenaiClient::ApiClient.new }
201
200
 
202
201
  it 'works' do
203
- expect(api_client.select_header_content_type(nil)).to eq('application/json')
204
- expect(api_client.select_header_content_type([])).to eq('application/json')
202
+ expect(api_client.select_header_content_type(nil)).to be_nil
203
+ expect(api_client.select_header_content_type([])).to be_nil
205
204
 
206
205
  expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
207
206
  expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
@@ -8,8 +8,8 @@ RSpec.describe AzureOpenaiClient::Configuration do
8
8
  describe '#initialize' do
9
9
  it 'sets default values' do
10
10
  expect(config.scheme).to eq('https')
11
- expect(config.host).to eq('{endpoint}')
12
- expect(config.base_path).to eq('https://{endpoint}/openai')
11
+ expect(config.host).to eq('your-resource-name.openai.azure.com')
12
+ expect(config.base_path).to eq('/openai')
13
13
  expect(config.api_key).to eq({})
14
14
  expect(config.api_key_prefix).to eq({})
15
15
  expect(config.timeout).to eq(0)
@@ -57,7 +57,7 @@ RSpec.describe AzureOpenaiClient::Configuration do
57
57
 
58
58
  describe '#auth_settings' do
59
59
  it 'returns the Auth Settings hash for the API client' do
60
- config.api_key['api-key'] = '12345'
60
+ config.api_key['apiKey'] = '12345'
61
61
  config.access_token = 'token_12345'
62
62
  expect(config.auth_settings).to eq(
63
63
  'apiKey' => {
@@ -0,0 +1,44 @@
1
+ =begin
2
+ #Azure OpenAI Service API
3
+
4
+ #Azure OpenAI APIs for completions and search
5
+
6
+ The version of the OpenAPI document: 2023-05-15
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for AzureOpenaiClient::ChatCompletionsCreate200ResponseChoicesInnerMessage
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe AzureOpenaiClient::ChatCompletionsCreate200ResponseChoicesInnerMessage do
21
+ let(:instance) { AzureOpenaiClient::ChatCompletionsCreate200ResponseChoicesInnerMessage.new }
22
+
23
+ describe 'test an instance of ChatCompletionsCreate200ResponseChoicesInnerMessage' do
24
+ it 'should create an instance of ChatCompletionsCreate200ResponseChoicesInnerMessage' do
25
+ expect(instance).to be_instance_of(AzureOpenaiClient::ChatCompletionsCreate200ResponseChoicesInnerMessage)
26
+ end
27
+ end
28
+ describe 'test attribute "role"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["system", "user", "assistant"])
32
+ # validator.allowable_values.each do |value|
33
+ # expect { instance.role = value }.not_to raise_error
34
+ # end
35
+ end
36
+ end
37
+
38
+ describe 'test attribute "content"' do
39
+ it 'should work' do
40
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
41
+ end
42
+ end
43
+
44
+ end
@@ -0,0 +1,46 @@
1
+ =begin
2
+ #Azure OpenAI Service API
3
+
4
+ #Azure OpenAI APIs for completions and search
5
+
6
+ The version of the OpenAPI document: 2023-05-15
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for AzureOpenaiClient::ChatCompletionsCreate200ResponseChoicesInner
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe AzureOpenaiClient::ChatCompletionsCreate200ResponseChoicesInner do
21
+ let(:instance) { AzureOpenaiClient::ChatCompletionsCreate200ResponseChoicesInner.new }
22
+
23
+ describe 'test an instance of ChatCompletionsCreate200ResponseChoicesInner' do
24
+ it 'should create an instance of ChatCompletionsCreate200ResponseChoicesInner' do
25
+ expect(instance).to be_instance_of(AzureOpenaiClient::ChatCompletionsCreate200ResponseChoicesInner)
26
+ end
27
+ end
28
+ describe 'test attribute "index"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "message"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "finish_reason"' 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
+ end
@@ -0,0 +1,64 @@
1
+ =begin
2
+ #Azure OpenAI Service API
3
+
4
+ #Azure OpenAI APIs for completions and search
5
+
6
+ The version of the OpenAPI document: 2023-05-15
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for AzureOpenaiClient::ChatCompletionsCreate200Response
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe AzureOpenaiClient::ChatCompletionsCreate200Response do
21
+ let(:instance) { AzureOpenaiClient::ChatCompletionsCreate200Response.new }
22
+
23
+ describe 'test an instance of ChatCompletionsCreate200Response' do
24
+ it 'should create an instance of ChatCompletionsCreate200Response' do
25
+ expect(instance).to be_instance_of(AzureOpenaiClient::ChatCompletionsCreate200Response)
26
+ end
27
+ end
28
+ describe 'test attribute "id"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "object"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "created"' 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 "model"' 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 "choices"' 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
+ describe 'test attribute "usage"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
61
+ end
62
+ end
63
+
64
+ end
@@ -0,0 +1,46 @@
1
+ =begin
2
+ #Azure OpenAI Service API
3
+
4
+ #Azure OpenAI APIs for completions and search
5
+
6
+ The version of the OpenAPI document: 2023-05-15
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for AzureOpenaiClient::ChatCompletionsCreate200ResponseUsage
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe AzureOpenaiClient::ChatCompletionsCreate200ResponseUsage do
21
+ let(:instance) { AzureOpenaiClient::ChatCompletionsCreate200ResponseUsage.new }
22
+
23
+ describe 'test an instance of ChatCompletionsCreate200ResponseUsage' do
24
+ it 'should create an instance of ChatCompletionsCreate200ResponseUsage' do
25
+ expect(instance).to be_instance_of(AzureOpenaiClient::ChatCompletionsCreate200ResponseUsage)
26
+ end
27
+ end
28
+ describe 'test attribute "prompt_tokens"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "completion_tokens"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "total_tokens"' 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
+ end
@@ -0,0 +1,50 @@
1
+ =begin
2
+ #Azure OpenAI Service API
3
+
4
+ #Azure OpenAI APIs for completions and search
5
+
6
+ The version of the OpenAPI document: 2023-05-15
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for AzureOpenaiClient::ChatCompletionsCreateRequestMessagesInner
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe AzureOpenaiClient::ChatCompletionsCreateRequestMessagesInner do
21
+ let(:instance) { AzureOpenaiClient::ChatCompletionsCreateRequestMessagesInner.new }
22
+
23
+ describe 'test an instance of ChatCompletionsCreateRequestMessagesInner' do
24
+ it 'should create an instance of ChatCompletionsCreateRequestMessagesInner' do
25
+ expect(instance).to be_instance_of(AzureOpenaiClient::ChatCompletionsCreateRequestMessagesInner)
26
+ end
27
+ end
28
+ describe 'test attribute "role"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["system", "user", "assistant"])
32
+ # validator.allowable_values.each do |value|
33
+ # expect { instance.role = value }.not_to raise_error
34
+ # end
35
+ end
36
+ end
37
+
38
+ describe 'test attribute "content"' do
39
+ it 'should work' do
40
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
41
+ end
42
+ end
43
+
44
+ describe 'test attribute "name"' do
45
+ it 'should work' do
46
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
47
+ end
48
+ end
49
+
50
+ end
@@ -0,0 +1,94 @@
1
+ =begin
2
+ #Azure OpenAI Service API
3
+
4
+ #Azure OpenAI APIs for completions and search
5
+
6
+ The version of the OpenAPI document: 2023-05-15
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for AzureOpenaiClient::ChatCompletionsCreateRequest
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe AzureOpenaiClient::ChatCompletionsCreateRequest do
21
+ let(:instance) { AzureOpenaiClient::ChatCompletionsCreateRequest.new }
22
+
23
+ describe 'test an instance of ChatCompletionsCreateRequest' do
24
+ it 'should create an instance of ChatCompletionsCreateRequest' do
25
+ expect(instance).to be_instance_of(AzureOpenaiClient::ChatCompletionsCreateRequest)
26
+ end
27
+ end
28
+ describe 'test attribute "messages"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "temperature"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "top_p"' 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 "n"' 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 "stream"' 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
+ describe 'test attribute "stop"' do
59
+ it 'should work' do
60
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
61
+ end
62
+ end
63
+
64
+ describe 'test attribute "max_tokens"' do
65
+ it 'should work' do
66
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
67
+ end
68
+ end
69
+
70
+ describe 'test attribute "presence_penalty"' do
71
+ it 'should work' do
72
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
73
+ end
74
+ end
75
+
76
+ describe 'test attribute "frequency_penalty"' do
77
+ it 'should work' do
78
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
79
+ end
80
+ end
81
+
82
+ describe 'test attribute "logit_bias"' do
83
+ it 'should work' do
84
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
85
+ end
86
+ end
87
+
88
+ describe 'test attribute "user"' do
89
+ it 'should work' do
90
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
91
+ end
92
+ end
93
+
94
+ end
@@ -0,0 +1,31 @@
1
+ =begin
2
+ #Azure OpenAI Service API
3
+
4
+ #Azure OpenAI APIs for completions and search
5
+
6
+ The version of the OpenAPI document: 2023-05-15
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for AzureOpenaiClient::ChatCompletionsCreateRequestStop
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe AzureOpenaiClient::ChatCompletionsCreateRequestStop 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
+ end
30
+ end
31
+ end
@@ -0,0 +1,52 @@
1
+ =begin
2
+ #Azure OpenAI Service API
3
+
4
+ #Azure OpenAI APIs for completions and search
5
+
6
+ The version of the OpenAPI document: 2023-05-15
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for AzureOpenaiClient::CompletionsCreate200ResponseChoicesInnerLogprobs
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe AzureOpenaiClient::CompletionsCreate200ResponseChoicesInnerLogprobs do
21
+ let(:instance) { AzureOpenaiClient::CompletionsCreate200ResponseChoicesInnerLogprobs.new }
22
+
23
+ describe 'test an instance of CompletionsCreate200ResponseChoicesInnerLogprobs' do
24
+ it 'should create an instance of CompletionsCreate200ResponseChoicesInnerLogprobs' do
25
+ expect(instance).to be_instance_of(AzureOpenaiClient::CompletionsCreate200ResponseChoicesInnerLogprobs)
26
+ end
27
+ end
28
+ describe 'test attribute "tokens"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "token_logprobs"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "top_logprobs"' 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 "text_offset"' 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
+ #Azure OpenAI Service API
3
+
4
+ #Azure OpenAI APIs for completions and search
5
+
6
+ The version of the OpenAPI document: 2023-05-15
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.6.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for AzureOpenaiClient::CompletionsCreate200ResponseChoicesInner
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe AzureOpenaiClient::CompletionsCreate200ResponseChoicesInner do
21
+ let(:instance) { AzureOpenaiClient::CompletionsCreate200ResponseChoicesInner.new }
22
+
23
+ describe 'test an instance of CompletionsCreate200ResponseChoicesInner' do
24
+ it 'should create an instance of CompletionsCreate200ResponseChoicesInner' do
25
+ expect(instance).to be_instance_of(AzureOpenaiClient::CompletionsCreate200ResponseChoicesInner)
26
+ end
27
+ end
28
+ describe 'test attribute "text"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "index"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "logprobs"' 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 "finish_reason"' 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