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/08f236e0a06edbc9e8d7e8aeceed04f5e2bdafe1/src/agent/assistant.js
- Command line
-
hf download hf://spaces/FrederickSundeep/CodeIDE@08f236e0a06edbc9e8d7e8aeceed04f5e2bdafe1/src/agent/assistant.js
-
curl -L -o assistant.js https://huggingface.co/spaces/FrederickSundeep/CodeIDE/resolve/08f236e0a06edbc9e8d7e8aeceed04f5e2bdafe1/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 | |
| } | |