ragie_ruby_sdk 1.0.18 → 1.0.19

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dcb41b85be852cce3aa9b68ce3050546c0087cdb4b8b34b98b8241d2443ea619
4
- data.tar.gz: 3eeaaa36171ba6bfdab19859c30f7979732b8eb1a6b32f545ffd15b032a18e3e
3
+ metadata.gz: e5b85ce791aa2235a5bcc7872199cf969bd5255c647c84df260c6f431b8d8e07
4
+ data.tar.gz: dff0dc4ca1b92f66e2cad34d83bc795e56aab3c014224d1d59fc116091a026c1
5
5
  SHA512:
6
- metadata.gz: c9eade4450a39a4c1488501b83c837366395126da728c597249010b43f1af48b23471c249774614781bc6a3b790c5cca681d8420927fbb17794117b80f013bd9
7
- data.tar.gz: 51da453e45a230d632095ffeb4cd4007240c787cd3e09cbc8a6926f518c2f7093a54aad6224db500888e1ee7d28ef7482fe57e4ab16f8e00e09d79a3ff4c590a
6
+ metadata.gz: 0fd4c1fb1606ca3e0dcf963de44ad2ce40b9a745402151e2268919e9e64637f5479de879485f73a149d27d17e046b473382f87ab4f2daa4273f076a4392e8478
7
+ data.tar.gz: b7c222f21e02e5cea8aeafaea8fbd190d0d7959a7f07d40ea8195f4bbc680348515cce1f3fdee8df46b10c4491bb99e6e2656c7d268599b0631b4ddbe4dd13ec
data/README.md CHANGED
@@ -7,7 +7,7 @@ No description provided (generated by Openapi Generator https://github.com/opena
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 1.0.0
10
- - Package version: 1.0.17
10
+ - Package version: 1.0.18
11
11
  - Generator version: 7.17.0-SNAPSHOT
12
12
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
13
13
 
@@ -24,16 +24,16 @@ gem build ragie_ruby_sdk.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ragie_ruby_sdk-1.0.17.gem
27
+ gem install ./ragie_ruby_sdk-1.0.18.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ragie_ruby_sdk-1.0.17.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ragie_ruby_sdk-1.0.18.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ragie_ruby_sdk', '~> 1.0.17'
36
+ gem 'ragie_ruby_sdk', '~> 1.0.18'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -228,6 +228,7 @@ Class | Method | HTTP request | Description
228
228
  - [RagieRubySdk::EntityList](docs/EntityList.md)
229
229
  - [RagieRubySdk::ErrorMessage](docs/ErrorMessage.md)
230
230
  - [RagieRubySdk::EvaluatedAnswerStep](docs/EvaluatedAnswerStep.md)
231
+ - [RagieRubySdk::FailedStep](docs/FailedStep.md)
231
232
  - [RagieRubySdk::FileSearchOutput](docs/FileSearchOutput.md)
232
233
  - [RagieRubySdk::FileSearchResult](docs/FileSearchResult.md)
233
234
  - [RagieRubySdk::FinalAnswer](docs/FinalAnswer.md)
data/docs/AnswerStep.md CHANGED
@@ -7,6 +7,7 @@
7
7
  | **type** | **String** | | [optional][default to 'answer'] |
8
8
  | **think** | **String** | | |
9
9
  | **current_question** | **String** | | |
10
+ | **errored** | **Boolean** | | [optional][default to false] |
10
11
  | **other_resolved_question_ids** | **Array<String>** | A list of question ids that are no longer relevant to the current answer referenced by their IDs. | [optional] |
11
12
  | **answer** | [**Answer**](Answer.md) | | |
12
13
 
@@ -19,6 +20,7 @@ instance = RagieRubySdk::AnswerStep.new(
19
20
  type: null,
20
21
  think: null,
21
22
  current_question: null,
23
+ errored: null,
22
24
  other_resolved_question_ids: null,
23
25
  answer: null
24
26
  )
data/docs/CodeStep.md CHANGED
@@ -7,6 +7,7 @@
7
7
  | **type** | **String** | | [optional][default to 'code'] |
8
8
  | **think** | **String** | | |
9
9
  | **current_question** | **String** | | |
10
+ | **errored** | **Boolean** | | [optional][default to false] |
10
11
  | **code_issue** | **String** | The natural language description of the code issue you need to solve. | |
11
12
  | **code** | **String** | The code you generated to solve the code issue. | [optional][default to ''] |
12
13
  | **code_result** | **String** | The result of the code you generated after executing it. | [optional][default to ''] |
@@ -20,6 +21,7 @@ instance = RagieRubySdk::CodeStep.new(
20
21
  type: null,
21
22
  think: null,
22
23
  current_question: null,
24
+ errored: null,
23
25
  code_issue: null,
24
26
  code: null,
25
27
  code_result: null
@@ -7,6 +7,7 @@
7
7
  | **type** | **String** | | [optional][default to 'evaluated_answer'] |
8
8
  | **think** | **String** | | |
9
9
  | **current_question** | **String** | | |
10
+ | **errored** | **Boolean** | | [optional][default to false] |
10
11
  | **answer** | [**Answer**](Answer.md) | | |
11
12
  | **other_resolved_question_ids** | **Array<String>** | A list of questions ids that are no longer relevant to the current answer referenced by their IDs. | [optional] |
12
13
  | **eval_passed** | **Boolean** | | |
@@ -21,6 +22,7 @@ instance = RagieRubySdk::EvaluatedAnswerStep.new(
21
22
  type: null,
22
23
  think: null,
23
24
  current_question: null,
25
+ errored: null,
24
26
  answer: null,
25
27
  other_resolved_question_ids: null,
26
28
  eval_passed: null,
@@ -0,0 +1,24 @@
1
+ # RagieRubySdk::FailedStep
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **type** | **String** | | [optional][default to 'failed'] |
8
+ | **think** | **String** | | |
9
+ | **current_question** | **String** | | |
10
+ | **errored** | **Boolean** | | [optional][default to false] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'ragie_ruby_sdk'
16
+
17
+ instance = RagieRubySdk::FailedStep.new(
18
+ type: null,
19
+ think: null,
20
+ current_question: null,
21
+ errored: null
22
+ )
23
+ ```
24
+
@@ -7,6 +7,7 @@
7
7
  | **type** | **String** | | [optional][default to 'answer'] |
8
8
  | **think** | **String** | | |
9
9
  | **current_question** | **String** | | |
10
+ | **errored** | **Boolean** | | [optional][default to false] |
10
11
  | **other_resolved_question_ids** | **Array<String>** | A list of questions ids that are no longer relevant to the current answer referenced by their IDs. | [optional] |
11
12
  | **answer** | [**Answer**](Answer.md) | | |
12
13
  | **search** | [**Search**](Search.md) | The search request to be made. | |
@@ -29,6 +30,7 @@ instance = RagieRubySdk::FinalAnswerStepsInner.new(
29
30
  type: null,
30
31
  think: null,
31
32
  current_question: null,
33
+ errored: null,
32
34
  other_resolved_question_ids: null,
33
35
  answer: null,
34
36
  search: null,
data/docs/PlanStep.md CHANGED
@@ -7,6 +7,7 @@
7
7
  | **type** | **String** | | [optional][default to 'plan'] |
8
8
  | **think** | **String** | | |
9
9
  | **current_question** | **String** | | |
10
+ | **errored** | **Boolean** | | [optional][default to false] |
10
11
  | **questions_to_answer** | **Array<String>** | The questions that need to be answered to answer the original question. | [optional] |
11
12
 
12
13
  ## Example
@@ -18,6 +19,7 @@ instance = RagieRubySdk::PlanStep.new(
18
19
  type: null,
19
20
  think: null,
20
21
  current_question: null,
22
+ errored: null,
21
23
  questions_to_answer: null
22
24
  )
23
25
  ```
data/docs/SearchStep.md CHANGED
@@ -7,6 +7,7 @@
7
7
  | **type** | **String** | | [optional][default to 'base_search'] |
8
8
  | **think** | **String** | | |
9
9
  | **current_question** | **String** | | |
10
+ | **errored** | **Boolean** | | [optional][default to false] |
10
11
  | **search** | [**Search**](Search.md) | The search request to be made. | |
11
12
 
12
13
  ## Example
@@ -18,6 +19,7 @@ instance = RagieRubySdk::SearchStep.new(
18
19
  type: null,
19
20
  think: null,
20
21
  current_question: null,
22
+ errored: null,
21
23
  search: null
22
24
  )
23
25
  ```
@@ -7,6 +7,7 @@
7
7
  | **type** | **String** | | [optional][default to 'search'] |
8
8
  | **think** | **String** | | |
9
9
  | **current_question** | **String** | | |
10
+ | **errored** | **Boolean** | | [optional][default to false] |
10
11
  | **search** | [**Search**](Search.md) | The search request to be made. | |
11
12
  | **query_details** | [**Array<QueryDetails>**](QueryDetails.md) | | [optional] |
12
13
  | **search_log** | **String** | A log of the search results you found. | [optional][default to ''] |
@@ -20,6 +21,7 @@ instance = RagieRubySdk::SearchStepWithQueryDetails.new(
20
21
  type: null,
21
22
  think: null,
22
23
  current_question: null,
24
+ errored: null,
23
25
  search: null,
24
26
  query_details: null,
25
27
  search_log: null
@@ -7,6 +7,7 @@
7
7
  | **type** | **String** | | [optional][default to 'surrender'] |
8
8
  | **think** | **String** | | |
9
9
  | **current_question** | **String** | | |
10
+ | **errored** | **Boolean** | | [optional][default to false] |
10
11
  | **partial_answer** | [**Answer**](Answer.md) | The a potential partial answer when a full answer was not possible. | |
11
12
 
12
13
  ## Example
@@ -18,6 +19,7 @@ instance = RagieRubySdk::SurrenderStep.new(
18
19
  type: null,
19
20
  think: null,
20
21
  current_question: null,
22
+ errored: null,
21
23
  partial_answer: null
22
24
  )
23
25
  ```
@@ -21,6 +21,8 @@ module RagieRubySdk
21
21
 
22
22
  attr_accessor :current_question
23
23
 
24
+ attr_accessor :errored
25
+
24
26
  # A list of question ids that are no longer relevant to the current answer referenced by their IDs.
25
27
  attr_accessor :other_resolved_question_ids
26
28
 
@@ -54,6 +56,7 @@ module RagieRubySdk
54
56
  :'type' => :'type',
55
57
  :'think' => :'think',
56
58
  :'current_question' => :'current_question',
59
+ :'errored' => :'errored',
57
60
  :'other_resolved_question_ids' => :'other_resolved_question_ids',
58
61
  :'answer' => :'answer'
59
62
  }
@@ -75,6 +78,7 @@ module RagieRubySdk
75
78
  :'type' => :'String',
76
79
  :'think' => :'String',
77
80
  :'current_question' => :'String',
81
+ :'errored' => :'Boolean',
78
82
  :'other_resolved_question_ids' => :'Array<String>',
79
83
  :'answer' => :'Answer'
80
84
  }
@@ -120,6 +124,12 @@ module RagieRubySdk
120
124
  self.current_question = nil
121
125
  end
122
126
 
127
+ if attributes.key?(:'errored')
128
+ self.errored = attributes[:'errored']
129
+ else
130
+ self.errored = false
131
+ end
132
+
123
133
  if attributes.key?(:'other_resolved_question_ids')
124
134
  if (value = attributes[:'other_resolved_question_ids']).is_a?(Array)
125
135
  self.other_resolved_question_ids = value
@@ -213,6 +223,7 @@ module RagieRubySdk
213
223
  type == o.type &&
214
224
  think == o.think &&
215
225
  current_question == o.current_question &&
226
+ errored == o.errored &&
216
227
  other_resolved_question_ids == o.other_resolved_question_ids &&
217
228
  answer == o.answer
218
229
  end
@@ -226,7 +237,7 @@ module RagieRubySdk
226
237
  # Calculates hash code according to all attributes.
227
238
  # @return [Integer] Hash code
228
239
  def hash
229
- [type, think, current_question, other_resolved_question_ids, answer].hash
240
+ [type, think, current_question, errored, other_resolved_question_ids, answer].hash
230
241
  end
231
242
 
232
243
  # Builds the object from hash
@@ -21,6 +21,8 @@ module RagieRubySdk
21
21
 
22
22
  attr_accessor :current_question
23
23
 
24
+ attr_accessor :errored
25
+
24
26
  # The natural language description of the code issue you need to solve.
25
27
  attr_accessor :code_issue
26
28
 
@@ -58,6 +60,7 @@ module RagieRubySdk
58
60
  :'type' => :'type',
59
61
  :'think' => :'think',
60
62
  :'current_question' => :'current_question',
63
+ :'errored' => :'errored',
61
64
  :'code_issue' => :'code_issue',
62
65
  :'code' => :'code',
63
66
  :'code_result' => :'code_result'
@@ -80,6 +83,7 @@ module RagieRubySdk
80
83
  :'type' => :'String',
81
84
  :'think' => :'String',
82
85
  :'current_question' => :'String',
86
+ :'errored' => :'Boolean',
83
87
  :'code_issue' => :'String',
84
88
  :'code' => :'String',
85
89
  :'code_result' => :'String'
@@ -126,6 +130,12 @@ module RagieRubySdk
126
130
  self.current_question = nil
127
131
  end
128
132
 
133
+ if attributes.key?(:'errored')
134
+ self.errored = attributes[:'errored']
135
+ else
136
+ self.errored = false
137
+ end
138
+
129
139
  if attributes.key?(:'code_issue')
130
140
  self.code_issue = attributes[:'code_issue']
131
141
  else
@@ -225,6 +235,7 @@ module RagieRubySdk
225
235
  type == o.type &&
226
236
  think == o.think &&
227
237
  current_question == o.current_question &&
238
+ errored == o.errored &&
228
239
  code_issue == o.code_issue &&
229
240
  code == o.code &&
230
241
  code_result == o.code_result
@@ -239,7 +250,7 @@ module RagieRubySdk
239
250
  # Calculates hash code according to all attributes.
240
251
  # @return [Integer] Hash code
241
252
  def hash
242
- [type, think, current_question, code_issue, code, code_result].hash
253
+ [type, think, current_question, errored, code_issue, code, code_result].hash
243
254
  end
244
255
 
245
256
  # Builds the object from hash
@@ -21,6 +21,8 @@ module RagieRubySdk
21
21
 
22
22
  attr_accessor :current_question
23
23
 
24
+ attr_accessor :errored
25
+
24
26
  attr_accessor :answer
25
27
 
26
28
  # A list of questions ids that are no longer relevant to the current answer referenced by their IDs.
@@ -58,6 +60,7 @@ module RagieRubySdk
58
60
  :'type' => :'type',
59
61
  :'think' => :'think',
60
62
  :'current_question' => :'current_question',
63
+ :'errored' => :'errored',
61
64
  :'answer' => :'answer',
62
65
  :'other_resolved_question_ids' => :'other_resolved_question_ids',
63
66
  :'eval_passed' => :'eval_passed',
@@ -81,6 +84,7 @@ module RagieRubySdk
81
84
  :'type' => :'String',
82
85
  :'think' => :'String',
83
86
  :'current_question' => :'String',
87
+ :'errored' => :'Boolean',
84
88
  :'answer' => :'Answer',
85
89
  :'other_resolved_question_ids' => :'Array<String>',
86
90
  :'eval_passed' => :'Boolean',
@@ -128,6 +132,12 @@ module RagieRubySdk
128
132
  self.current_question = nil
129
133
  end
130
134
 
135
+ if attributes.key?(:'errored')
136
+ self.errored = attributes[:'errored']
137
+ else
138
+ self.errored = false
139
+ end
140
+
131
141
  if attributes.key?(:'answer')
132
142
  self.answer = attributes[:'answer']
133
143
  else
@@ -263,6 +273,7 @@ module RagieRubySdk
263
273
  type == o.type &&
264
274
  think == o.think &&
265
275
  current_question == o.current_question &&
276
+ errored == o.errored &&
266
277
  answer == o.answer &&
267
278
  other_resolved_question_ids == o.other_resolved_question_ids &&
268
279
  eval_passed == o.eval_passed &&
@@ -278,7 +289,7 @@ module RagieRubySdk
278
289
  # Calculates hash code according to all attributes.
279
290
  # @return [Integer] Hash code
280
291
  def hash
281
- [type, think, current_question, answer, other_resolved_question_ids, eval_passed, eval_reason].hash
292
+ [type, think, current_question, errored, answer, other_resolved_question_ids, eval_passed, eval_reason].hash
282
293
  end
283
294
 
284
295
  # Builds the object from hash
@@ -0,0 +1,319 @@
1
+ =begin
2
+ #Ragie API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module RagieRubySdk
17
+ class FailedStep
18
+ attr_accessor :type
19
+
20
+ attr_accessor :think
21
+
22
+ attr_accessor :current_question
23
+
24
+ attr_accessor :errored
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'type' => :'type',
52
+ :'think' => :'think',
53
+ :'current_question' => :'current_question',
54
+ :'errored' => :'errored'
55
+ }
56
+ end
57
+
58
+ # Returns attribute mapping this model knows about
59
+ def self.acceptable_attribute_map
60
+ attribute_map
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ acceptable_attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'type' => :'String',
72
+ :'think' => :'String',
73
+ :'current_question' => :'String',
74
+ :'errored' => :'Boolean'
75
+ }
76
+ end
77
+
78
+ # List of attributes with nullable: true
79
+ def self.openapi_nullable
80
+ Set.new([
81
+ ])
82
+ end
83
+
84
+ # Initializes the object
85
+ # @param [Hash] attributes Model attributes in the form of hash
86
+ def initialize(attributes = {})
87
+ if (!attributes.is_a?(Hash))
88
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RagieRubySdk::FailedStep` initialize method"
89
+ end
90
+
91
+ # check to see if the attribute exists and convert string to symbol for hash key
92
+ acceptable_attribute_map = self.class.acceptable_attribute_map
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!acceptable_attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RagieRubySdk::FailedStep`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'type')
101
+ self.type = attributes[:'type']
102
+ else
103
+ self.type = 'failed'
104
+ end
105
+
106
+ if attributes.key?(:'think')
107
+ self.think = attributes[:'think']
108
+ else
109
+ self.think = nil
110
+ end
111
+
112
+ if attributes.key?(:'current_question')
113
+ self.current_question = attributes[:'current_question']
114
+ else
115
+ self.current_question = nil
116
+ end
117
+
118
+ if attributes.key?(:'errored')
119
+ self.errored = attributes[:'errored']
120
+ else
121
+ self.errored = false
122
+ end
123
+ end
124
+
125
+ # Show invalid properties with the reasons. Usually used together with valid?
126
+ # @return Array for valid properties with the reasons
127
+ def list_invalid_properties
128
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
129
+ invalid_properties = Array.new
130
+ if @think.nil?
131
+ invalid_properties.push('invalid value for "think", think cannot be nil.')
132
+ end
133
+
134
+ if @current_question.nil?
135
+ invalid_properties.push('invalid value for "current_question", current_question cannot be nil.')
136
+ end
137
+
138
+ invalid_properties
139
+ end
140
+
141
+ # Check to see if the all the properties in the model are valid
142
+ # @return true if the model is valid
143
+ def valid?
144
+ warn '[DEPRECATED] the `valid?` method is obsolete'
145
+ type_validator = EnumAttributeValidator.new('String', ["failed"])
146
+ return false unless type_validator.valid?(@type)
147
+ return false if @think.nil?
148
+ return false if @current_question.nil?
149
+ true
150
+ end
151
+
152
+ # Custom attribute writer method checking allowed values (enum).
153
+ # @param [Object] type Object to be assigned
154
+ def type=(type)
155
+ validator = EnumAttributeValidator.new('String', ["failed"])
156
+ unless validator.valid?(type)
157
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
158
+ end
159
+ @type = type
160
+ end
161
+
162
+ # Custom attribute writer method with validation
163
+ # @param [Object] think Value to be assigned
164
+ def think=(think)
165
+ if think.nil?
166
+ fail ArgumentError, 'think cannot be nil'
167
+ end
168
+
169
+ @think = think
170
+ end
171
+
172
+ # Custom attribute writer method with validation
173
+ # @param [Object] current_question Value to be assigned
174
+ def current_question=(current_question)
175
+ if current_question.nil?
176
+ fail ArgumentError, 'current_question cannot be nil'
177
+ end
178
+
179
+ @current_question = current_question
180
+ end
181
+
182
+ # Checks equality by comparing each attribute.
183
+ # @param [Object] Object to be compared
184
+ def ==(o)
185
+ return true if self.equal?(o)
186
+ self.class == o.class &&
187
+ type == o.type &&
188
+ think == o.think &&
189
+ current_question == o.current_question &&
190
+ errored == o.errored
191
+ end
192
+
193
+ # @see the `==` method
194
+ # @param [Object] Object to be compared
195
+ def eql?(o)
196
+ self == o
197
+ end
198
+
199
+ # Calculates hash code according to all attributes.
200
+ # @return [Integer] Hash code
201
+ def hash
202
+ [type, think, current_question, errored].hash
203
+ end
204
+
205
+ # Builds the object from hash
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ # @return [Object] Returns the model itself
208
+ def self.build_from_hash(attributes)
209
+ return nil unless attributes.is_a?(Hash)
210
+ attributes = attributes.transform_keys(&:to_sym)
211
+ transformed_hash = {}
212
+ openapi_types.each_pair do |key, type|
213
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
214
+ transformed_hash["#{key}"] = nil
215
+ elsif type =~ /\AArray<(.*)>/i
216
+ # check to ensure the input is an array given that the attribute
217
+ # is documented as an array but the input is not
218
+ if attributes[attribute_map[key]].is_a?(Array)
219
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
220
+ end
221
+ elsif !attributes[attribute_map[key]].nil?
222
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
223
+ end
224
+ end
225
+ new(transformed_hash)
226
+ end
227
+
228
+ # Deserializes the data based on type
229
+ # @param string type Data type
230
+ # @param string value Value to be deserialized
231
+ # @return [Object] Deserialized data
232
+ def self._deserialize(type, value)
233
+ case type.to_sym
234
+ when :Time
235
+ Time.parse(value)
236
+ when :Date
237
+ Date.parse(value)
238
+ when :String
239
+ value.to_s
240
+ when :Integer
241
+ value.to_i
242
+ when :Float
243
+ value.to_f
244
+ when :Boolean
245
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
246
+ true
247
+ else
248
+ false
249
+ end
250
+ when :Object
251
+ # generic object (usually a Hash), return directly
252
+ value
253
+ when /\AArray<(?<inner_type>.+)>\z/
254
+ inner_type = Regexp.last_match[:inner_type]
255
+ value.map { |v| _deserialize(inner_type, v) }
256
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
257
+ k_type = Regexp.last_match[:k_type]
258
+ v_type = Regexp.last_match[:v_type]
259
+ {}.tap do |hash|
260
+ value.each do |k, v|
261
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
262
+ end
263
+ end
264
+ else # model
265
+ # models (e.g. Pet) or oneOf
266
+ klass = RagieRubySdk.const_get(type)
267
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
268
+ end
269
+ end
270
+
271
+ # Returns the string representation of the object
272
+ # @return [String] String presentation of the object
273
+ def to_s
274
+ to_hash.to_s
275
+ end
276
+
277
+ # to_body is an alias to to_hash (backward compatibility)
278
+ # @return [Hash] Returns the object in the form of hash
279
+ def to_body
280
+ to_hash
281
+ end
282
+
283
+ # Returns the object in the form of hash
284
+ # @return [Hash] Returns the object in the form of hash
285
+ def to_hash
286
+ hash = {}
287
+ self.class.attribute_map.each_pair do |attr, param|
288
+ value = self.send(attr)
289
+ if value.nil?
290
+ is_nullable = self.class.openapi_nullable.include?(attr)
291
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
292
+ end
293
+
294
+ hash[param] = _to_hash(value)
295
+ end
296
+ hash
297
+ end
298
+
299
+ # Outputs non-array value in the form of hash
300
+ # For object, use to_hash. Otherwise, just return the value
301
+ # @param [Object] value Any valid value
302
+ # @return [Hash] Returns the value in the form of hash
303
+ def _to_hash(value)
304
+ if value.is_a?(Array)
305
+ value.compact.map { |v| _to_hash(v) }
306
+ elsif value.is_a?(Hash)
307
+ {}.tap do |hash|
308
+ value.each { |k, v| hash[k] = _to_hash(v) }
309
+ end
310
+ elsif value.respond_to? :to_hash
311
+ value.to_hash
312
+ else
313
+ value
314
+ end
315
+ end
316
+
317
+ end
318
+
319
+ end
@@ -22,6 +22,7 @@ module RagieRubySdk
22
22
  :'AnswerStep',
