fetch_hive 0.2.5 → 0.2.8

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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -5
  3. data/lib/fetch_hive/client.rb +139 -13
  4. data/lib/fetch_hive/generated/api/agent_chat_messages_api.rb +97 -0
  5. data/lib/fetch_hive/generated/api/agent_chats_api.rb +413 -0
  6. data/lib/fetch_hive/generated/api/agents_api.rb +359 -4
  7. data/lib/fetch_hive/generated/api/assets_api.rb +153 -0
  8. data/lib/fetch_hive/generated/api/hive_agents_api.rb +90 -0
  9. data/lib/fetch_hive/generated/api/knowledge_base_items_api.rb +482 -0
  10. data/lib/fetch_hive/generated/api/knowledge_bases_api.rb +457 -0
  11. data/lib/fetch_hive/generated/api/models_api.rb +79 -0
  12. data/lib/fetch_hive/generated/api/prompts_api.rb +3 -3
  13. data/lib/fetch_hive/generated/api/requests_api.rb +85 -0
  14. data/lib/fetch_hive/generated/api/search_services_api.rb +147 -0
  15. data/lib/fetch_hive/generated/api/workflows_api.rb +2 -2
  16. data/lib/fetch_hive/generated/api_client.rb +2 -2
  17. data/lib/fetch_hive/generated/api_error.rb +2 -2
  18. data/lib/fetch_hive/generated/api_model_base.rb +2 -2
  19. data/lib/fetch_hive/generated/configuration.rb +2 -2
  20. data/lib/fetch_hive/generated/models/agent_attachment.rb +104 -0
  21. data/lib/fetch_hive/generated/models/agent_attachment_one_of.rb +191 -0
  22. data/lib/fetch_hive/generated/models/agent_message.rb +11 -11
  23. data/lib/fetch_hive/generated/models/asset_object.rb +350 -0
  24. data/lib/fetch_hive/generated/models/asset_object_transcription.rb +212 -0
  25. data/lib/fetch_hive/generated/models/async_config.rb +2 -2
  26. data/lib/fetch_hive/generated/models/delete_public_workspaces_agents200_response.rb +164 -0
  27. data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats200_response.rb +164 -0
  28. data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats404_response.rb +164 -0
  29. data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases200_response.rb +164 -0
  30. data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases_items200_response.rb +164 -0
  31. data/lib/fetch_hive/generated/models/error_response.rb +23 -17
  32. data/lib/fetch_hive/generated/models/generated_artifact.rb +236 -0
  33. data/lib/fetch_hive/generated/models/get_public_models200_response_inner.rb +474 -0
  34. data/lib/fetch_hive/generated/models/get_public_requests200_response.rb +319 -0
  35. data/lib/fetch_hive/generated/models/get_public_requests404_response.rb +164 -0
  36. data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response.rb +166 -0
  37. data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner.rb +294 -0
  38. data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner_countries_inner.rb +216 -0
  39. data/lib/fetch_hive/generated/models/get_public_search_services_countries2404_response.rb +175 -0
  40. data/lib/fetch_hive/generated/models/get_public_workspaces_agents200_response.rb +164 -0
  41. data/lib/fetch_hive/generated/models/get_public_workspaces_agents2200_response.rb +166 -0
  42. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats200_response.rb +164 -0
  43. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response.rb +166 -0
  44. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response_messages_inner.rb +276 -0
  45. data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages422_response.rb +164 -0
  46. data/lib/fetch_hive/generated/models/get_public_workspaces_assets200_response.rb +166 -0
  47. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases200_response.rb +166 -0
  48. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2200_response.rb +164 -0
  49. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2422_response.rb +164 -0
  50. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response.rb +166 -0
  51. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response_knowledge_base_items_inner.rb +294 -0
  52. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2200_response.rb +164 -0
  53. data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2422_response.rb +164 -0
  54. data/lib/fetch_hive/generated/models/hive_agent_async_config.rb +192 -0
  55. data/lib/fetch_hive/generated/models/hive_agent_sources.rb +187 -0
  56. data/lib/fetch_hive/generated/models/invoke_agent_request.rb +92 -11
  57. data/lib/fetch_hive/generated/models/invoke_agent_response.rb +18 -6
  58. data/lib/fetch_hive/generated/models/invoke_hive_agent_request.rb +239 -0
  59. data/lib/fetch_hive/generated/models/invoke_hive_agent_response.rb +213 -0
  60. data/lib/fetch_hive/generated/models/invoke_prompt_request.rb +2 -2
  61. data/lib/fetch_hive/generated/models/invoke_prompt_response.rb +2 -2
  62. data/lib/fetch_hive/generated/models/invoke_workflow_async_response.rb +2 -2
  63. data/lib/fetch_hive/generated/models/invoke_workflow_request.rb +2 -2
  64. data/lib/fetch_hive/generated/models/invoke_workflow_response.rb +2 -2
  65. data/lib/fetch_hive/generated/models/knowledge_base_object.rb +470 -0
  66. data/lib/fetch_hive/generated/models/metadata_value.rb +2 -2
  67. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents200_response.rb +190 -0
  68. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats200_response.rb +190 -0
  69. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_clear_messages200_response.rb +190 -0
  70. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request.rb +164 -0
  71. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request_chat.rb +147 -0
  72. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request.rb +164 -0
  73. data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request_agent.rb +304 -0
  74. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases200_response.rb +190 -0
  75. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items200_response.rb +190 -0
  76. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request.rb +164 -0
  77. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +265 -0
  78. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request.rb +147 -0
  79. data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request_knowledge_base.rb +217 -0
  80. data/lib/fetch_hive/generated/models/post_public_workspaces_agents200_response.rb +190 -0
  81. data/lib/fetch_hive/generated/models/post_public_workspaces_agents422_response.rb +164 -0
  82. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response.rb +190 -0
  83. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response_chat.rb +305 -0
  84. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats422_response.rb +175 -0
  85. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request.rb +164 -0
  86. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request_chat.rb +164 -0
  87. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request.rb +164 -0
  88. data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request_agent.rb +252 -0
  89. data/lib/fetch_hive/generated/models/post_public_workspaces_assets200_response.rb +190 -0
  90. data/lib/fetch_hive/generated/models/post_public_workspaces_assets422_response.rb +216 -0
  91. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases200_response.rb +190 -0
  92. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items200_response.rb +190 -0
  93. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items422_response.rb +158 -0
  94. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_regenerate200_response.rb +190 -0
  95. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request.rb +164 -0
  96. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +322 -0
  97. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request.rb +164 -0
  98. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request_knowledge_base.rb +234 -0
  99. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search200_response.rb +190 -0
  100. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search422_response.rb +164 -0
  101. data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search_request.rb +302 -0
  102. data/lib/fetch_hive/generated/models/sse_chunk.rb +13 -4
  103. data/lib/fetch_hive/generated/models/token_usage.rb +2 -2
  104. data/lib/fetch_hive/generated/models/tool_invocation.rb +2 -2
  105. data/lib/fetch_hive/generated/version.rb +2 -2
  106. metadata +83 -3
