MCPcopy Create free account
hub / github.com/congde/emotional_chat / sendMessage

Method sendMessage

frontend/src/services/ChatAPI.js:7–19  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

5
6class ChatAPI {
7 static async sendMessage(data) {
8 try {
9 const response = await axios.post(`${API_BASE_URL}/chat`, data, {
10 headers: {
11 'Content-Type': 'application/json',
12 },
13 });
14 return response.data;
15 } catch (error) {
16 console.error('发送消息失败:', error);
17 throw error;
18 }
19 }
20
21 static async sendMessageWithAttachments(formData) {
22 try {

Callers

nothing calls this directly

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected