fetch_hive 0.2.6 → 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.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/fetch_hive/client.rb +139 -13
- data/lib/fetch_hive/generated/api/agent_chat_messages_api.rb +97 -0
- data/lib/fetch_hive/generated/api/agent_chats_api.rb +413 -0
- data/lib/fetch_hive/generated/api/agents_api.rb +359 -4
- data/lib/fetch_hive/generated/api/assets_api.rb +153 -0
- data/lib/fetch_hive/generated/api/hive_agents_api.rb +90 -0
- data/lib/fetch_hive/generated/api/knowledge_base_items_api.rb +482 -0
- data/lib/fetch_hive/generated/api/knowledge_bases_api.rb +457 -0
- data/lib/fetch_hive/generated/api/models_api.rb +79 -0
- data/lib/fetch_hive/generated/api/prompts_api.rb +3 -3
- data/lib/fetch_hive/generated/api/requests_api.rb +85 -0
- data/lib/fetch_hive/generated/api/search_services_api.rb +147 -0
- data/lib/fetch_hive/generated/api/workflows_api.rb +2 -2
- data/lib/fetch_hive/generated/api_client.rb +2 -2
- data/lib/fetch_hive/generated/api_error.rb +2 -2
- data/lib/fetch_hive/generated/api_model_base.rb +2 -2
- data/lib/fetch_hive/generated/configuration.rb +2 -2
- data/lib/fetch_hive/generated/models/agent_attachment.rb +104 -0
- data/lib/fetch_hive/generated/models/agent_attachment_one_of.rb +191 -0
- data/lib/fetch_hive/generated/models/agent_message.rb +11 -11
- data/lib/fetch_hive/generated/models/asset_object.rb +350 -0
- data/lib/fetch_hive/generated/models/asset_object_transcription.rb +212 -0
- data/lib/fetch_hive/generated/models/async_config.rb +2 -2
- data/lib/fetch_hive/generated/models/delete_public_workspaces_agents200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/delete_public_workspaces_agents_chats404_response.rb +164 -0
- data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/delete_public_workspaces_knowledge_bases_items200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/error_response.rb +23 -17
- data/lib/fetch_hive/generated/models/generated_artifact.rb +236 -0
- data/lib/fetch_hive/generated/models/get_public_models200_response_inner.rb +474 -0
- data/lib/fetch_hive/generated/models/get_public_requests200_response.rb +319 -0
- data/lib/fetch_hive/generated/models/get_public_requests404_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response.rb +166 -0
- data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner.rb +294 -0
- data/lib/fetch_hive/generated/models/get_public_search_services_countries200_response_services_inner_countries_inner.rb +216 -0
- data/lib/fetch_hive/generated/models/get_public_search_services_countries2404_response.rb +175 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents2200_response.rb +166 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response.rb +166 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages200_response_messages_inner.rb +276 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_agents_chats_messages422_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_assets200_response.rb +166 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases200_response.rb +166 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases2422_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response.rb +166 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items200_response_knowledge_base_items_inner.rb +294 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2200_response.rb +164 -0
- data/lib/fetch_hive/generated/models/get_public_workspaces_knowledge_bases_items2422_response.rb +164 -0
- data/lib/fetch_hive/generated/models/hive_agent_async_config.rb +192 -0
- data/lib/fetch_hive/generated/models/hive_agent_sources.rb +187 -0
- data/lib/fetch_hive/generated/models/invoke_agent_request.rb +92 -11
- data/lib/fetch_hive/generated/models/invoke_agent_response.rb +18 -6
- data/lib/fetch_hive/generated/models/invoke_hive_agent_request.rb +239 -0
- data/lib/fetch_hive/generated/models/invoke_hive_agent_response.rb +213 -0
- data/lib/fetch_hive/generated/models/invoke_prompt_request.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_prompt_response.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_workflow_async_response.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_workflow_request.rb +2 -2
- data/lib/fetch_hive/generated/models/invoke_workflow_response.rb +2 -2
- data/lib/fetch_hive/generated/models/knowledge_base_object.rb +470 -0
- data/lib/fetch_hive/generated/models/metadata_value.rb +2 -2
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_clear_messages200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request.rb +164 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_chats_request_chat.rb +147 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request.rb +164 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_agents_request_agent.rb +304 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request.rb +164 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +265 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request.rb +147 -0
- data/lib/fetch_hive/generated/models/patch_public_workspaces_knowledge_bases_request_knowledge_base.rb +217 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents422_response.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats200_response_chat.rb +305 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats422_response.rb +175 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_chats_request_chat.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_agents_request_agent.rb +252 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_assets200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_assets422_response.rb +216 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items422_response.rb +158 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_regenerate200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_items_request_knowledge_base_item.rb +322 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_request_knowledge_base.rb +234 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search200_response.rb +190 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search422_response.rb +164 -0
- data/lib/fetch_hive/generated/models/post_public_workspaces_knowledge_bases_search_request.rb +302 -0
- data/lib/fetch_hive/generated/models/sse_chunk.rb +13 -4
- data/lib/fetch_hive/generated/models/token_usage.rb +2 -2
- data/lib/fetch_hive/generated/models/tool_invocation.rb +2 -2
- data/lib/fetch_hive/generated/version.rb +2 -2
- metadata +83 -3
|
@@ -0,0 +1,470 @@
|
|
|
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 KnowledgeBaseObject < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :name
|
|
21
|
+
|
|
22
|
+
# (value may be null)
|
|
23
|
+
attr_accessor :description
|
|
24
|
+
|
|
25
|
+
attr_accessor :data_item_count
|
|
26
|
+
|
|
27
|
+
attr_accessor :search_score_threshold
|
|
28
|
+
|
|
29
|
+
attr_accessor :search_chunk_limit
|
|
30
|
+
|
|
31
|
+
# (value may be null)
|
|
32
|
+
attr_accessor :generated_at
|
|
33
|
+
|
|
34
|
+
attr_accessor :status
|
|
35
|
+
|
|
36
|
+
attr_accessor :search_type
|
|
37
|
+
|
|
38
|
+
attr_accessor :is_active
|
|
39
|
+
|
|
40
|
+
attr_accessor :is_archived
|
|
41
|
+
|
|
42
|
+
attr_accessor :is_hybrid_search
|
|
43
|
+
|
|
44
|
+
attr_accessor :is_vector_search
|
|
45
|
+
|
|
46
|
+
attr_accessor :is_full_text_search
|
|
47
|
+
|
|
48
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
|
+
def self.attribute_map
|
|
50
|
+
{
|
|
51
|
+
:'id' => :'id',
|
|
52
|
+
:'name' => :'name',
|
|
53
|
+
:'description' => :'description',
|
|
54
|
+
:'data_item_count' => :'data_item_count',
|
|
55
|
+
:'search_score_threshold' => :'search_score_threshold',
|
|
56
|
+
:'search_chunk_limit' => :'search_chunk_limit',
|
|
57
|
+
:'generated_at' => :'generated_at',
|
|
58
|
+
:'status' => :'status',
|
|
59
|
+
:'search_type' => :'search_type',
|
|
60
|
+
:'is_active' => :'is_active',
|
|
61
|
+
:'is_archived' => :'is_archived',
|
|
62
|
+
:'is_hybrid_search' => :'is_hybrid_search',
|
|
63
|
+
:'is_vector_search' => :'is_vector_search',
|
|
64
|
+
:'is_full_text_search' => :'is_full_text_search'
|
|
65
|
+
}
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Returns attribute mapping this model knows about
|
|
69
|
+
def self.acceptable_attribute_map
|
|
70
|
+
attribute_map
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Returns all the JSON keys this model knows about
|
|
74
|
+
def self.acceptable_attributes
|
|
75
|
+
acceptable_attribute_map.values
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Attribute type mapping.
|
|
79
|
+
def self.openapi_types
|
|
80
|
+
{
|
|
81
|
+
:'id' => :'String',
|
|
82
|
+
:'name' => :'String',
|
|
83
|
+
:'description' => :'String',
|
|
84
|
+
:'data_item_count' => :'Integer',
|
|
85
|
+
:'search_score_threshold' => :'String',
|
|
86
|
+
:'search_chunk_limit' => :'Integer',
|
|
87
|
+
:'generated_at' => :'Time',
|
|
88
|
+
:'status' => :'String',
|
|
89
|
+
:'search_type' => :'String',
|
|
90
|
+
:'is_active' => :'Boolean',
|
|
91
|
+
:'is_archived' => :'Boolean',
|
|
92
|
+
:'is_hybrid_search' => :'Boolean',
|
|
93
|
+
:'is_vector_search' => :'Boolean',
|
|
94
|
+
:'is_full_text_search' => :'Boolean'
|
|
95
|
+
}
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# List of attributes with nullable: true
|
|
99
|
+
def self.openapi_nullable
|
|
100
|
+
Set.new([
|
|
101
|
+
])
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Initializes the object
|
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
106
|
+
def initialize(attributes = {})
|
|
107
|
+
if (!attributes.is_a?(Hash))
|
|
108
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FetchHive::Generated::KnowledgeBaseObject` initialize method"
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
112
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
113
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
114
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
115
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FetchHive::Generated::KnowledgeBaseObject`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
116
|
+
end
|
|
117
|
+
h[k.to_sym] = v
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'id')
|
|
121
|
+
self.id = attributes[:'id']
|
|
122
|
+
else
|
|
123
|
+
self.id = nil
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'name')
|
|
127
|
+
self.name = attributes[:'name']
|
|
128
|
+
else
|
|
129
|
+
self.name = nil
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'description')
|
|
133
|
+
self.description = attributes[:'description']
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'data_item_count')
|
|
137
|
+
self.data_item_count = attributes[:'data_item_count']
|
|
138
|
+
else
|
|
139
|
+
self.data_item_count = nil
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.key?(:'search_score_threshold')
|
|
143
|
+
self.search_score_threshold = attributes[:'search_score_threshold']
|
|
144
|
+
else
|
|
145
|
+
self.search_score_threshold = nil
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'search_chunk_limit')
|
|
149
|
+
self.search_chunk_limit = attributes[:'search_chunk_limit']
|
|
150
|
+
else
|
|
151
|
+
self.search_chunk_limit = nil
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.key?(:'generated_at')
|
|
155
|
+
self.generated_at = attributes[:'generated_at']
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'status')
|
|
159
|
+
self.status = attributes[:'status']
|
|
160
|
+
else
|
|
161
|
+
self.status = nil
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'search_type')
|
|
165
|
+
self.search_type = attributes[:'search_type']
|
|
166
|
+
else
|
|
167
|
+
self.search_type = nil
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.key?(:'is_active')
|
|
171
|
+
self.is_active = attributes[:'is_active']
|
|
172
|
+
else
|
|
173
|
+
self.is_active = nil
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if attributes.key?(:'is_archived')
|
|
177
|
+
self.is_archived = attributes[:'is_archived']
|
|
178
|
+
else
|
|
179
|
+
self.is_archived = nil
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'is_hybrid_search')
|
|
183
|
+
self.is_hybrid_search = attributes[:'is_hybrid_search']
|
|
184
|
+
else
|
|
185
|
+
self.is_hybrid_search = nil
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if attributes.key?(:'is_vector_search')
|
|
189
|
+
self.is_vector_search = attributes[:'is_vector_search']
|
|
190
|
+
else
|
|
191
|
+
self.is_vector_search = nil
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'is_full_text_search')
|
|
195
|
+
self.is_full_text_search = attributes[:'is_full_text_search']
|
|
196
|
+
else
|
|
197
|
+
self.is_full_text_search = nil
|
|
198
|
+
end
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
202
|
+
# @return Array for valid properties with the reasons
|
|
203
|
+
def list_invalid_properties
|
|
204
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
205
|
+
invalid_properties = Array.new
|
|
206
|
+
if @id.nil?
|
|
207
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
if @name.nil?
|
|
211
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
if @data_item_count.nil?
|
|
215
|
+
invalid_properties.push('invalid value for "data_item_count", data_item_count cannot be nil.')
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
if @search_score_threshold.nil?
|
|
219
|
+
invalid_properties.push('invalid value for "search_score_threshold", search_score_threshold cannot be nil.')
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
if @search_chunk_limit.nil?
|
|
223
|
+
invalid_properties.push('invalid value for "search_chunk_limit", search_chunk_limit cannot be nil.')
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
if @status.nil?
|
|
227
|
+
invalid_properties.push('invalid value for "status", status cannot be nil.')
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
if @search_type.nil?
|
|
231
|
+
invalid_properties.push('invalid value for "search_type", search_type cannot be nil.')
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
if @is_active.nil?
|
|
235
|
+
invalid_properties.push('invalid value for "is_active", is_active cannot be nil.')
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if @is_archived.nil?
|
|
239
|
+
invalid_properties.push('invalid value for "is_archived", is_archived cannot be nil.')
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if @is_hybrid_search.nil?
|
|
243
|
+
invalid_properties.push('invalid value for "is_hybrid_search", is_hybrid_search cannot be nil.')
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
if @is_vector_search.nil?
|
|
247
|
+
invalid_properties.push('invalid value for "is_vector_search", is_vector_search cannot be nil.')
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
if @is_full_text_search.nil?
|
|
251
|
+
invalid_properties.push('invalid value for "is_full_text_search", is_full_text_search cannot be nil.')
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
invalid_properties
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
# Check to see if the all the properties in the model are valid
|
|
258
|
+
# @return true if the model is valid
|
|
259
|
+
def valid?
|
|
260
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
261
|
+
return false if @id.nil?
|
|
262
|
+
return false if @name.nil?
|
|
263
|
+
return false if @data_item_count.nil?
|
|
264
|
+
return false if @search_score_threshold.nil?
|
|
265
|
+
return false if @search_chunk_limit.nil?
|
|
266
|
+
return false if @status.nil?
|
|
267
|
+
return false if @search_type.nil?
|
|
268
|
+
return false if @is_active.nil?
|
|
269
|
+
return false if @is_archived.nil?
|
|
270
|
+
return false if @is_hybrid_search.nil?
|
|
271
|
+
return false if @is_vector_search.nil?
|
|
272
|
+
return false if @is_full_text_search.nil?
|
|
273
|
+
true
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Custom attribute writer method with validation
|
|
277
|
+
# @param [Object] id Value to be assigned
|
|
278
|
+
def id=(id)
|
|
279
|
+
if id.nil?
|
|
280
|
+
fail ArgumentError, 'id cannot be nil'
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
@id = id
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Custom attribute writer method with validation
|
|
287
|
+
# @param [Object] name Value to be assigned
|
|
288
|
+
def name=(name)
|
|
289
|
+
if name.nil?
|
|
290
|
+
fail ArgumentError, 'name cannot be nil'
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
@name = name
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Custom attribute writer method with validation
|
|
297
|
+
# @param [Object] data_item_count Value to be assigned
|
|
298
|
+
def data_item_count=(data_item_count)
|
|
299
|
+
if data_item_count.nil?
|
|
300
|
+
fail ArgumentError, 'data_item_count cannot be nil'
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
@data_item_count = data_item_count
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
# Custom attribute writer method with validation
|
|
307
|
+
# @param [Object] search_score_threshold Value to be assigned
|
|
308
|
+
def search_score_threshold=(search_score_threshold)
|
|
309
|
+
if search_score_threshold.nil?
|
|
310
|
+
fail ArgumentError, 'search_score_threshold cannot be nil'
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
@search_score_threshold = search_score_threshold
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Custom attribute writer method with validation
|
|
317
|
+
# @param [Object] search_chunk_limit Value to be assigned
|
|
318
|
+
def search_chunk_limit=(search_chunk_limit)
|
|
319
|
+
if search_chunk_limit.nil?
|
|
320
|
+
fail ArgumentError, 'search_chunk_limit cannot be nil'
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
@search_chunk_limit = search_chunk_limit
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# Custom attribute writer method with validation
|
|
327
|
+
# @param [Object] status Value to be assigned
|
|
328
|
+
def status=(status)
|
|
329
|
+
if status.nil?
|
|
330
|
+
fail ArgumentError, 'status cannot be nil'
|
|
331
|
+
end
|
|
332
|
+
|
|
333
|
+
@status = status
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# Custom attribute writer method with validation
|
|
337
|
+
# @param [Object] search_type Value to be assigned
|
|
338
|
+
def search_type=(search_type)
|
|
339
|
+
if search_type.nil?
|
|
340
|
+
fail ArgumentError, 'search_type cannot be nil'
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
@search_type = search_type
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# Custom attribute writer method with validation
|
|
347
|
+
# @param [Object] is_active Value to be assigned
|
|
348
|
+
def is_active=(is_active)
|
|
349
|
+
if is_active.nil?
|
|
350
|
+
fail ArgumentError, 'is_active cannot be nil'
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
@is_active = is_active
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# Custom attribute writer method with validation
|
|
357
|
+
# @param [Object] is_archived Value to be assigned
|
|
358
|
+
def is_archived=(is_archived)
|
|
359
|
+
if is_archived.nil?
|
|
360
|
+
fail ArgumentError, 'is_archived cannot be nil'
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
@is_archived = is_archived
|
|
364
|
+
end
|
|
365
|
+
|
|
366
|
+
# Custom attribute writer method with validation
|
|
367
|
+
# @param [Object] is_hybrid_search Value to be assigned
|
|
368
|
+
def is_hybrid_search=(is_hybrid_search)
|
|
369
|
+
if is_hybrid_search.nil?
|
|
370
|
+
fail ArgumentError, 'is_hybrid_search cannot be nil'
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
@is_hybrid_search = is_hybrid_search
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# Custom attribute writer method with validation
|
|
377
|
+
# @param [Object] is_vector_search Value to be assigned
|
|
378
|
+
def is_vector_search=(is_vector_search)
|
|
379
|
+
if is_vector_search.nil?
|
|
380
|
+
fail ArgumentError, 'is_vector_search cannot be nil'
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
@is_vector_search = is_vector_search
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# Custom attribute writer method with validation
|
|
387
|
+
# @param [Object] is_full_text_search Value to be assigned
|
|
388
|
+
def is_full_text_search=(is_full_text_search)
|
|
389
|
+
if is_full_text_search.nil?
|
|
390
|
+
fail ArgumentError, 'is_full_text_search cannot be nil'
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
@is_full_text_search = is_full_text_search
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# Checks equality by comparing each attribute.
|
|
397
|
+
# @param [Object] Object to be compared
|
|
398
|
+
def ==(o)
|
|
399
|
+
return true if self.equal?(o)
|
|
400
|
+
self.class == o.class &&
|
|
401
|
+
id == o.id &&
|
|
402
|
+
name == o.name &&
|
|
403
|
+
description == o.description &&
|
|
404
|
+
data_item_count == o.data_item_count &&
|
|
405
|
+
search_score_threshold == o.search_score_threshold &&
|
|
406
|
+
search_chunk_limit == o.search_chunk_limit &&
|
|
407
|
+
generated_at == o.generated_at &&
|
|
408
|
+
status == o.status &&
|
|
409
|
+
search_type == o.search_type &&
|
|
410
|
+
is_active == o.is_active &&
|
|
411
|
+
is_archived == o.is_archived &&
|
|
412
|
+
is_hybrid_search == o.is_hybrid_search &&
|
|
413
|
+
is_vector_search == o.is_vector_search &&
|
|
414
|
+
is_full_text_search == o.is_full_text_search
|
|
415
|
+
end
|
|
416
|
+
|
|
417
|
+
# @see the `==` method
|
|
418
|
+
# @param [Object] Object to be compared
|
|
419
|
+
def eql?(o)
|
|
420
|
+
self == o
|
|
421
|
+
end
|
|
422
|
+
|
|
423
|
+
# Calculates hash code according to all attributes.
|
|
424
|
+
# @return [Integer] Hash code
|
|
425
|
+
def hash
|
|
426
|
+
[id, name, description, data_item_count, search_score_threshold, search_chunk_limit, generated_at, status, search_type, is_active, is_archived, is_hybrid_search, is_vector_search, is_full_text_search].hash
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
# Builds the object from hash
|
|
430
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
431
|
+
# @return [Object] Returns the model itself
|
|
432
|
+
def self.build_from_hash(attributes)
|
|
433
|
+
return nil unless attributes.is_a?(Hash)
|
|
434
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
435
|
+
transformed_hash = {}
|
|
436
|
+
openapi_types.each_pair do |key, type|
|
|
437
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
438
|
+
transformed_hash["#{key}"] = nil
|
|
439
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
440
|
+
# check to ensure the input is an array given that the attribute
|
|
441
|
+
# is documented as an array but the input is not
|
|
442
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
443
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
444
|
+
end
|
|
445
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
446
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
447
|
+
end
|
|
448
|
+
end
|
|
449
|
+
new(transformed_hash)
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
# Returns the object in the form of hash
|
|
453
|
+
# @return [Hash] Returns the object in the form of hash
|
|
454
|
+
def to_hash
|
|
455
|
+
hash = {}
|
|
456
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
457
|
+
value = self.send(attr)
|
|
458
|
+
if value.nil?
|
|
459
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
460
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
461
|
+
end
|
|
462
|
+
|
|
463
|
+
hash[param] = _to_hash(value)
|
|
464
|
+
end
|
|
465
|
+
hash
|
|
466
|
+
end
|
|
467
|
+
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
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
|
|
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.
|
|
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
|
|
@@ -0,0 +1,190 @@
|
|
|
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 PatchPublicWorkspacesAgents200Response < ApiModelBase
|
|
18
|
+
attr_accessor :message
|
|
19
|
+
|
|
20
|
+
attr_accessor :agent
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'message' => :'message',
|
|
26
|
+
:'agent' => :'agent'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'message' => :'String',
|
|
44
|
+
:'agent' => :'Object'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FetchHive::Generated::PatchPublicWorkspacesAgents200Response` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FetchHive::Generated::PatchPublicWorkspacesAgents200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'message')
|
|
71
|
+
self.message = attributes[:'message']
|
|
72
|
+
else
|
|
73
|
+
self.message = nil
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'agent')
|
|
77
|
+
self.agent = attributes[:'agent']
|
|
78
|
+
else
|
|
79
|
+
self.agent = nil
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
if @message.nil?
|
|
89
|
+
invalid_properties.push('invalid value for "message", message cannot be nil.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if @agent.nil?
|
|
93
|
+
invalid_properties.push('invalid value for "agent", agent cannot be nil.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
invalid_properties
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
def valid?
|
|
102
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
+
return false if @message.nil?
|
|
104
|
+
return false if @agent.nil?
|
|
105
|
+
true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Custom attribute writer method with validation
|
|
109
|
+
# @param [Object] message Value to be assigned
|
|
110
|
+
def message=(message)
|
|
111
|
+
if message.nil?
|
|
112
|
+
fail ArgumentError, 'message cannot be nil'
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
@message = message
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Custom attribute writer method with validation
|
|
119
|
+
# @param [Object] agent Value to be assigned
|
|
120
|
+
def agent=(agent)
|
|
121
|
+
if agent.nil?
|
|
122
|
+
fail ArgumentError, 'agent cannot be nil'
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
@agent = agent
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Checks equality by comparing each attribute.
|
|
129
|
+
# @param [Object] Object to be compared
|
|
130
|
+
def ==(o)
|
|
131
|
+
return true if self.equal?(o)
|
|
132
|
+
self.class == o.class &&
|
|
133
|
+
message == o.message &&
|
|
134
|
+
agent == o.agent
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @see the `==` method
|
|
138
|
+
# @param [Object] Object to be compared
|
|
139
|
+
def eql?(o)
|
|
140
|
+
self == o
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Calculates hash code according to all attributes.
|
|
144
|
+
# @return [Integer] Hash code
|
|
145
|
+
def hash
|
|
146
|
+
[message, agent].hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def self.build_from_hash(attributes)
|
|
153
|
+
return nil unless attributes.is_a?(Hash)
|
|
154
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
155
|
+
transformed_hash = {}
|
|
156
|
+
openapi_types.each_pair do |key, type|
|
|
157
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
158
|
+
transformed_hash["#{key}"] = nil
|
|
159
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
160
|
+
# check to ensure the input is an array given that the attribute
|
|
161
|
+
# is documented as an array but the input is not
|
|
162
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
163
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
164
|
+
end
|
|
165
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
new(transformed_hash)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Returns the object in the form of hash
|
|
173
|
+
# @return [Hash] Returns the object in the form of hash
|
|
174
|
+
def to_hash
|
|
175
|
+
hash = {}
|
|
176
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
177
|
+
value = self.send(attr)
|
|
178
|
+
if value.nil?
|
|
179
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
180
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
hash[param] = _to_hash(value)
|
|
184
|
+
end
|
|
185
|
+
hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|