此页面由 AI 自动翻译。查看英文原版
最后更新

本页目录

  • 类
  • Request

hub_requests

最后更新
Python API: hubai_sdk.utils.hub_requests

类

Request

方法

delete
Python
1def delete(service: HubService, endpoint: str = '', **kwargs) -> Any:
向 HubAI 发送经过身份验证的 DELETE 请求。
get
Python
1def get(service: HubService, endpoint: str = '', **kwargs) -> Any:
向 HubAI 发送经过身份验证的 GET 请求。
headers
Python
1def headers() -> dict[str, str]:
为 HubAI API 调用构建经过身份验证的请求头。返回
  • dict[str, str]: 包含持有者令牌和 JSON 接受头的请求头。
引发
patch
Python
1def patch(service: HubService, endpoint: str = '', **kwargs) -> Any:
向 HubAI 发送经过身份验证的 PATCH 请求。
post
Python
1def post(service: HubService, endpoint: str = '', **kwargs) -> Any:
向 HubAI 发送经过身份验证的 POST 请求。
put
Python
1def put(service: HubService, endpoint: str = '', **kwargs) -> Any:
向 HubAI 发送经过身份验证的 PUT 请求。
url
Python
1def url(service: HubService) -> str:
为 HubAI 服务构建 API 基础 URL。