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
|
@@ -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
|
|
@@ -19,8 +19,335 @@ module FetchHive::Generated
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Cancel an agent delegation
|
|
23
|
+
# Cancels a pending or running background workflow that an agent started. Already finished delegations are returned unchanged.
|
|
24
|
+
# @param id [String]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [AgentDelegation]
|
|
27
|
+
def cancel_agent_delegation(id, opts = {})
|
|
28
|
+
data, _status_code, _headers = cancel_agent_delegation_with_http_info(id, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Cancel an agent delegation
|
|
33
|
+
# Cancels a pending or running background workflow that an agent started. Already finished delegations are returned unchanged.
|
|
34
|
+
# @param id [String]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(AgentDelegation, Integer, Hash)>] AgentDelegation data, response status code and response headers
|
|
37
|
+
def cancel_agent_delegation_with_http_info(id, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.cancel_agent_delegation ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.cancel_agent_delegation"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/agent/delegations/{id}/cancel'.sub('{id}', CGI.escape(id.to_s))
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
|
|
56
|
+
# form parameters
|
|
57
|
+
form_params = opts[:form_params] || {}
|
|
58
|
+
|
|
59
|
+
# http body (model)
|
|
60
|
+
post_body = opts[:debug_body]
|
|
61
|
+
|
|
62
|
+
# return_type
|
|
63
|
+
return_type = opts[:debug_return_type] || 'AgentDelegation'
|
|
64
|
+
|
|
65
|
+
# auth_names
|
|
66
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
67
|
+
|
|
68
|
+
new_options = opts.merge(
|
|
69
|
+
:operation => :"AgentsApi.cancel_agent_delegation",
|
|
70
|
+
:header_params => header_params,
|
|
71
|
+
:query_params => query_params,
|
|
72
|
+
:form_params => form_params,
|
|
73
|
+
:body => post_body,
|
|
74
|
+
:auth_names => auth_names,
|
|
75
|
+
:return_type => return_type
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
79
|
+
if @api_client.config.debugging
|
|
80
|
+
@api_client.config.logger.debug "API called: AgentsApi#cancel_agent_delegation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
81
|
+
end
|
|
82
|
+
return data, status_code, headers
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Delete an agent
|
|
86
|
+
# Destroys the agent record.
|
|
87
|
+
# @param workspace_id [String] Workspace UUID
|
|
88
|
+
# @param id [String] Agent UUID
|
|
89
|
+
# @param [Hash] opts the optional parameters
|
|
90
|
+
# @return [DeletePublicWorkspacesAgents200Response]
|
|
91
|
+
def delete_public_workspaces_agents(workspace_id, id, opts = {})
|
|
92
|
+
data, _status_code, _headers = delete_public_workspaces_agents_with_http_info(workspace_id, id, opts)
|
|
93
|
+
data
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Delete an agent
|
|
97
|
+
# Destroys the agent record.
|
|
98
|
+
# @param workspace_id [String] Workspace UUID
|
|
99
|
+
# @param id [String] Agent UUID
|
|
100
|
+
# @param [Hash] opts the optional parameters
|
|
101
|
+
# @return [Array<(DeletePublicWorkspacesAgents200Response, Integer, Hash)>] DeletePublicWorkspacesAgents200Response data, response status code and response headers
|
|
102
|
+
def delete_public_workspaces_agents_with_http_info(workspace_id, id, opts = {})
|
|
103
|
+
if @api_client.config.debugging
|
|
104
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.delete_public_workspaces_agents ...'
|
|
105
|
+
end
|
|
106
|
+
# verify the required parameter 'workspace_id' is set
|
|
107
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
108
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.delete_public_workspaces_agents"
|
|
109
|
+
end
|
|
110
|
+
# verify the required parameter 'id' is set
|
|
111
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
112
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.delete_public_workspaces_agents"
|
|
113
|
+
end
|
|
114
|
+
# resource path
|
|
115
|
+
local_var_path = '/public/workspaces/{workspace_id}/agents/{id}'.sub('{workspace_id}', CGI.escape(workspace_id.to_s)).sub('{id}', CGI.escape(id.to_s))
|
|
116
|
+
|
|
117
|
+
# query parameters
|
|
118
|
+
query_params = opts[:query_params] || {}
|
|
119
|
+
|
|
120
|
+
# header parameters
|
|
121
|
+
header_params = opts[:header_params] || {}
|
|
122
|
+
# HTTP header 'Accept' (if needed)
|
|
123
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
124
|
+
|
|
125
|
+
# form parameters
|
|
126
|
+
form_params = opts[:form_params] || {}
|
|
127
|
+
|
|
128
|
+
# http body (model)
|
|
129
|
+
post_body = opts[:debug_body]
|
|
130
|
+
|
|
131
|
+
# return_type
|
|
132
|
+
return_type = opts[:debug_return_type] || 'DeletePublicWorkspacesAgents200Response'
|
|
133
|
+
|
|
134
|
+
# auth_names
|
|
135
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
136
|
+
|
|
137
|
+
new_options = opts.merge(
|
|
138
|
+
:operation => :"AgentsApi.delete_public_workspaces_agents",
|
|
139
|
+
:header_params => header_params,
|
|
140
|
+
:query_params => query_params,
|
|
141
|
+
:form_params => form_params,
|
|
142
|
+
:body => post_body,
|
|
143
|
+
:auth_names => auth_names,
|
|
144
|
+
:return_type => return_type
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
148
|
+
if @api_client.config.debugging
|
|
149
|
+
@api_client.config.logger.debug "API called: AgentsApi#delete_public_workspaces_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
150
|
+
end
|
|
151
|
+
return data, status_code, headers
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Get an agent delegation
|
|
155
|
+
# Returns the status and result of a background workflow started by an agent. Use this when you invoked an agent without a `thread_id` and without `async.callback_url`.
|
|
156
|
+
# @param id [String]
|
|
157
|
+
# @param [Hash] opts the optional parameters
|
|
158
|
+
# @return [AgentDelegation]
|
|
159
|
+
def get_agent_delegation(id, opts = {})
|
|
160
|
+
data, _status_code, _headers = get_agent_delegation_with_http_info(id, opts)
|
|
161
|
+
data
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Get an agent delegation
|
|
165
|
+
# Returns the status and result of a background workflow started by an agent. Use this when you invoked an agent without a `thread_id` and without `async.callback_url`.
|
|
166
|
+
# @param id [String]
|
|
167
|
+
# @param [Hash] opts the optional parameters
|
|
168
|
+
# @return [Array<(AgentDelegation, Integer, Hash)>] AgentDelegation data, response status code and response headers
|
|
169
|
+
def get_agent_delegation_with_http_info(id, opts = {})
|
|
170
|
+
if @api_client.config.debugging
|
|
171
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.get_agent_delegation ...'
|
|
172
|
+
end
|
|
173
|
+
# verify the required parameter 'id' is set
|
|
174
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
175
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.get_agent_delegation"
|
|
176
|
+
end
|
|
177
|
+
# resource path
|
|
178
|
+
local_var_path = '/agent/delegations/{id}'.sub('{id}', CGI.escape(id.to_s))
|
|
179
|
+
|
|
180
|
+
# query parameters
|
|
181
|
+
query_params = opts[:query_params] || {}
|
|
182
|
+
|
|
183
|
+
# header parameters
|
|
184
|
+
header_params = opts[:header_params] || {}
|
|
185
|
+
# HTTP header 'Accept' (if needed)
|
|
186
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
187
|
+
|
|
188
|
+
# form parameters
|
|
189
|
+
form_params = opts[:form_params] || {}
|
|
190
|
+
|
|
191
|
+
# http body (model)
|
|
192
|
+
post_body = opts[:debug_body]
|
|
193
|
+
|
|
194
|
+
# return_type
|
|
195
|
+
return_type = opts[:debug_return_type] || 'AgentDelegation'
|
|
196
|
+
|
|
197
|
+
# auth_names
|
|
198
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
199
|
+
|
|
200
|
+
new_options = opts.merge(
|
|
201
|
+
:operation => :"AgentsApi.get_agent_delegation",
|
|
202
|
+
:header_params => header_params,
|
|
203
|
+
:query_params => query_params,
|
|
204
|
+
:form_params => form_params,
|
|
205
|
+
:body => post_body,
|
|
206
|
+
:auth_names => auth_names,
|
|
207
|
+
:return_type => return_type
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
211
|
+
if @api_client.config.debugging
|
|
212
|
+
@api_client.config.logger.debug "API called: AgentsApi#get_agent_delegation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
213
|
+
end
|
|
214
|
+
return data, status_code, headers
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Get an agent
|
|
218
|
+
# Returns a single active agent belonging to the requested workspace.
|
|
219
|
+
# @param workspace_id [String] Workspace UUID
|
|
220
|
+
# @param id [String] Agent UUID
|
|
221
|
+
# @param [Hash] opts the optional parameters
|
|
222
|
+
# @return [GetPublicWorkspacesAgents200Response]
|
|
223
|
+
def get_public_workspaces_agents(workspace_id, id, opts = {})
|
|
224
|
+
data, _status_code, _headers = get_public_workspaces_agents_with_http_info(workspace_id, id, opts)
|
|
225
|
+
data
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Get an agent
|
|
229
|
+
# Returns a single active agent belonging to the requested workspace.
|
|
230
|
+
# @param workspace_id [String] Workspace UUID
|
|
231
|
+
# @param id [String] Agent UUID
|
|
232
|
+
# @param [Hash] opts the optional parameters
|
|
233
|
+
# @return [Array<(GetPublicWorkspacesAgents200Response, Integer, Hash)>] GetPublicWorkspacesAgents200Response data, response status code and response headers
|
|
234
|
+
def get_public_workspaces_agents_with_http_info(workspace_id, id, opts = {})
|
|
235
|
+
if @api_client.config.debugging
|
|
236
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.get_public_workspaces_agents ...'
|
|
237
|
+
end
|
|
238
|
+
# verify the required parameter 'workspace_id' is set
|
|
239
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
240
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.get_public_workspaces_agents"
|
|
241
|
+
end
|
|
242
|
+
# verify the required parameter 'id' is set
|
|
243
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
244
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.get_public_workspaces_agents"
|
|
245
|
+
end
|
|
246
|
+
# resource path
|
|
247
|
+
local_var_path = '/public/workspaces/{workspace_id}/agents/{id}'.sub('{workspace_id}', CGI.escape(workspace_id.to_s)).sub('{id}', CGI.escape(id.to_s))
|
|
248
|
+
|
|
249
|
+
# query parameters
|
|
250
|
+
query_params = opts[:query_params] || {}
|
|
251
|
+
|
|
252
|
+
# header parameters
|
|
253
|
+
header_params = opts[:header_params] || {}
|
|
254
|
+
# HTTP header 'Accept' (if needed)
|
|
255
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
256
|
+
|
|
257
|
+
# form parameters
|
|
258
|
+
form_params = opts[:form_params] || {}
|
|
259
|
+
|
|
260
|
+
# http body (model)
|
|
261
|
+
post_body = opts[:debug_body]
|
|
262
|
+
|
|
263
|
+
# return_type
|
|
264
|
+
return_type = opts[:debug_return_type] || 'GetPublicWorkspacesAgents200Response'
|
|
265
|
+
|
|
266
|
+
# auth_names
|
|
267
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
268
|
+
|
|
269
|
+
new_options = opts.merge(
|
|
270
|
+
:operation => :"AgentsApi.get_public_workspaces_agents",
|
|
271
|
+
:header_params => header_params,
|
|
272
|
+
:query_params => query_params,
|
|
273
|
+
:form_params => form_params,
|
|
274
|
+
:body => post_body,
|
|
275
|
+
:auth_names => auth_names,
|
|
276
|
+
:return_type => return_type
|
|
277
|
+
)
|
|
278
|
+
|
|
279
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
280
|
+
if @api_client.config.debugging
|
|
281
|
+
@api_client.config.logger.debug "API called: AgentsApi#get_public_workspaces_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
282
|
+
end
|
|
283
|
+
return data, status_code, headers
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# List public workspace agents
|
|
287
|
+
# Returns standalone agents scoped to the requested public API workspace.
|
|
288
|
+
# @param workspace_id [String] Workspace UUID
|
|
289
|
+
# @param [Hash] opts the optional parameters
|
|
290
|
+
# @return [GetPublicWorkspacesAgents2200Response]
|
|
291
|
+
def get_public_workspaces_agents2(workspace_id, opts = {})
|
|
292
|
+
data, _status_code, _headers = get_public_workspaces_agents2_with_http_info(workspace_id, opts)
|
|
293
|
+
data
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# List public workspace agents
|
|
297
|
+
# Returns standalone agents scoped to the requested public API workspace.
|
|
298
|
+
# @param workspace_id [String] Workspace UUID
|
|
299
|
+
# @param [Hash] opts the optional parameters
|
|
300
|
+
# @return [Array<(GetPublicWorkspacesAgents2200Response, Integer, Hash)>] GetPublicWorkspacesAgents2200Response data, response status code and response headers
|
|
301
|
+
def get_public_workspaces_agents2_with_http_info(workspace_id, opts = {})
|
|
302
|
+
if @api_client.config.debugging
|
|
303
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.get_public_workspaces_agents2 ...'
|
|
304
|
+
end
|
|
305
|
+
# verify the required parameter 'workspace_id' is set
|
|
306
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
307
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.get_public_workspaces_agents2"
|
|
308
|
+
end
|
|
309
|
+
# resource path
|
|
310
|
+
local_var_path = '/public/workspaces/{workspace_id}/agents'.sub('{workspace_id}', CGI.escape(workspace_id.to_s))
|
|
311
|
+
|
|
312
|
+
# query parameters
|
|
313
|
+
query_params = opts[:query_params] || {}
|
|
314
|
+
|
|
315
|
+
# header parameters
|
|
316
|
+
header_params = opts[:header_params] || {}
|
|
317
|
+
# HTTP header 'Accept' (if needed)
|
|
318
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
319
|
+
|
|
320
|
+
# form parameters
|
|
321
|
+
form_params = opts[:form_params] || {}
|
|
322
|
+
|
|
323
|
+
# http body (model)
|
|
324
|
+
post_body = opts[:debug_body]
|
|
325
|
+
|
|
326
|
+
# return_type
|
|
327
|
+
return_type = opts[:debug_return_type] || 'GetPublicWorkspacesAgents2200Response'
|
|
328
|
+
|
|
329
|
+
# auth_names
|
|
330
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
331
|
+
|
|
332
|
+
new_options = opts.merge(
|
|
333
|
+
:operation => :"AgentsApi.get_public_workspaces_agents2",
|
|
334
|
+
:header_params => header_params,
|
|
335
|
+
:query_params => query_params,
|
|
336
|
+
:form_params => form_params,
|
|
337
|
+
:body => post_body,
|
|
338
|
+
:auth_names => auth_names,
|
|
339
|
+
:return_type => return_type
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
343
|
+
if @api_client.config.debugging
|
|
344
|
+
@api_client.config.logger.debug "API called: AgentsApi#get_public_workspaces_agents2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
345
|
+
end
|
|
346
|
+
return data, status_code, headers
|
|
347
|
+
end
|
|
348
|
+
|
|
22
349
|
# Invoke an agent
|
|
23
|
-
# Sends a message to a configured agent and returns its response. Agents can use tools, maintain conversation history via `thread_id`, or accept ephemeral history via the `messages` field. Set `streaming: true` to receive a Server-Sent Events stream. Each `data:` line contains a JSON object of type `SseChunk`.
|
|
350
|
+
# Sends a message to a configured agent and returns its response. Agents can use tools, maintain conversation history via `thread_id`, or accept ephemeral history via the `messages` field. Set `streaming: true` to receive a Server-Sent Events stream. Each `data:` line contains a JSON object of type `SseChunk`. Documents and image URLs can be supplied in `attachments`. Existing account Assets can be discovered through `known_artifact_refs` and explicitly selected through `artifact_refs`.
|
|
24
351
|
# @param invoke_agent_request [InvokeAgentRequest]
|
|
25
352
|
# @param [Hash] opts the optional parameters
|
|
26
353
|
# @return [InvokeAgentResponse]
|
|
@@ -30,7 +357,7 @@ module FetchHive::Generated
|
|
|
30
357
|
end
|
|
31
358
|
|
|
32
359
|
# Invoke an agent
|
|
33
|
-
# Sends a message to a configured agent and returns its response. Agents can use tools, maintain conversation history via `thread_id`, or accept ephemeral history via the `messages` field. Set `streaming: true` to receive a Server-Sent Events stream. Each `data:` line contains a JSON object of type `SseChunk`.
|
|
360
|
+
# Sends a message to a configured agent and returns its response. Agents can use tools, maintain conversation history via `thread_id`, or accept ephemeral history via the `messages` field. Set `streaming: true` to receive a Server-Sent Events stream. Each `data:` line contains a JSON object of type `SseChunk`. Documents and image URLs can be supplied in `attachments`. Existing account Assets can be discovered through `known_artifact_refs` and explicitly selected through `artifact_refs`.
|
|
34
361
|
# @param invoke_agent_request [InvokeAgentRequest]
|
|
35
362
|
# @param [Hash] opts the optional parameters
|
|
36
363
|
# @return [Array<(InvokeAgentResponse, Integer, Hash)>] InvokeAgentResponse data, response status code and response headers
|
|
@@ -86,5 +413,222 @@ module FetchHive::Generated
|
|
|
86
413
|
end
|
|
87
414
|
return data, status_code, headers
|
|
88
415
|
end
|
|
416
|
+
|
|
417
|
+
# List pending agent delegations for a thread
|
|
418
|
+
# Lists pending and running background workflows for a conversation thread. Pass the same `thread_id` you send to `POST /agent/invoke`.
|
|
419
|
+
# @param thread_id [String]
|
|
420
|
+
# @param [Hash] opts the optional parameters
|
|
421
|
+
# @return [ListThreadAgentDelegations200Response]
|
|
422
|
+
def list_thread_agent_delegations(thread_id, opts = {})
|
|
423
|
+
data, _status_code, _headers = list_thread_agent_delegations_with_http_info(thread_id, opts)
|
|
424
|
+
data
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
# List pending agent delegations for a thread
|
|
428
|
+
# Lists pending and running background workflows for a conversation thread. Pass the same `thread_id` you send to `POST /agent/invoke`.
|
|
429
|
+
# @param thread_id [String]
|
|
430
|
+
# @param [Hash] opts the optional parameters
|
|
431
|
+
# @return [Array<(ListThreadAgentDelegations200Response, Integer, Hash)>] ListThreadAgentDelegations200Response data, response status code and response headers
|
|
432
|
+
def list_thread_agent_delegations_with_http_info(thread_id, opts = {})
|
|
433
|
+
if @api_client.config.debugging
|
|
434
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.list_thread_agent_delegations ...'
|
|
435
|
+
end
|
|
436
|
+
# verify the required parameter 'thread_id' is set
|
|
437
|
+
if @api_client.config.client_side_validation && thread_id.nil?
|
|
438
|
+
fail ArgumentError, "Missing the required parameter 'thread_id' when calling AgentsApi.list_thread_agent_delegations"
|
|
439
|
+
end
|
|
440
|
+
# resource path
|
|
441
|
+
local_var_path = '/agent/threads/{thread_id}/delegations'.sub('{thread_id}', CGI.escape(thread_id.to_s))
|
|
442
|
+
|
|
443
|
+
# query parameters
|
|
444
|
+
query_params = opts[:query_params] || {}
|
|
445
|
+
|
|
446
|
+
# header parameters
|
|
447
|
+
header_params = opts[:header_params] || {}
|
|
448
|
+
# HTTP header 'Accept' (if needed)
|
|
449
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
450
|
+
|
|
451
|
+
# form parameters
|
|
452
|
+
form_params = opts[:form_params] || {}
|
|
453
|
+
|
|
454
|
+
# http body (model)
|
|
455
|
+
post_body = opts[:debug_body]
|
|
456
|
+
|
|
457
|
+
# return_type
|
|
458
|
+
return_type = opts[:debug_return_type] || 'ListThreadAgentDelegations200Response'
|
|
459
|
+
|
|
460
|
+
# auth_names
|
|
461
|
+
auth_names = opts[:debug_auth_names] || ['BearerAuth']
|
|
462
|
+
|
|
463
|
+
new_options = opts.merge(
|
|
464
|
+
:operation => :"AgentsApi.list_thread_agent_delegations",
|
|
465
|
+
:header_params => header_params,
|
|
466
|
+
:query_params => query_params,
|
|
467
|
+
:form_params => form_params,
|
|
468
|
+
:body => post_body,
|
|
469
|
+
:auth_names => auth_names,
|
|
470
|
+
:return_type => return_type
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
474
|
+
if @api_client.config.debugging
|
|
475
|
+
@api_client.config.logger.debug "API called: AgentsApi#list_thread_agent_delegations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
476
|
+
end
|
|
477
|
+
return data, status_code, headers
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
# Update an agent
|
|
481
|
+
# Updates an existing agent in the requested workspace.
|
|
482
|
+
# @param workspace_id [String] Workspace UUID
|
|
483
|
+
# @param id [String] Agent UUID
|
|
484
|
+
# @param patch_public_workspaces_agents_request [PatchPublicWorkspacesAgentsRequest]
|
|
485
|
+
# @param [Hash] opts the optional parameters
|
|
486
|
+
# @return [PatchPublicWorkspacesAgents200Response]
|
|
487
|
+
def patch_public_workspaces_agents(workspace_id, id, patch_public_workspaces_agents_request, opts = {})
|
|
488
|
+
data, _status_code, _headers = patch_public_workspaces_agents_with_http_info(workspace_id, id, patch_public_workspaces_agents_request, opts)
|
|
489
|
+
data
|
|
490
|
+
end
|
|
491
|
+
|
|
492
|
+
# Update an agent
|
|
493
|
+
# Updates an existing agent in the requested workspace.
|
|
494
|
+
# @param workspace_id [String] Workspace UUID
|
|
495
|
+
# @param id [String] Agent UUID
|
|
496
|
+
# @param patch_public_workspaces_agents_request [PatchPublicWorkspacesAgentsRequest]
|
|
497
|
+
# @param [Hash] opts the optional parameters
|
|
498
|
+
# @return [Array<(PatchPublicWorkspacesAgents200Response, Integer, Hash)>] PatchPublicWorkspacesAgents200Response data, response status code and response headers
|
|
499
|
+
def patch_public_workspaces_agents_with_http_info(workspace_id, id, patch_public_workspaces_agents_request, opts = {})
|
|
500
|
+
if @api_client.config.debugging
|
|
501
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.patch_public_workspaces_agents ...'
|
|
502
|
+
end
|
|
503
|
+
# verify the required parameter 'workspace_id' is set
|
|
504
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
505
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.patch_public_workspaces_agents"
|
|
506
|
+
end
|
|
507
|
+
# verify the required parameter 'id' is set
|
|
508
|
+
if @api_client.config.client_side_validation && id.nil?
|
|
509
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.patch_public_workspaces_agents"
|
|
510
|
+
end
|
|
511
|
+
# verify the required parameter 'patch_public_workspaces_agents_request' is set
|
|
512
|
+
if @api_client.config.client_side_validation && patch_public_workspaces_agents_request.nil?
|
|
513
|
+
fail ArgumentError, "Missing the required parameter 'patch_public_workspaces_agents_request' when calling AgentsApi.patch_public_workspaces_agents"
|
|
514
|
+
end
|
|
515
|
+
# resource path
|
|
516
|
+
local_var_path = '/public/workspaces/{workspace_id}/agents/{id}'.sub('{workspace_id}', CGI.escape(workspace_id.to_s)).sub('{id}', CGI.escape(id.to_s))
|
|
517
|
+
|
|
518
|
+
# query parameters
|
|
519
|
+
query_params = opts[:query_params] || {}
|
|
520
|
+
|
|
521
|
+
# header parameters
|
|
522
|
+
header_params = opts[:header_params] || {}
|
|
523
|
+
# HTTP header 'Accept' (if needed)
|
|
524
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
525
|
+
# HTTP header 'Content-Type'
|
|
526
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
527
|
+
if !content_type.nil?
|
|
528
|
+
header_params['Content-Type'] = content_type
|
|
529
|
+
end
|
|
530
|
+
|
|
531
|
+
# form parameters
|
|
532
|
+
form_params = opts[:form_params] || {}
|
|
533
|
+
|
|
534
|
+
# http body (model)
|
|
535
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_public_workspaces_agents_request)
|
|
536
|
+
|
|
537
|
+
# return_type
|
|
538
|
+
return_type = opts[:debug_return_type] || 'PatchPublicWorkspacesAgents200Response'
|
|
539
|
+
|
|
540
|
+
# auth_names
|
|
541
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
542
|
+
|
|
543
|
+
new_options = opts.merge(
|
|
544
|
+
:operation => :"AgentsApi.patch_public_workspaces_agents",
|
|
545
|
+
:header_params => header_params,
|
|
546
|
+
:query_params => query_params,
|
|
547
|
+
:form_params => form_params,
|
|
548
|
+
:body => post_body,
|
|
549
|
+
:auth_names => auth_names,
|
|
550
|
+
:return_type => return_type
|
|
551
|
+
)
|
|
552
|
+
|
|
553
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
|
554
|
+
if @api_client.config.debugging
|
|
555
|
+
@api_client.config.logger.debug "API called: AgentsApi#patch_public_workspaces_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
556
|
+
end
|
|
557
|
+
return data, status_code, headers
|
|
558
|
+
end
|
|
559
|
+
|
|
560
|
+
# Create an agent
|
|
561
|
+
# Creates a new agent in the requested workspace.
|
|
562
|
+
# @param workspace_id [String] Workspace UUID
|
|
563
|
+
# @param post_public_workspaces_agents_request [PostPublicWorkspacesAgentsRequest]
|
|
564
|
+
# @param [Hash] opts the optional parameters
|
|
565
|
+
# @return [PostPublicWorkspacesAgents200Response]
|
|
566
|
+
def post_public_workspaces_agents(workspace_id, post_public_workspaces_agents_request, opts = {})
|
|
567
|
+
data, _status_code, _headers = post_public_workspaces_agents_with_http_info(workspace_id, post_public_workspaces_agents_request, opts)
|
|
568
|
+
data
|
|
569
|
+
end
|
|
570
|
+
|
|
571
|
+
# Create an agent
|
|
572
|
+
# Creates a new agent in the requested workspace.
|
|
573
|
+
# @param workspace_id [String] Workspace UUID
|
|
574
|
+
# @param post_public_workspaces_agents_request [PostPublicWorkspacesAgentsRequest]
|
|
575
|
+
# @param [Hash] opts the optional parameters
|
|
576
|
+
# @return [Array<(PostPublicWorkspacesAgents200Response, Integer, Hash)>] PostPublicWorkspacesAgents200Response data, response status code and response headers
|
|
577
|
+
def post_public_workspaces_agents_with_http_info(workspace_id, post_public_workspaces_agents_request, opts = {})
|
|
578
|
+
if @api_client.config.debugging
|
|
579
|
+
@api_client.config.logger.debug 'Calling API: AgentsApi.post_public_workspaces_agents ...'
|
|
580
|
+
end
|
|
581
|
+
# verify the required parameter 'workspace_id' is set
|
|
582
|
+
if @api_client.config.client_side_validation && workspace_id.nil?
|
|
583
|
+
fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.post_public_workspaces_agents"
|
|
584
|
+
end
|
|
585
|
+
# verify the required parameter 'post_public_workspaces_agents_request' is set
|
|
586
|
+
if @api_client.config.client_side_validation && post_public_workspaces_agents_request.nil?
|
|
587
|
+
fail ArgumentError, "Missing the required parameter 'post_public_workspaces_agents_request' when calling AgentsApi.post_public_workspaces_agents"
|
|
588
|
+
end
|
|
589
|
+
# resource path
|
|
590
|
+
local_var_path = '/public/workspaces/{workspace_id}/agents'.sub('{workspace_id}', CGI.escape(workspace_id.to_s))
|
|
591
|
+
|
|
592
|
+
# query parameters
|
|
593
|
+
query_params = opts[:query_params] || {}
|
|
594
|
+
|
|
595
|
+
# header parameters
|
|
596
|
+
header_params = opts[:header_params] || {}
|
|
597
|
+
# HTTP header 'Accept' (if needed)
|
|
598
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
599
|
+
# HTTP header 'Content-Type'
|
|
600
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
601
|
+
if !content_type.nil?
|
|
602
|
+
header_params['Content-Type'] = content_type
|
|
603
|
+
end
|
|
604
|
+
|
|
605
|
+
# form parameters
|
|
606
|
+
form_params = opts[:form_params] || {}
|
|
607
|
+
|
|
608
|
+
# http body (model)
|
|
609
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(post_public_workspaces_agents_request)
|
|
610
|
+
|
|
611
|
+
# return_type
|
|
612
|
+
return_type = opts[:debug_return_type] || 'PostPublicWorkspacesAgents200Response'
|
|
613
|
+
|
|
614
|
+
# auth_names
|
|
615
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
|
616
|
+
|
|
617
|
+
new_options = opts.merge(
|
|
618
|
+
:operation => :"AgentsApi.post_public_workspaces_agents",
|
|
619
|
+
:header_params => header_params,
|
|
620
|
+
:query_params => query_params,
|
|
621
|
+
:form_params => form_params,
|
|
622
|
+
:body => post_body,
|
|
623
|
+
:auth_names => auth_names,
|
|
624
|
+
:return_type => return_type
|
|
625
|
+
)
|
|
626
|
+
|
|
627
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
628
|
+
if @api_client.config.debugging
|
|
629
|
+
@api_client.config.logger.debug "API called: AgentsApi#post_public_workspaces_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
630
|
+
end
|
|
631
|
+
return data, status_code, headers
|
|
632
|
+
end
|
|
89
633
|
end
|
|
90
634
|
end
|