# coding: utf-8
"""
Agent Communication Protocol
Specification of the API protocol for communication with an agent. # noqa: E501
The version of the OpenAPI document: v0.2
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
"""
import re # noqa: F401
from typing import Any, Awaitable, List, Optional, Union, overload
from pydantic import Field, StrictBytes, StrictStr, validate_arguments
from typing_extensions import Annotated
from agbenchmark.agent_protocol_client.api_client import ApiClient
from agbenchmark.agent_protocol_client.api_response import ApiResponse
from agbenchmark.agent_protocol_client.exceptions import ( # noqa: F401
ApiTypeError,
ApiValueError,
)
from agbenchmark.agent_protocol_client.models.artifact import Artifact
from agbenchmark.agent_protocol_client.models.step import Step
from agbenchmark.agent_protocol_client.models.step_request_body import StepRequestBody
from agbenchmark.agent_protocol_client.models.task import Task
from agbenchmark.agent_protocol_client.models.task_request_body import TaskRequestBody
class AgentApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient.get_default()
self.api_client = api_client
@overload
async def create_agent_task(
self, task_request_body: Optional[TaskRequestBody] = None, **kwargs
) -> Task: # noqa: E501
...
@overload
def create_agent_task(
self,
task_request_body: Optional[TaskRequestBody] = None,
async_req: Optional[bool] = True,
**kwargs,
) -> Task: # noqa: E501
...
@validate_arguments
def create_agent_task(
self,
task_request_body: Optional[TaskRequestBody] = None,
async_req: Optional[bool] = None,
**kwargs,
) -> Union[Task, Awaitable[Task]]: # noqa: E501
"""Creates a task for the agent. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_agent_task(task_request_body, async_req=True)
>>> result = thread.get()
:param task_request_body:
:type task_request_body: TaskRequestBody
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: Task
"""
kwargs["_return_http_data_only"] = True
if "_preload_content" in kwargs:
raise ValueError(
"Error! Please call the create_agent_task_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data"
)
if async_req is not None:
kwargs["async_req"] = async_req
return self.create_agent_task_with_http_info(
task_request_body, **kwargs
) # noqa: E501
@validate_arguments
def create_agent_task_with_http_info(
self, task_request_body: Optional[TaskRequestBody] = None, **kwargs
) -> ApiResponse: # noqa: E501
"""Creates a task for the agent. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.create_agent_task_with_http_info(task_request_body, async_req=True)
>>> result = thread.get()
:param task_request_body:
:type task_request_body: TaskRequestBody
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the ApiResponse.data will
be set to none and raw_data will store the
HTTP response body without reading/decoding.
Default is True.
:type _preload_content: bool, optional
:param _return_http_data_only: response data instead of ApiResponse
object with status code, headers, etc
:type _return_http_data_only: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(Task, status_code(int), headers(HTTPHeaderDict))
"""
_params = locals()
_all_params = ["task_request_body"]
_all_params.extend(
[
"async_req",
"_return_http_data_only",
"_preload_content",
"_request_timeout",
"_request_auth",
"_content_type",
"_headers",
]
)
# validate the arguments
for _key, _val in _params["kwargs"].items():
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method create_agent_task" % _key
)
_params[_key] = _val
del _params["kwargs"]
_collection_formats = {}
# process the path parameters
_path_params = {}
# process the query parameters
_query_params = []
# process the header parameters
_header_params = dict(_params.get("_headers", {}))
# process the form parameters
_form_params = []
_files = {}
# process the body parameter
_body_params = None
if _params["task_request_body"] is not None:
_body_params = _params["task_request_body"]
# set the HTTP header `Accept`
_header_params["Accept"] = self.api_client.select_header_accept(
["application/json"]
) # noqa: E501
# set the HTTP header `Content-Type`
_content_types_list = _params.get(
"_content_type",
self.api_client.select_header_content_type(["application/json"]),
)
if _content_types_list:
_header_params["Content-Type"] = _content_types_list
# authentication setting
_auth_settings = [] # noqa: E501
_response_types_map = {
"200": "Task",
}
return self.api_client.call_api(
"/agent/tasks",
"POST",
_path_params,
_query_params,
_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
response_types_map=_response_types_map,
auth_settings=_auth_settings,
async_req=_params.get("async_req"),
_return_http_data_only=_params.get("_return_http_data_only"), # noqa:
没有合适的资源?快使用搜索试试~ 我知道了~
智能GPT:你只要提供OpenAI的API Key,那么它就可以根据你设定的目标,采用Google搜索、浏览网站、执行脚本等方式
共2000个文件
json:1341个
py:389个
txt:84个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 118 浏览量
2023-11-27
12:15:51
上传
评论
收藏 126.64MB ZIP 举报
温馨提示
项目可根据你设置的目标,使用GPT-4自动帮你完成所有的任务。你只要提供OpenAI的API Key,那么它就可以根据你设定的目标,采用Google搜索、浏览网站、执行脚本等方式帮你完成目标。
资源推荐
资源详情
资源评论
收起资源包目录
智能GPT:你只要提供OpenAI的API Key,那么它就可以根据你设定的目标,采用Google搜索、浏览网站、执行脚本等方式 (2000个子文件)
win32_window.cpp 8KB
flutter_window.cpp 2KB
utils.cpp 2KB
main.cpp 1KB
toastify.css 1KB
globals.css 59B
task_queue_viewmodel.dart 10KB
leaderboard_submission_dialog.dart 8KB
task_viewmodel.dart 7KB
agent_message_tile.dart 7KB
chat_view.dart 7KB
chat_viewmodel.dart 7KB
main_layout.dart 7KB
task_queue_view.dart 6KB
chat_input_field.dart 6KB
continuous_mode_dialog.dart 6KB
task_view.dart 5KB
main.dart 5KB
skill_tree_view.dart 5KB
side_bar_view.dart 5KB
test_suite_button.dart 4KB
settings_view.dart 4KB
benchmark_run.dart 3KB
settings_viewmodel.dart 3KB
task_service.dart 3KB
shared_preferences_service.dart 3KB
app_colors.dart 3KB
rest_api_utility.dart 3KB
test_suite_detail_view.dart 3KB
test_option.dart 3KB
chat_service.dart 3KB
api_base_url_field.dart 3KB
skill_tree_viewmodel.dart 3KB
firebase_auth_view.dart 3KB
metrics.dart 3KB
task_info.dart 3KB
tree_node_view.dart 2KB
run_details.dart 2KB
task_list_tile.dart 2KB
user_message_tile.dart 2KB
json_code_snippet_view.dart 2KB
loading_indicator.dart 2KB
repository_info.dart 2KB
artifact.dart 2KB
task_viewmodel_test.dart 2KB
task_list_tile_test.dart 2KB
test_suite_list_tile.dart 2KB
chat_test.dart 2KB
uri_utility.dart 2KB
chat_input_field_test.dart 2KB
chat.dart 2KB
chat_viewmodel_test.dart 2KB
benchmark_service.dart 2KB
task_test.dart 2KB
agent_message_tile_test.dart 2KB
config.dart 2KB
task.dart 2KB
leaderboard_submission_button.dart 2KB
step.dart 2KB
auth_service.dart 2KB
new_task_button.dart 1KB
user_message_tile_test.dart 1KB
skill_node_data.dart 1KB
skill_tree_category.dart 933B
step_request_body_test.dart 851B
task_request_body_test.dart 831B
leaderboard_service.dart 789B
new_task_button_test.dart 754B
ground.dart 694B
test_suite.dart 694B
skill_tree_node.dart 651B
task_response.dart 565B
pagination.dart 505B
json_code_snippet_view_test.dart 503B
skill_tree_edge.dart 492B
info.dart 450B
step_request_body.dart 341B
stack.dart 314B
task_request_body.dart 265B
benchmark_task_request_body.dart 260B
benchmark_step_request_body.dart 226B
benchmark_task_status.dart 149B
message_type.dart 90B
feature_flags.dart 86B
api_type.dart 54B
win32_window.h 3KB
flutter_window.h 928B
utils.h 672B
resource.h 432B
my_application.h 388B
generated_plugin_registrant.h 303B
generated_plugin_registrant.h 302B
Runner-Bridging-Header.h 38B
index.html 3KB
index.html 3KB
main.html 2KB
animal_list.html 489B
main.dart.js 3.85MB
skwasm.js 158KB
canvaskit.js 92KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
UnknownToKnown
- 粉丝: 1w+
- 资源: 590
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功