接口定义
DeepSearchClient() 用于通过 HTTP I/O 请求方式的请求方式创建一个 DeepSearch 的客户端对象。
class DeepSearchClient(endpoint: str,api_key: str,service_id: str,timeout: int = 60,stub: Stub | None = None)
使用示例
from tdaideepsearch import DeepSearchClientEndPoint = "https://deepsearch.tdai.tencentyun.com"ApiKey = "*************************"ServiceId = "tdai-dps-9f3w****"client = DeepSearchClient(endpoint=EndPoint, api_key=ApiKey, service_id=ServiceId)
参数名 | 参数含义 | 是否必须 | 获取方式 |
endpoint | 客户端所需连接 DeepSearch 服务端的访问地址。 | 是 | |
api_key | 客户端访问 DeepSearch 服务端的 API 密钥,用于进行身份认证。 | 是 | |
service_id | DeepSearch 服务端具有唯一标识的 ID。 | 是 | |
timeout | 请求超时时间。 | 否 | 单位:秒。 默认值:10。 取值范围:大于等于0。若 timeout 设置为小于0或为 null,系统会自动赋值为默认值。 |