* 与 Agent 对话(同步) * @param agentId Agent ID * @param request Chat 请求 * @returns Chat 响应
(agentId: string, request: ChatRequest)
| 125 | * @returns Chat 响应 |
| 126 | */ |
| 127 | async chat(agentId: string, request: ChatRequest): Promise<ChatResponse> { |
| 128 | return this.request<ChatResponse>(`/v1/agents/${agentId}/chat`, { |
| 129 | method: "POST", |
| 130 | body: request, |
| 131 | }); |
| 132 | } |
| 133 | |
| 134 | /** |
| 135 | * 与 Agent 对话(流式) |