23
23
  :'CodeStep',
24
24
  :'EvaluatedAnswerStep',
25
+ :'FailedStep',
25
26
  :'PlanStep',
26
27
  :'SearchStep',
27
28
  :'SearchStepWithQueryDetails',
@@ -21,6 +21,8 @@ module RagieRubySdk
21
21
 
22
22
  attr_accessor :current_question
23
23
 
24
+ attr_accessor :errored
25
+
24
26
  # The questions that need to be answered to answer the original question.
25
27
  attr_accessor :questions_to_answer
26
28
 
@@ -52,6 +54,7 @@ module RagieRubySdk
52
54
  :'type' => :'type',
53
55
  :'think' => :'think',
54
56
  :'current_question' => :'current_question',
57
+ :'errored' => :'errored',
55
58
  :'questions_to_answer' => :'questions_to_answer'
56
59
  }
57
60
  end
@@ -72,6 +75,7 @@ module RagieRubySdk
72
75
  :'type' => :'String',
73
76
  :'think' => :'String',
74
77
  :'current_question' => :'String',
78
+ :'errored' => :'Boolean',
75
79
  :'questions_to_answer' => :'Array<String>'
76
80
  }
77
81
  end
@@ -116,6 +120,12 @@ module RagieRubySdk
116
120
  self.current_question = nil
