Spaces:
Running
Running
Download src/agent/assistant.js from FrederickSundeep/CodeIDE: direct link, hf CLI and curl.
- Browser
- Download file 301 Bytes
-
https://huggingface.co/spaces/FrederickSundeep/CodeIDE/resolve/060ec76bad02fa232e5c104f8364a3ef3d49a8e9/src/agent/assistant.js
- Command line
-
hf download hf://spaces/FrederickSundeep/CodeIDE@060ec76bad02fa232e5c104f8364a3ef3d49a8e9/src/agent/assistant.js
-
curl -L -o assistant.js https://huggingface.co/spaces/FrederickSundeep/CodeIDE/resolve/060ec76bad02fa232e5c104f8364a3ef3d49a8e9/src/agent/assistant.js
301 Bytes
| // 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 | |
| } | |