fetch_hive 0.2.6 → 0.2.9
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 +154 -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 +548 -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_delegation.rb +383 -0
- data/lib/fetch_hive/generated/models/agent_invoke_async_config.rb +159 -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 +101 -11
- data/lib/fetch_hive/generated/models/invoke_agent_response.rb +30 -6
- data/lib/fetch_hive/generated/models/invoke_hive_agent_request.rb +293 -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/list_thread_agent_delegations200_response.rb +166 -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/pending_delegation.rb +234 -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 +87 -3
|
@@ -0,0 +1,192 @@
|
|
|
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.9
|
|
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 HiveAgentAsyncConfig < ApiModelBase
|
|
18
|
+
# Must be `true`. Hive Agent invocation is async-only.
|
|
19
|
+
attr_accessor :enabled
|
|
20
|
+
|
|
21
|
+
# HTTPS URL that receives the signed terminal callback.
|
|
22
|
+
attr_accessor :callback_url
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'enabled' => :'enabled',
|
|
28
|
+
:'callback_url' => :'callback_url'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'enabled' => :'Boolean',
|
|
46
|
+
:'callback_url' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FetchHive::Generated::HiveAgentAsyncConfig` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FetchHive::Generated::HiveAgentAsyncConfig`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'enabled')
|
|
73
|
+
self.enabled = attributes[:'enabled']
|
|
74
|
+
else
|
|
75
|
+
self.enabled = nil
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'callback_url')
|
|
79
|
+
self.callback_url = attributes[:'callback_url']
|
|
80
|
+
else
|
|
81
|
+
self.callback_url = nil
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
86
|
+
# @return Array for valid properties with the reasons
|
|
87
|
+
def list_invalid_properties
|
|
88
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @enabled.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "enabled", enabled cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if @callback_url.nil?
|
|
95
|
+
invalid_properties.push('invalid value for "callback_url", callback_url cannot be nil.')
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
invalid_properties
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Check to see if the all the properties in the model are valid
|
|
102
|
+
# @return true if the model is valid
|
|
103
|
+
def valid?
|
|
104
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
105
|
+
return false if @enabled.nil?
|
|
106
|
+
return false if @callback_url.nil?
|
|
107
|
+
true
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Custom attribute writer method with validation
|
|
111
|
+
# @param [Object] enabled Value to be assigned
|
|
112
|
+
def enabled=(enabled)
|
|
113
|
+
if enabled.nil?
|
|
114
|
+
fail ArgumentError, 'enabled cannot be nil'
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
@enabled = enabled
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Custom attribute writer method with validation
|
|
121
|
+
# @param [Object] callback_url Value to be assigned
|
|
122
|
+
def callback_url=(callback_url)
|
|
123
|
+
if callback_url.nil?
|
|
124
|
+
fail ArgumentError, 'callback_url cannot be nil'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
@callback_url = callback_url
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Checks equality by comparing each attribute.
|
|
131
|
+
# @param [Object] Object to be compared
|
|
132
|
+
def ==(o)
|
|
133
|
+
return true if self.equal?(o)
|
|
134
|
+
self.class == o.class &&
|
|
135
|
+
enabled == o.enabled &&
|
|
136
|
+
callback_url == o.callback_url
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# @see the `==` method
|
|
140
|
+
# @param [Object] Object to be compared
|
|
141
|
+
def eql?(o)
|
|
142
|
+
self == o
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Calculates hash code according to all attributes.
|
|
146
|
+
# @return [Integer] Hash code
|
|
147
|
+
def hash
|
|
148
|
+
[enabled, callback_url].hash
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Builds the object from hash
|
|
152
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
153
|
+
# @return [Object] Returns the model itself
|
|
154
|
+
def self.build_from_hash(attributes)
|
|
155
|
+
return nil unless attributes.is_a?(Hash)
|
|
156
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
157
|
+
transformed_hash = {}
|
|
158
|
+
openapi_types.each_pair do |key, type|
|
|
159
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
160
|
+
transformed_hash["#{key}"] = nil
|
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
162
|
+
# check to ensure the input is an array given that the attribute
|
|
163
|
+
# is documented as an array but the input is not
|
|
164
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
165
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
166
|
+
end
|
|
167
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
168
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
new(transformed_hash)
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Returns the object in the form of hash
|
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
|
176
|
+
def to_hash
|
|
177
|
+
hash = {}
|
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
179
|
+
value = self.send(attr)
|
|
180
|
+
if value.nil?
|
|
181
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
182
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
hash[param] = _to_hash(value)
|
|
186
|
+
end
|
|
187
|
+
hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
|
@@ -0,0 +1,187 @@
|
|
|
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.9
|
|
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
|
+
# Optional grounded context for the Hive Agent run.
|
|
18
|
+
class HiveAgentSources < ApiModelBase
|
|
19
|
+
# Public website URLs to include as sources.
|
|
20
|
+
attr_accessor :website_urls
|
|
21
|
+
|
|
22
|
+
# Workspace asset IDs to include as sources.
|
|
23
|
+
attr_accessor :asset_ids
|
|
24
|
+
|
|
25
|
+
# Knowledge base IDs to include as sources.
|
|
26
|
+
attr_accessor :knowledge_base_ids
|
|
27
|
+
|
|
28
|
+
# Knowledge base item IDs to include as sources.
|
|
29
|
+
attr_accessor :knowledge_base_item_ids
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'website_urls' => :'website_urls',
|
|
35
|
+
:'asset_ids' => :'asset_ids',
|
|
36
|
+
:'knowledge_base_ids' => :'knowledge_base_ids',
|
|
37
|
+
:'knowledge_base_item_ids' => :'knowledge_base_item_ids'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns attribute mapping this model knows about
|
|
42
|
+
def self.acceptable_attribute_map
|
|
43
|
+
attribute_map
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Returns all the JSON keys this model knows about
|
|
47
|
+
def self.acceptable_attributes
|
|
48
|
+
acceptable_attribute_map.values
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Attribute type mapping.
|
|
52
|
+
def self.openapi_types
|
|
53
|
+
{
|
|
54
|
+
:'website_urls' => :'Array<String>',
|
|
55
|
+
:'asset_ids' => :'Array<String>',
|
|
56
|
+
:'knowledge_base_ids' => :'Array<String>',
|
|
57
|
+
:'knowledge_base_item_ids' => :'Array<String>'
|
|
58
|
+
}
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# List of attributes with nullable: true
|
|
62
|
+
def self.openapi_nullable
|
|
63
|
+
Set.new([
|
|
64
|
+
])
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Initializes the object
|
|
68
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
69
|
+
def initialize(attributes = {})
|
|
70
|
+
if (!attributes.is_a?(Hash))
|
|
71
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `FetchHive::Generated::HiveAgentSources` initialize method"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
75
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
76
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
77
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
78
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `FetchHive::Generated::HiveAgentSources`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
79
|
+
end
|
|
80
|
+
h[k.to_sym] = v
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'website_urls')
|
|
84
|
+
if (value = attributes[:'website_urls']).is_a?(Array)
|
|
85
|
+
self.website_urls = value
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'asset_ids')
|
|
90
|
+
if (value = attributes[:'asset_ids']).is_a?(Array)
|
|
91
|
+
self.asset_ids = value
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'knowledge_base_ids')
|
|
96
|
+
if (value = attributes[:'knowledge_base_ids']).is_a?(Array)
|
|
97
|
+
self.knowledge_base_ids = value
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
if attributes.key?(:'knowledge_base_item_ids')
|
|
102
|
+
if (value = attributes[:'knowledge_base_item_ids']).is_a?(Array)
|
|
103
|
+
self.knowledge_base_item_ids = value
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
109
|
+
# @return Array for valid properties with the reasons
|
|
110
|
+
def list_invalid_properties
|
|
111
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
112
|
+
invalid_properties = Array.new
|
|
113
|
+
invalid_properties
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Check to see if the all the properties in the model are valid
|
|
117
|
+
# @return true if the model is valid
|
|
118
|
+
def valid?
|
|
119
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
120
|
+
true
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Checks equality by comparing each attribute.
|
|
124
|
+
# @param [Object] Object to be compared
|
|
125
|
+
def ==(o)
|
|
126
|
+
return true if self.equal?(o)
|
|
127
|
+
self.class == o.class &&
|
|
128
|
+
website_urls == o.website_urls &&
|
|
129
|
+
asset_ids == o.asset_ids &&
|
|
130
|
+
knowledge_base_ids == o.knowledge_base_ids &&
|
|
131
|
+
knowledge_base_item_ids == o.knowledge_base_item_ids
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# @see the `==` method
|
|
135
|
+
# @param [Object] Object to be compared
|
|
136
|
+
def eql?(o)
|
|
137
|
+
self == o
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Calculates hash code according to all attributes.
|
|
141
|
+
# @return [Integer] Hash code
|
|
142
|
+
def hash
|
|
143
|
+
[website_urls, asset_ids, knowledge_base_ids, knowledge_base_item_ids].hash
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Builds the object from hash
|
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
148
|
+
# @return [Object] Returns the model itself
|
|
149
|
+
def self.build_from_hash(attributes)
|
|
150
|
+
return nil unless attributes.is_a?(Hash)
|
|
151
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
152
|
+
transformed_hash = {}
|
|
153
|
+
openapi_types.each_pair do |key, type|
|
|
154
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
155
|
+
transformed_hash["#{key}"] = nil
|
|
156
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
157
|
+
# check to ensure the input is an array given that the attribute
|
|
158
|
+
# is documented as an array but the input is not
|
|
159
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
160
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
161
|
+
end
|
|
162
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
163
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
new(transformed_hash)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Returns the object in the form of hash
|
|
170
|
+
# @return [Hash] Returns the object in the form of hash
|
|
171
|
+
def to_hash
|
|
172
|
+
hash = {}
|
|
173
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
174
|
+
value = self.send(attr)
|
|
175
|
+
if value.nil?
|
|
176
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
177
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
hash[param] = _to_hash(value)
|
|
181
|
+
end
|
|
182
|
+
hash
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
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.9
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -36,8 +36,16 @@ module FetchHive::Generated
|
|
|
36
36
|
# Ephemeral conversation history supplied by the caller. Not stored in the database. Takes precedence over `thread_id` history when both are provided.
|
|
37
37
|
attr_accessor :messages
|
|
38
38
|
|
|
39
|
-
# HTTPS
|
|
40
|
-
attr_accessor :
|
|
39
|
+
# External HTTPS documents/images or uploaded Asset descriptors for the current turn. Combined with `artifact_refs`, at most five items are accepted. External audio URLs are unsupported.
|
|
40
|
+
attr_accessor :attachments
|
|
41
|
+
|
|
42
|
+
# Account/workspace-owned Asset UUIDs available for lightweight discovery in caller-managed sessions. Persistent threads derive this list from the saved chat.
|
|
43
|
+
attr_accessor :known_artifact_refs
|
|
44
|
+
|
|
45
|
+
# Artifact UUIDs explicitly selected for the current turn. In a caller-managed session every value must also appear in `known_artifact_refs`.
|
|
46
|
+
attr_accessor :artifact_refs
|
|
47
|
+
|
|
48
|
+
attr_accessor :async
|
|
41
49
|
|
|
42
50
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
51
|
def self.attribute_map
|
|
@@ -49,7 +57,10 @@ module FetchHive::Generated
|
|
|
49
57
|
:'user' => :'user',
|
|
50
58
|
:'metadata' => :'metadata',
|
|
51
59
|
:'messages' => :'messages',
|
|
52
|
-
:'
|
|
60
|
+
:'attachments' => :'attachments',
|
|
61
|
+
:'known_artifact_refs' => :'known_artifact_refs',
|
|
62
|
+
:'artifact_refs' => :'artifact_refs',
|
|
63
|
+
:'async' => :'async'
|
|
53
64
|
}
|
|
54
65
|
end
|
|
55
66
|
|
|
@@ -73,7 +84,10 @@ module FetchHive::Generated
|
|
|
73
84
|
:'user' => :'String',
|
|
74
85
|
:'metadata' => :'Hash<String, MetadataValue>',
|
|
75
86
|
:'messages' => :'Array<AgentMessage>',
|
|
76
|
-
:'
|
|
87
|
+
:'attachments' => :'Array<AgentAttachment>',
|
|
88
|
+
:'known_artifact_refs' => :'Array<String>',
|
|
89
|
+
:'artifact_refs' => :'Array<String>',
|
|
90
|
+
:'async' => :'AgentInvokeAsyncConfig'
|
|
77
91
|
}
|
|
78
92
|
end
|
|
79
93
|
|
|
@@ -139,11 +153,27 @@ module FetchHive::Generated
|
|
|
139
153
|
end
|
|
140
154
|
end
|
|
141
155
|
|
|
142
|
-
if attributes.key?(:'
|
|
143
|
-
if (value = attributes[:'
|
|
144
|
-
self.
|
|
156
|
+
if attributes.key?(:'attachments')
|
|
157
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
|
158
|
+
self.attachments = value
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'known_artifact_refs')
|
|
163
|
+
if (value = attributes[:'known_artifact_refs']).is_a?(Array)
|
|
164
|
+
self.known_artifact_refs = value
|
|
145
165
|
end
|
|
146
166
|
end
|
|
167
|
+
|
|
168
|
+
if attributes.key?(:'artifact_refs')
|
|
169
|
+
if (value = attributes[:'artifact_refs']).is_a?(Array)
|
|
170
|
+
self.artifact_refs = value
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.key?(:'async')
|
|
175
|
+
self.async = attributes[:'async']
|
|
176
|
+
end
|
|
147
177
|
end
|
|
148
178
|
|
|
149
179
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -159,6 +189,18 @@ module FetchHive::Generated
|
|
|
159
189
|
invalid_properties.push('invalid value for "agent", agent cannot be nil.')
|
|
160
190
|
end
|
|
161
191
|
|
|
192
|
+
if !@attachments.nil? && @attachments.length > 5
|
|
193
|
+
invalid_properties.push('invalid value for "attachments", number of items must be less than or equal to 5.')
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
if !@known_artifact_refs.nil? && @known_artifact_refs.length > 50
|
|
197
|
+
invalid_properties.push('invalid value for "known_artifact_refs", number of items must be less than or equal to 50.')
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
if !@artifact_refs.nil? && @artifact_refs.length > 5
|
|
201
|
+
invalid_properties.push('invalid value for "artifact_refs", number of items must be less than or equal to 5.')
|
|
202
|
+
end
|
|
203
|
+
|
|
162
204
|
invalid_properties
|
|
163
205
|
end
|
|
164
206
|
|
|
@@ -168,6 +210,9 @@ module FetchHive::Generated
|
|
|
168
210
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
169
211
|
return false if @message.nil?
|
|
170
212
|
return false if @agent.nil?
|
|
213
|
+
return false if !@attachments.nil? && @attachments.length > 5
|
|
214
|
+
return false if !@known_artifact_refs.nil? && @known_artifact_refs.length > 50
|
|
215
|
+
return false if !@artifact_refs.nil? && @artifact_refs.length > 5
|
|
171
216
|
true
|
|
172
217
|
end
|
|
173
218
|
|
|
@@ -191,6 +236,48 @@ module FetchHive::Generated
|
|
|
191
236
|
@agent = agent
|
|
192
237
|
end
|
|
193
238
|
|
|
239
|
+
# Custom attribute writer method with validation
|
|
240
|
+
# @param [Object] attachments Value to be assigned
|
|
241
|
+
def attachments=(attachments)
|
|
242
|
+
if attachments.nil?
|
|
243
|
+
fail ArgumentError, 'attachments cannot be nil'
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
if attachments.length > 5
|
|
247
|
+
fail ArgumentError, 'invalid value for "attachments", number of items must be less than or equal to 5.'
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
@attachments = attachments
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Custom attribute writer method with validation
|
|
254
|
+
# @param [Object] known_artifact_refs Value to be assigned
|
|
255
|
+
def known_artifact_refs=(known_artifact_refs)
|
|
256
|
+
if known_artifact_refs.nil?
|
|
257
|
+
fail ArgumentError, 'known_artifact_refs cannot be nil'
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
if known_artifact_refs.length > 50
|
|
261
|
+
fail ArgumentError, 'invalid value for "known_artifact_refs", number of items must be less than or equal to 50.'
|
|
262
|
+
end
|
|
263
|
+
|
|
264
|
+
@known_artifact_refs = known_artifact_refs
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Custom attribute writer method with validation
|
|
268
|
+
# @param [Object] artifact_refs Value to be assigned
|
|
269
|
+
def artifact_refs=(artifact_refs)
|
|
270
|
+
if artifact_refs.nil?
|
|
271
|
+
fail ArgumentError, 'artifact_refs cannot be nil'
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
if artifact_refs.length > 5
|
|
275
|
+
fail ArgumentError, 'invalid value for "artifact_refs", number of items must be less than or equal to 5.'
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
@artifact_refs = artifact_refs
|
|
279
|
+
end
|
|
280
|
+
|
|
194
281
|
# Checks equality by comparing each attribute.
|
|
195
282
|
# @param [Object] Object to be compared
|
|
196
283
|
def ==(o)
|
|
@@ -203,7 +290,10 @@ module FetchHive::Generated
|
|
|
203
290
|
user == o.user &&
|
|
204
291
|
metadata == o.metadata &&
|
|
205
292
|
messages == o.messages &&
|
|
206
|
-
|
|
293
|
+
attachments == o.attachments &&
|
|
294
|
+
known_artifact_refs == o.known_artifact_refs &&
|
|
295
|
+
artifact_refs == o.artifact_refs &&
|
|
296
|
+
async == o.async
|
|
207
297
|
end
|
|
208
298
|
|
|
209
299
|
# @see the `==` method
|
|
@@ -215,7 +305,7 @@ module FetchHive::Generated
|
|
|
215
305
|
# Calculates hash code according to all attributes.
|
|
216
306
|
# @return [Integer] Hash code
|
|
217
307
|
def hash
|
|
218
|
-
[message, agent, thread_id, streaming, user, metadata, messages,
|
|
308
|
+
[message, agent, thread_id, streaming, user, metadata, messages, attachments, known_artifact_refs, artifact_refs, async].hash
|
|
219
309
|
end
|
|
220
310
|
|
|
221
311
|
# 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
|
|
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.9
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -33,6 +33,12 @@ module FetchHive::Generated
|
|
|
33
33
|
# Tool invocations made during this run (if any).
|
|
34
34
|
attr_accessor :tool_calls
|
|
35
35
|
|
|
36
|
+
# Generated documents and images produced by completed artifact tools.
|
|
37
|
+
attr_accessor :artifacts
|
|
38
|
+
|
|
39
|
+
# Background workflows started during this turn. Present only when the turn ended with one or more pending delegations.
|
|
40
|
+
attr_accessor :pending_delegations
|
|
41
|
+
|
|
36
42
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
43
|
def self.attribute_map
|
|
38
44
|
{
|
|
@@ -41,7 +47,9 @@ module FetchHive::Generated
|
|
|
41
47
|
:'thread_id' => :'thread_id',
|
|
42
48
|
:'model' => :'model',
|
|
43
49
|
:'usage' => :'usage',
|
|
44
|
-
:'tool_calls' => :'tool_calls'
|
|
50
|
+
:'tool_calls' => :'tool_calls',
|
|
51
|
+
:'artifacts' => :'artifacts',
|
|
52
|
+
:'pending_delegations' => :'pending_delegations'
|
|
45
53
|
}
|
|
46
54
|
end
|
|
47
55
|
|
|
@@ -63,7 +71,9 @@ module FetchHive::Generated
|
|
|
63
71
|
:'thread_id' => :'String',
|
|
64
72
|
:'model' => :'String',
|
|
65
73
|
:'usage' => :'TokenUsage',
|
|
66
|
-
:'tool_calls' => :'Array<ToolInvocation>'
|
|
74
|
+
:'tool_calls' => :'Array<ToolInvocation>',
|
|
75
|
+
:'artifacts' => :'Array<GeneratedArtifact>',
|
|
76
|
+
:'pending_delegations' => :'Array<PendingDelegation>'
|
|
67
77
|
}
|
|
68
78
|
end
|
|
69
79
|
|
|
@@ -114,6 +124,18 @@ module FetchHive::Generated
|
|
|
114
124
|
self.tool_calls = value
|
|
115
125
|
end
|
|
116
126
|
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'artifacts')
|
|
129
|
+
if (value = attributes[:'artifacts']).is_a?(Array)
|
|
130
|
+
self.artifacts = value
|
|
131
|
+
end
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'pending_delegations')
|
|
135
|
+
if (value = attributes[:'pending_delegations']).is_a?(Array)
|
|
136
|
+
self.pending_delegations = value
|
|
137
|
+
end
|
|
138
|
+
end
|
|
117
139
|
end
|
|
118
140
|
|
|
119
141
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -141,7 +163,9 @@ module FetchHive::Generated
|
|
|
141
163
|
thread_id == o.thread_id &&
|
|
142
164
|
model == o.model &&
|
|
143
165
|
usage == o.usage &&
|
|
144
|
-
tool_calls == o.tool_calls
|
|
166
|
+
tool_calls == o.tool_calls &&
|
|
167
|
+
artifacts == o.artifacts &&
|
|
168
|
+
pending_delegations == o.pending_delegations
|
|
145
169
|
end
|
|
146
170
|
|
|
147
171
|
# @see the `==` method
|
|
@@ -153,7 +177,7 @@ module FetchHive::Generated
|
|
|
153
177
|
# Calculates hash code according to all attributes.
|
|
154
178
|
# @return [Integer] Hash code
|
|
155
179
|
def hash
|
|
156
|
-
[request_id, response, thread_id, model, usage, tool_calls].hash
|
|
180
|
+
[request_id, response, thread_id, model, usage, tool_calls, artifacts, pending_delegations].hash
|
|
157
181
|
end
|
|
158
182
|
|
|
159
183
|
# Builds the object from hash
|