117
121
  end
118
122
 
123
+ if attributes.key?(:'errored')
124
+ self.errored = attributes[:'errored']
125
+ else
126
+ self.errored = false
127
+ end
128
+
119
129
  if attributes.key?(:'questions_to_answer')
120
130
  if (value = attributes[:'questions_to_answer']).is_a?(Array)
121
131
  self.questions_to_answer = value
@@ -188,6 +198,7 @@ module RagieRubySdk
188
198
  type == o.type &&
189
199
  think == o.think &&
190
200
  current_question == o.current_question &&
201
+ errored == o.errored &&
191
202
  questions_to_answer == o.questions_to_answer
192
203
  end
193
204
 
@@ -200,7 +211,7 @@ module RagieRubySdk
200
211
  # Calculates hash code according to all attributes.
201
212
  # @return [Integer] Hash code
202
213
  def hash
203
- [type, think, current_question, questions_to_answer].hash
214
+ [type, think, current_question, errored, questions_to_answer].hash
204
215
  end
205
216
 
206
217
  # Builds the object from hash
@@ -21,6 +21,8 @@ module RagieRubySdk
21
21
 
22
22
  attr_accessor :current_question
23
23
 
24
+ attr_accessor :errored
25
+
24
26
  # The search request to be made.
25
27
  attr_accessor :search
