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.
- checksums.yaml +4 -4
- data/README.md +12 -5
- 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,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.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 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.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
|
+
# 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.8
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -36,8 +36,14 @@ 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
|
|
41
47
|
|
|
42
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
43
49
|
def self.attribute_map
|
|
@@ -49,7 +55,9 @@ module FetchHive::Generated
|
|
|
49
55
|
:'user' => :'user',
|
|
50
56
|
:'metadata' => :'metadata',
|
|
51
57
|
:'messages' => :'messages',
|
|
52
|
-
:'
|
|
58
|
+
:'attachments' => :'attachments',
|
|
59
|
+
:'known_artifact_refs' => :'known_artifact_refs',
|
|
60
|
+
:'artifact_refs' => :'artifact_refs'
|
|
53
61
|
}
|
|
54
62
|
end
|
|
55
63
|
|
|
@@ -73,7 +81,9 @@ module FetchHive::Generated
|
|
|
73
81
|
:'user' => :'String',
|
|
74
82
|
:'metadata' => :'Hash<String, MetadataValue>',
|
|
75
83
|
:'messages' => :'Array<AgentMessage>',
|
|
76
|
-
:'
|
|
84
|
+
:'attachments' => :'Array<AgentAttachment>',
|
|
85
|
+
:'known_artifact_refs' => :'Array<String>',
|
|
86
|
+
:'artifact_refs' => :'Array<String>'
|
|
77
87
|
}
|
|
78
88
|
end
|
|
79
89
|
|
|
@@ -139,9 +149,21 @@ module FetchHive::Generated
|
|
|
139
149
|
end
|
|
140
150
|
end
|
|
141
151
|
|
|
142
|
-
if attributes.key?(:'
|
|
143
|
-
if (value = attributes[:'
|
|
144
|
-
self.
|
|
152
|
+
if attributes.key?(:'attachments')
|
|
153
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
|
154
|
+
self.attachments = value
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if attributes.key?(:'known_artifact_refs')
|
|
159
|
+
if (value = attributes[:'known_artifact_refs']).is_a?(Array)
|
|
160
|
+
self.known_artifact_refs = value
|
|
161
|
+
end
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
if attributes.key?(:'artifact_refs')
|
|
165
|
+
if (value = attributes[:'artifact_refs']).is_a?(Array)
|
|
166
|
+
self.artifact_refs = value
|
|
145
167
|
end
|
|
146
168
|
end
|
|
147
169
|
end
|
|
@@ -159,6 +181,18 @@ module FetchHive::Generated
|
|
|
159
181
|
invalid_properties.push('invalid value for "agent", agent cannot be nil.')
|
|
160
182
|
end
|
|
161
183
|
|
|
184
|
+
if !@attachments.nil? && @attachments.length > 5
|
|
185
|
+
invalid_properties.push('invalid value for "attachments", number of items must be less than or equal to 5.')
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if !@known_artifact_refs.nil? && @known_artifact_refs.length > 50
|
|
189
|
+
invalid_properties.push('invalid value for "known_artifact_refs", number of items must be less than or equal to 50.')
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if !@artifact_refs.nil? && @artifact_refs.length > 5
|
|
193
|
+
invalid_properties.push('invalid value for "artifact_refs", number of items must be less than or equal to 5.')
|
|
194
|
+
end
|
|
195
|
+
|
|
162
196
|
invalid_properties
|
|
163
197
|
end
|
|
164
198
|
|
|
@@ -168,6 +202,9 @@ module FetchHive::Generated
|
|
|
168
202
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
169
203
|
return false if @message.nil?
|
|
170
204
|
return false if @agent.nil?
|
|
205
|
+
return false if !@attachments.nil? && @attachments.length > 5
|
|
206
|
+
return false if !@known_artifact_refs.nil? && @known_artifact_refs.length > 50
|
|
207
|
+
return false if !@artifact_refs.nil? && @artifact_refs.length > 5
|
|
171
208
|
true
|
|
172
209
|
end
|
|
173
210
|
|
|
@@ -191,6 +228,48 @@ module FetchHive::Generated
|
|
|
191
228
|
@agent = agent
|
|
192
229
|
end
|
|
193
230
|
|
|
231
|
+
# Custom attribute writer method with validation
|
|
232
|
+
# @param [Object] attachments Value to be assigned
|
|
233
|
+
def attachments=(attachments)
|
|
234
|
+
if attachments.nil?
|
|
235
|
+
fail ArgumentError, 'attachments cannot be nil'
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if attachments.length > 5
|
|
239
|
+
fail ArgumentError, 'invalid value for "attachments", number of items must be less than or equal to 5.'
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
@attachments = attachments
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Custom attribute writer method with validation
|
|
246
|
+
# @param [Object] known_artifact_refs Value to be assigned
|
|
247
|
+
def known_artifact_refs=(known_artifact_refs)
|
|
248
|
+
if known_artifact_refs.nil?
|
|
249
|
+
fail ArgumentError, 'known_artifact_refs cannot be nil'
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
if known_artifact_refs.length > 50
|
|
253
|
+
fail ArgumentError, 'invalid value for "known_artifact_refs", number of items must be less than or equal to 50.'
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
@known_artifact_refs = known_artifact_refs
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Custom attribute writer method with validation
|
|
260
|
+
# @param [Object] artifact_refs Value to be assigned
|
|
261
|
+
def artifact_refs=(artifact_refs)
|
|
262
|
+
if artifact_refs.nil?
|
|
263
|
+
fail ArgumentError, 'artifact_refs cannot be nil'
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
if artifact_refs.length > 5
|
|
267
|
+
fail ArgumentError, 'invalid value for "artifact_refs", number of items must be less than or equal to 5.'
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
@artifact_refs = artifact_refs
|
|
271
|
+
end
|
|
272
|
+
|
|
194
273
|
# Checks equality by comparing each attribute.
|
|
195
274
|
# @param [Object] Object to be compared
|
|
196
275
|
def ==(o)
|
|
@@ -203,7 +282,9 @@ module FetchHive::Generated
|
|
|
203
282
|
user == o.user &&
|
|
204
283
|
metadata == o.metadata &&
|
|
205
284
|
messages == o.messages &&
|
|
206
|
-
|
|
285
|
+
attachments == o.attachments &&
|
|
286
|
+
known_artifact_refs == o.known_artifact_refs &&
|
|
287
|
+
artifact_refs == o.artifact_refs
|
|
207
288
|
end
|
|
208
289
|
|
|
209
290
|
# @see the `==` method
|
|
@@ -215,7 +296,7 @@ module FetchHive::Generated
|
|
|
215
296
|
# Calculates hash code according to all attributes.
|
|
216
297
|
# @return [Integer] Hash code
|
|
217
298
|
def hash
|
|
218
|
-
[message, agent, thread_id, streaming, user, metadata, messages,
|
|
299
|
+
[message, agent, thread_id, streaming, user, metadata, messages, attachments, known_artifact_refs, artifact_refs].hash
|
|
219
300
|
end
|
|
220
301
|
|
|
221
302
|
# 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.8
|
|
7
7
|
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.22.0
|
|
@@ -33,6 +33,9 @@ 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
|
+
|
|
36
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
40
|
def self.attribute_map
|
|
38
41
|
{
|
|
@@ -41,7 +44,8 @@ module FetchHive::Generated
|
|
|
41
44
|
:'thread_id' => :'thread_id',
|
|
42
45
|
:'model' => :'model',
|
|
43
46
|
:'usage' => :'usage',
|
|
44
|
-
:'tool_calls' => :'tool_calls'
|
|
47
|
+
:'tool_calls' => :'tool_calls',
|
|
48
|
+
:'artifacts' => :'artifacts'
|
|
45
49
|
}
|
|
46
50
|
end
|
|
47
51
|
|
|
@@ -63,7 +67,8 @@ module FetchHive::Generated
|
|
|
63
67
|
:'thread_id' => :'String',
|
|
64
68
|
:'model' => :'String',
|
|
65
69
|
:'usage' => :'TokenUsage',
|
|
66
|
-
:'tool_calls' => :'Array<ToolInvocation>'
|
|
70
|
+
:'tool_calls' => :'Array<ToolInvocation>',
|
|
71
|
+
:'artifacts' => :'Array<GeneratedArtifact>'
|
|
67
72
|
}
|
|
68
73
|
end
|
|
69
74
|
|
|
@@ -114,6 +119,12 @@ module FetchHive::Generated
|
|
|
114
119
|
self.tool_calls = value
|
|
115
120
|
end
|
|
116
121
|
end
|
|
122
|
+
|
|
123
|
+
if attributes.key?(:'artifacts')
|
|
124
|
+
if (value = attributes[:'artifacts']).is_a?(Array)
|
|
125
|
+
self.artifacts = value
|
|
126
|
+
end
|
|
127
|
+
end
|
|
117
128
|
end
|
|
118
129
|
|
|
119
130
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -141,7 +152,8 @@ module FetchHive::Generated
|
|
|
141
152
|
thread_id == o.thread_id &&
|
|
142
153
|
model == o.model &&
|
|
143
154
|
usage == o.usage &&
|
|
144
|
-
tool_calls == o.tool_calls
|
|
155
|
+
tool_calls == o.tool_calls &&
|
|
156
|
+
artifacts == o.artifacts
|
|
145
157
|
end
|
|
146
158
|
|
|
147
159
|
# @see the `==` method
|
|
@@ -153,7 +165,7 @@ module FetchHive::Generated
|
|
|
153
165
|
# Calculates hash code according to all attributes.
|
|
154
166
|
# @return [Integer] Hash code
|
|
155
167
|
def hash
|
|
156
|
-
[request_id, response, thread_id, model, usage, tool_calls].hash
|
|
168
|
+
[request_id, response, thread_id, model, usage, tool_calls, artifacts].hash
|
|
157
169
|
end
|
|
158
170
|
|
|
159
171
|
# Builds the object from hash
|