(message: string, templateId: string = "chat")
| 81 | }, |
| 82 | // 直接聊天(无需预先创建 Agent) |
| 83 | async chatDirect(message: string, templateId: string = "chat") { |
| 84 | const response = await fetch(`${baseUrl}/v1/agents/chat`, { |
| 85 | method: "POST", |
| 86 | headers: buildHeaders(), |
| 87 | body: JSON.stringify({ |
| 88 | template_id: templateId, |
| 89 | input: message, |
| 90 | }), |
| 91 | }); |
| 92 | return response.json(); |
| 93 | }, |
| 94 | }, |
| 95 | workflows: { |
| 96 | async list() { |
nothing calls this directly
no test coverage detected