26
28
 
@@ -52,6 +54,7 @@ module RagieRubySdk
52
54
  :'type' => :'type',
53
55
  :'think' => :'think',
54
56
  :'current_question' => :'current_question',
57
+ :'errored' => :'errored',
55
58
  :'search' => :'search'
56
59
  }
57
60
  end
@@ -72,6 +75,7 @@ module RagieRubySdk
72
75
  :'type' => :'String',
73
76
  :'think' => :'String',
74
77
  :'current_question' => :'String',
78
+ :'errored' => :'Boolean',
75
79
  :'search' => :'Search'
76
80
  }
77
81
  end
@@ -116,6 +120,12 @@ module RagieRubySdk
116
120
  self.current_question = nil
117
121
  end
118
122
 
123
+ if attributes.key?(:'errored')
124
+ self.errored = attributes[:'errored']
125
+ else
126
+ self.errored = false
127
+ end
128
+
119
129
  if attributes.key?(:'search')
120
130
  self.search = attributes[:'search']
121
131
  else
@@ -203,6 +213,7 @@ module RagieRubySdk
203
213
  type == o.type &&
204
214
  think == o.think &&
205
215
  current_question == o.current_question &&
216
+ errored == o.errored &&
206
217
  search == o.search
207
218
  end
208
219
 