@@ -0,0 +1,164 @@
1
+ =begin
2
+ #Fetch Hive Public API
3
+
4
+ #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
+
6
+ The version of the OpenAPI document: 0.2.8
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FetchHive::Generated
17
+ class PostPublicWorkspacesKnowledgeBasesSearch422Response < ApiModelBase
18
+ attr_accessor :error
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'error' => :'error'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'error' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `FetchHive::Generated::PostPublicWorkspacesKnowledgeBasesSearch422Response` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `FetchHive::Generated::PostPublicWorkspacesKnowledgeBasesSearch422Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'error')
67
+ self.error = attributes[:'error']
68
+ else
69
+ self.error = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @error.nil?
79
+ invalid_properties.push('invalid value for "error", error cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @error.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] error Value to be assigned
95
+ def error=(error)
96
+ if error.nil?
97
+ fail ArgumentError, 'error cannot be nil'
98
+ end
99
+
100
+ @error = error
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ error == o.error
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [error].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Returns the object in the form of hash
147
+ # @return [Hash] Returns the object in the form of hash
148
+ def to_hash
149
+ hash = {}
150
+ self.class.attribute_map.each_pair do |attr, param|
151
+ value = self.send(attr)
152
+ if value.nil?
153
+ is_nullable = self.class.openapi_nullable.include?(attr)
154
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
155
+ end
156
+
157
+ hash[param] = _to_hash(value)
158
+ end
159
+ hash
160
+ end
161
+
162
+ end
163
+
164
+ end
@@ -0,0 +1,302 @@
1
+ =begin
2
+ #Fetch Hive Public API
3
+
4
+ #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
+
6
+ The version of the OpenAPI document: 0.2.8
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.22.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module FetchHive::Generated
17
+ class PostPublicWorkspacesKnowledgeBasesSearchRequest < ApiModelBase
18
+ attr_accessor :search_query
19
+
20
+ attr_accessor :search_type
21
+
22
+ attr_accessor :search_chunk_limit
23
+
24
+ attr_accessor :search_score_threshold
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
+ :'search_query' => :'search_query',
52
+ :'search_type' => :'search_type',
53
+ :'search_chunk_limit' => :'search_chunk_limit',
54
+ :'search_score_threshold' => :'search_score_threshold'
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
+ :'search_query' => :'String',
72
+ :'search_type' => :'String',
73
+ :'search_chunk_limit' => :'Integer',
74
+ :'search_score_threshold' => :'Float'
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 `FetchHive::Generated::PostPublicWorkspacesKnowledgeBasesSearchRequest` 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 `FetchHive::Generated::PostPublicWorkspacesKnowledgeBasesSearchRequest`. 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?(:'search_query')
101
+ self.search_query = attributes[:'search_query']
102
+ else
103
+ self.search_query = nil
104
+ end
105
+
106
+ if attributes.key?(:'search_type')
107
+ self.search_type = attributes[:'search_type']
108
+ else
109
+ self.search_type = nil
110
+ end
111
+
112
+ if attributes.key?(:'search_chunk_limit')
113
+ self.search_chunk_limit = attributes[:'search_chunk_limit']
114
+ else
115
+ self.search_chunk_limit = nil
116
+ end
117
+
118
+ if attributes.key?(:'search_score_threshold')
119
+ self.search_score_threshold = attributes[:'search_score_threshold']
120
+ else
121
+ self.search_score_threshold = nil
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 @search_query.nil?
131
+ invalid_properties.push('invalid value for "search_query", search_query cannot be nil.')
132
+ end
133
+
134
+ if @search_type.nil?
135
+ invalid_properties.push('invalid value for "search_type", search_type cannot be nil.')
136
+ end
137
+
138
+ if @search_chunk_limit.nil?
139
+ invalid_properties.push('invalid value for "search_chunk_limit", search_chunk_limit cannot be nil.')
140
+ end
141
+
142
+ if @search_chunk_limit > 20
143
+ invalid_properties.push('invalid value for "search_chunk_limit", must be smaller than or equal to 20.')
144
+ end
145
+
146
+ if @search_chunk_limit < 1
147
+ invalid_properties.push('invalid value for "search_chunk_limit", must be greater than or equal to 1.')
148
+ end
149
+
150
+ if @search_score_threshold.nil?
151
+ invalid_properties.push('invalid value for "search_score_threshold", search_score_threshold cannot be nil.')
152
+ end
153
+
154
+ if @search_score_threshold > 1
155
+ invalid_properties.push('invalid value for "search_score_threshold", must be smaller than or equal to 1.')
156
+ end
157
+
158
+ if @search_score_threshold < 0
159
+ invalid_properties.push('invalid value for "search_score_threshold", must be greater than or equal to 0.')
160
+ end
161
+
162
+ invalid_properties
163
+ end
164
+
165
+ # Check to see if the all the properties in the model are valid
166
+ # @return true if the model is valid
167
+ def valid?
168
+ warn '[DEPRECATED] the `valid?` method is obsolete'
169
+ return false if @search_query.nil?
170
+ return false if @search_type.nil?
171
+ search_type_validator = EnumAttributeValidator.new('String', ["hybrid", "vector", "full_text"])
172
+ return false unless search_type_validator.valid?(@search_type)
173
+ return false if @search_chunk_limit.nil?
174
+ return false if @search_chunk_limit > 20
175
+ return false if @search_chunk_limit < 1
176
+ return false if @search_score_threshold.nil?
177
+ return false if @search_score_threshold > 1
178
+ return false if @search_score_threshold < 0
179
+ true
180
+ end
181
+
182
+ # Custom attribute writer method with validation
183
+ # @param [Object] search_query Value to be assigned
184
+ def search_query=(search_query)
185
+ if search_query.nil?
186
+ fail ArgumentError, 'search_query cannot be nil'
187
+ end
188
+
189
+ @search_query = search_query
190
+ end
191
+
192
+ # Custom attribute writer method checking allowed values (enum).
193
+ # @param [Object] search_type Object to be assigned
194
+ def search_type=(search_type)
195
+ validator = EnumAttributeValidator.new('String', ["hybrid", "vector", "full_text"])
196
+ unless validator.valid?(search_type)
197
+ fail ArgumentError, "invalid value for \"search_type\", must be one of #{validator.allowable_values}."
198
+ end
199
+ @search_type = search_type
200
+ end
201
+
202
+ # Custom attribute writer method with validation
203
+ # @param [Object] search_chunk_limit Value to be assigned
204
+ def search_chunk_limit=(search_chunk_limit)
205
+ if search_chunk_limit.nil?
206
+ fail ArgumentError, 'search_chunk_limit cannot be nil'
207
+ end
208
+
209
+ if search_chunk_limit > 20
210
+ fail ArgumentError, 'invalid value for "search_chunk_limit", must be smaller than or equal to 20.'
211
+ end
212
+
213
+ if search_chunk_limit < 1
214
+ fail ArgumentError, 'invalid value for "search_chunk_limit", must be greater than or equal to 1.'
215
+ end
216
+
217
+ @search_chunk_limit = search_chunk_limit
218
+ end
219
+
220
+ # Custom attribute writer method with validation
221
+ # @param [Object] search_score_threshold Value to be assigned
222
+ def search_score_threshold=(search_score_threshold)
223
+ if search_score_threshold.nil?
224
+ fail ArgumentError, 'search_score_threshold cannot be nil'
225
+ end
226
+
227
+ if search_score_threshold > 1
228
+ fail ArgumentError, 'invalid value for "search_score_threshold", must be smaller than or equal to 1.'
229
+ end
230
+
231
+ if search_score_threshold < 0
232
+ fail ArgumentError, 'invalid value for "search_score_threshold", must be greater than or equal to 0.'
233
+ end
234
+
235
+ @search_score_threshold = search_score_threshold
236
+ end
237
+
238
+ # Checks equality by comparing each attribute.
239
+ # @param [Object] Object to be compared
240
+ def ==(o)
241
+ return true if self.equal?(o)
242
+ self.class == o.class &&
243
+ search_query == o.search_query &&
244
+ search_type == o.search_type &&
245
+ search_chunk_limit == o.search_chunk_limit &&
246
+ search_score_threshold == o.search_score_threshold
247
+ end
248
+
249
+ # @see the `==` method
250
+ # @param [Object] Object to be compared
251
+ def eql?(o)
252
+ self == o
253
+ end
254
+
255
+ # Calculates hash code according to all attributes.
256
+ # @return [Integer] Hash code
257
+ def hash
258
+ [search_query, search_type, search_chunk_limit, search_score_threshold].hash
259
+ end
260
+
261
+ # Builds the object from hash
262
+ # @param [Hash] attributes Model attributes in the form of hash
263
+ # @return [Object] Returns the model itself
264
+ def self.build_from_hash(attributes)
265
+ return nil unless attributes.is_a?(Hash)
266
+ attributes = attributes.transform_keys(&:to_sym)
267
+ transformed_hash = {}
268
+ openapi_types.each_pair do |key, type|
269
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
270
+ transformed_hash["#{key}"] = nil
271
+ elsif type =~ /\AArray<(.*)>/i
272
+ # check to ensure the input is an array given that the attribute
273
+ # is documented as an array but the input is not
274
+ if attributes[attribute_map[key]].is_a?(Array)
275
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
276
+ end
277
+ elsif !attributes[attribute_map[key]].nil?
278
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
279
+ end
280
+ end
281
+ new(transformed_hash)
282
+ end
283
+
284
+ # Returns the object in the form of hash
285
+ # @return [Hash] Returns the object in the form of hash
286
+ def to_hash
287
+ hash = {}
288
+ self.class.attribute_map.each_pair do |attr, param|
289
+ value = self.send(attr)
290
+ if value.nil?
291
+ is_nullable = self.class.openapi_nullable.include?(attr)
292
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
293
+ end
294
+
295
+ hash[param] = _to_hash(value)
296
+ end
297
+ hash
298
+ end
299
+
300
+ end
301
+
302
+ end
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Fetch Hive Public API
3
3
 
4
- #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
4
+ #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.5
6
+ The version of the OpenAPI document: 0.2.8
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -14,7 +14,7 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module FetchHive::Generated
17
- # A single event in a Server-Sent Events stream. The `type` field is a runtime discriminator. Known values: - `reasoning` — a reasoning / thinking chunk (prompt and agent streams) - `response` — a text chunk (prompt and agent streams) - `tool` — a tool invocation result (agent stream only) - `usage` — final token usage event; signals end of meaningful stream content - `summary` — auto-summarization event emitted before reasoning when a thread history was compressed (agent stream only) - `error` — server-side error during streaming The stream is terminated by `data: [DONE]`, which is handled by the SSE parser and never surfaced as a chunk.
17
+ # A single event in a Server-Sent Events stream. The `type` field is a runtime discriminator. Known values: - `reasoning` — a reasoning / thinking chunk (prompt and agent streams) - `response` — a text chunk (prompt and agent streams) - `tool` — a tool invocation result (agent stream only) - `artifact` — a generated document or image descriptor (agent stream only) - `usage` — final token usage event; signals end of meaningful stream content - `summary` — auto-summarization event emitted before reasoning when a thread history was compressed (agent stream only) - `error` — server-side error during streaming The stream is terminated by `data: [DONE]`, which is handled by the SSE parser and never surfaced as a chunk.
18
18
  class SseChunk < ApiModelBase
19
19
  # Event type discriminator.
20
20
  attr_accessor :type
@@ -46,6 +46,8 @@ module FetchHive::Generated
46
46
  # Serialised JSON tool result. Present for `tool` events.
47
47
  attr_accessor :observation
48
48
 
49
+ attr_accessor :artifact
50
+
49
51
  # Reason the stream ended. Present on `usage` events (e.g. \"completed\").
50
52
  attr_accessor :stop_reason
51
53
 
@@ -79,6 +81,7 @@ module FetchHive::Generated
79
81
  :'tool_type' => :'tool_type',
80
82
  :'tool_input' => :'tool_input',
81
83
  :'observation' => :'observation',
84
+ :'artifact' => :'artifact',
82
85
  :'stop_reason' => :'stop_reason',
83
86
  :'summary_text' => :'summary_text',
84
87
  :'original_token_count' => :'original_token_count',
@@ -112,6 +115,7 @@ module FetchHive::Generated
112
115
  :'tool_type' => :'String',
113
116
  :'tool_input' => :'Hash<String, Object>',
114
117
  :'observation' => :'String',
118
+ :'artifact' => :'GeneratedArtifact',
115
119
  :'stop_reason' => :'String',
116
120
  :'summary_text' => :'String',
117
121
  :'original_token_count' => :'Integer',
@@ -186,6 +190,10 @@ module FetchHive::Generated
186
190
  self.observation = attributes[:'observation']
187
191
  end
188
192
 
193
+ if attributes.key?(:'artifact')
194
+ self.artifact = attributes[:'artifact']
195
+ end
196
+
189
197
  if attributes.key?(:'stop_reason')
190
198
  self.stop_reason = attributes[:'stop_reason']
191
199
  end
@@ -245,6 +253,7 @@ module FetchHive::Generated
245
253
  tool_type == o.tool_type &&
246
254
  tool_input == o.tool_input &&
247
255
  observation == o.observation &&
256
+ artifact == o.artifact &&
248
257
  stop_reason == o.stop_reason &&
249
258
  summary_text == o.summary_text &&
250
259
  original_token_count == o.original_token_count &&
@@ -263,7 +272,7 @@ module FetchHive::Generated
263
272
  # Calculates hash code according to all attributes.
264
273
  # @return [Integer] Hash code
265
274
  def hash
266
- [type, response, request_id, model, done, tool_id, tool, tool_type, tool_input, observation, stop_reason, summary_text, original_token_count, context_limit, provider, error, usage].hash
275
+ [type, response, request_id, model, done, tool_id, tool, tool_type, tool_input, observation, artifact, stop_reason, summary_text, original_token_count, context_limit, provider, error, usage].hash
267
276
  end
268
277
 
269
278
  # Builds the object from hash
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Fetch Hive Public API
3
3
 
4
- #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
4
+ #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.5
6
+ The version of the OpenAPI document: 0.2.8
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Fetch Hive Public API
3
3
 
4
- #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
4
+ #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.5
6
+ The version of the OpenAPI document: 0.2.8
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0
@@ -1,9 +1,9 @@
1
1
  =begin
2
2
  #Fetch Hive Public API
3
3
 
4
- #The Fetch Hive public API lets you invoke prompts, workflows, and agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
4
+ #The Fetch Hive public API lets you invoke prompts, workflows, agents, and Hive Agents programmatically using an API token. ## Authentication All requests require a Bearer token in the `Authorization` header: ``` Authorization: Bearer <your-api-token> ``` ## Streaming Pass `\"streaming\": true` in the request body to receive a `text/event-stream` response. Each event is a JSON object sent as `data: <json>\\n\\n`. The stream ends with `data: [DONE]\\n\\n`.
5
5
 
6
- The version of the OpenAPI document: 0.2.5
6
+ The version of the OpenAPI document: 0.2.8
7
7
 
8
8
  Generated by: https://openapi-generator.tech
9
9
  Generator version: 7.22.0