(id: string, message: string)
| 72 | return response.status === 204 ? { success: true } : response.json(); |
| 73 | }, |
| 74 | async chat(id: string, message: string) { |
| 75 | const response = await fetch(`${baseUrl}/v1/agents/${id}/send`, { |
| 76 | method: "POST", |
| 77 | headers: buildHeaders(), |
| 78 | body: JSON.stringify({ message }), |
| 79 | }); |
| 80 | return response.json(); |
| 81 | }, |
| 82 | // 直接聊天(无需预先创建 Agent) |
| 83 | async chatDirect(message: string, templateId: string = "chat") { |
| 84 | const response = await fetch(`${baseUrl}/v1/agents/chat`, { |
nothing calls this directly
no test coverage detected