@@ -215,7 +226,7 @@ module RagieRubySdk
215
226
  # Calculates hash code according to all attributes.
216
227
  # @return [Integer] Hash code
217
228
  def hash
218
- [type, think, current_question, search].hash
229
+ [type, think, current_question, errored, search].hash
219
230
  end
220
231
 
221
232
  # Builds the object from hash
@@ -21,6 +21,8 @@ module RagieRubySdk
21
21
 
22
22
  attr_accessor :current_question
23
23
 
24
+ attr_accessor :errored
25
+
24
26
  # The search request to be made.
25
27
  attr_accessor :search
26
28
 
@@ -57,6 +59,7 @@ module RagieRubySdk
57
59
  :'type' => :'type',
58
60
  :'think' => :'think',
59
61
  :'current_question' => :'current_question',
62
+ :'errored' => :'errored',
60
63
  :'search' => :'search',
61
64
  :'query_details' => :'query_details',
62
65
  :'search_log' => :'search_log'
@@ -79,6 +82,7 @@ module RagieRubySdk
79
82
  :'type' => :'String',
80
83
  :'think' => :'String',
81
84
  :'current_question' => :'String',
85
+ :'errored' => :'Boolean',
82
86
  :'search' => :'Search',
83
87
  :'query_details' => :'Array<QueryDetails>',
