Spaces:
Running
Running
| // src/agent/assistant.js | |
| import { api } from "../apiClient"; | |
| export async function askAgent(message, history = []) { | |
| const res = await api.post( | |
| "/chat-stream", | |
| { message, history }, | |
| { responseType: "text" } // backend returns text/plain | |
| ); | |
| return res.data; // whole reply text | |
| } | |