MCPcopy Create free account
hub / github.com/astercloud/aster / chat

Function chat

ui/src/composables/useAsterClient.ts:74–81  ·  view source on GitHub ↗
(id: string, message: string)

Source from the content-addressed store, hash-verified

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`, {

Callers

nothing calls this directly

Calls 1

buildHeadersFunction · 0.85

Tested by

no test coverage detected