84
88
  :'search_log' => :'String'
@@ -125,6 +129,12 @@ module RagieRubySdk
125
129
  self.current_question = nil
126
130
  end
127
131
 
132
+ if attributes.key?(:'errored')
133
+ self.errored = attributes[:'errored']
134
+ else
135
+ self.errored = false
136
+ end
137
+
128
138
  if attributes.key?(:'search')
129
139
  self.search = attributes[:'search']
130
140
  else
@@ -224,6 +234,7 @@ module RagieRubySdk
224
234
  type == o.type &&
225
235
  think == o.think &&
226
236
  current_question == o.current_question &&
237
+ errored == o.errored &&
227
238
  search == o.search &&
228
239
  query_details == o.query_details &&
229
240
  search_log == o.search_log
@@ -238,7 +249,7 @@ module RagieRubySdk
238
249
  # Calculates hash code according to all attributes.
239
250
  # @return [Integer] Hash code
240
251
  def hash
241
- [type, think, current_question, search, query_details, search_log].hash
252
+ [type, think, current_question, errored, search, query_details, search_log].hash
242
253
  end
243
254
 
244
255
  # Builds the object from hash
@@ -21,6 +21,8 @@ module RagieRubySdk
21
21
 
22
22
  attr_accessor :current_question
23
23
 
24
+ attr_accessor :errored
25
+
24
26
  # The a potential partial answer when a full answer was not possible.
25
27
  attr_accessor :partial_answer
26
28
 
@@ -52,6 +54,7 @@ module RagieRubySdk
52
54
  :'type' => :'type',
53
55
  :'think' => :'think',
54
56
  :'current_question' => :'current_question',
57
+ :'errored' => :'errored',
55
58
  :'partial_answer' => :'partial_answer'
56
59
  }
57
60
  end
@@ -72,6 +75,7 @@ module RagieRubySdk
72
75
  :'type' => :'String',
73
76
  :'think' => :'String',
74
77
  :'current_question' => :'String',
78
+ :'errored' => :'Boolean',
75
79
  :'partial_answer' => :'Answer'
76
80
  }
77
81
  end
@@ -116,6 +120,12 @@ module RagieRubySdk
116
120
  self.current_question = nil
117
121
  end
118
122
 
123
+ if attributes.key?(:'errored')
124
+ self.errored = attributes[:'errored']
125
+ else
126
+ self.errored = false
127
+ end
128
+
119
129
  if attributes.key?(:'partial_answer')
120
130
  self.partial_answer = attributes[:'partial_answer']
121
131
  else
@@ -203,6 +213,7 @@ module RagieRubySdk
203
213
  type == o.type &&
204
214
  think == o.think &&
205
215
  current_question == o.current_question &&
216
+ errored == o.errored &&
206
217
  partial_answer == o.partial_answer
207
218
  end
208
219
 
@@ -215,7 +226,7 @@ module RagieRubySdk
215
226
  # Calculates hash code according to all attributes.
216
227
  # @return [Integer] Hash code
217
228
  def hash
218
- [type, think, current_question, partial_answer].hash
229
+ [type, think, current_question, errored, partial_answer].hash
219
230
  end
220
231
 
221
232
  # Builds the object from hash
@@ -11,5 +11,5 @@ Generator version: 7.17.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module RagieRubySdk
14
- VERSION = '1.0.18'
14
+ VERSION = '1.0.19'
15
15
  end
@@ -96,6 +96,7 @@ require 'ragie_ruby_sdk/models/entity_extracted_webhook_payload'
96
96
  require 'ragie_ruby_sdk/models/entity_list'
97
97
  require 'ragie_ruby_sdk/models/error_message'
98
98
  require 'ragie_ruby_sdk/models/evaluated_answer_step'
99
+ require 'ragie_ruby_sdk/models/failed_step'
99
100
  require 'ragie_ruby_sdk/models/file_search_output'
100
101
  require 'ragie_ruby_sdk/models/file_search_result'
101
102
  require 'ragie_ruby_sdk/models/final_answer'
@@ -49,6 +49,12 @@ describe RagieRubySdk::AnswerStep do
49
49
  end
50
50
  end
51
51
 
52
+ describe 'test attribute "errored"' 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
+
52
58
  describe 'test attribute "other_resolved_question_ids"' do
53
59
  it 'should work' do
54
60
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -49,6 +49,12 @@ describe RagieRubySdk::CodeStep do
49
49
  end
50
50
  end
51
51
 
52
+ describe 'test attribute "errored"' 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
+
52
58
  describe 'test attribute "code_issue"' do
53
59
  it 'should work' do
54
60
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -49,6 +49,12 @@ describe RagieRubySdk::EvaluatedAnswerStep do
49
49
  end
50
50
  end
51
51
 
52
+ describe 'test attribute "errored"' 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
+
52
58
  describe 'test attribute "answer"' do
53
59
  it 'should work' do
54
60
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -0,0 +1,58 @@
1
+ =begin
2
+ #Ragie API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for RagieRubySdk::FailedStep
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe RagieRubySdk::FailedStep do
21
+ #let(:instance) { RagieRubySdk::FailedStep.new }
22
+
23
+ describe 'test an instance of FailedStep' do
24
+ it 'should create an instance of FailedStep' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(RagieRubySdk::FailedStep)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "type"' 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', ["failed"])
34
+ # validator.allowable_values.each do |value|
35
+ # expect { instance.type = value }.not_to raise_error
36
+ # end
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "think"' 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 "current_question"' 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 "errored"' 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
@@ -49,6 +49,12 @@ describe RagieRubySdk::PlanStep do
49
49
  end
50
50
  end
51
51
 
52
+ describe 'test attribute "errored"' 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
+
52
58
  describe 'test attribute "questions_to_answer"' do
53
59
  it 'should work' do
54
60
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -49,6 +49,12 @@ describe RagieRubySdk::SearchStep do
49
49
  end
50
50
  end
51
51
 
52
+ describe 'test attribute "errored"' 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
+
52
58
  describe 'test attribute "search"' do
53
59
  it 'should work' do
54
60
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -49,6 +49,12 @@ describe RagieRubySdk::SearchStepWithQueryDetails do
49
49
  end
50
50
  end
51
51
 
52
+ describe 'test attribute "errored"' 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
+
52
58
  describe 'test attribute "search"' do
53
59
  it 'should work' do
54
60
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -49,6 +49,12 @@ describe RagieRubySdk::SurrenderStep do
49
49
  end
50
50
  end
51
51
 
52
+ describe 'test attribute "errored"' 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
+
52
58
  describe 'test attribute "partial_answer"' do
53
59
  it 'should work' do
54
60
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ragie_ruby_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.18
4
+ version: 1.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
@@ -173,6 +173,7 @@ files:
173
173
  - docs/EntityList.md
174
174
  - docs/ErrorMessage.md
175
175
  - docs/EvaluatedAnswerStep.md
176
+ - docs/FailedStep.md
176
177
  - docs/FileSearchOutput.md
177
178
  - docs/FileSearchResult.md
178
179
  - docs/FinalAnswer.md
@@ -364,6 +365,7 @@ files:
364
365
  - lib/ragie_ruby_sdk/models/entity_list.rb
365
366
  - lib/ragie_ruby_sdk/models/error_message.rb
366
367
  - lib/ragie_ruby_sdk/models/evaluated_answer_step.rb
368
+ - lib/ragie_ruby_sdk/models/failed_step.rb
367
369
  - lib/ragie_ruby_sdk/models/file_search_output.rb
368
370
  - lib/ragie_ruby_sdk/models/file_search_result.rb
369
371
  - lib/ragie_ruby_sdk/models/final_answer.rb
@@ -549,6 +551,7 @@ files:
549
551
  - spec/models/entity_spec.rb
550
552
  - spec/models/error_message_spec.rb
551
553
  - spec/models/evaluated_answer_step_spec.rb
554
+ - spec/models/failed_step_spec.rb
552
555
  - spec/models/file_search_output_spec.rb
553
556
  - spec/models/file_search_result_spec.rb
554
557
  - spec/models/final_answer_evidence_inner_spec.rb
@@ -755,6 +758,7 @@ test_files:
755
758
  - spec/models/entity_spec.rb
756
759
  - spec/models/error_message_spec.rb
757
760
  - spec/models/evaluated_answer_step_spec.rb
761
+ - spec/models/failed_step_spec.rb
758
762
  - spec/models/file_search_output_spec.rb
759
763
  - spec/models/file_search_result_spec.rb
760
764
  - spec/models/final_answer_evidence_inner_spec.rb