hezarfen_frontend
Clone
https://git.tahinli.com/Hezarfen/hezarfen_frontend.git
0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits
| 1 | import { client } from "../client"; |
| 2 | |
| 3 | /** The receipt for an accepted turn — the answer is not here yet. */ |
| 4 | export type AcceptedRagMessage = { |
| 5 | message_id: string; |
| 6 | status: "pending"; |
| 7 | }; |
| 8 | |
| 9 | /** |
| 10 | * 202. The live message-length cap is the school's `max_chatbot_message_len` |
| 11 | * (`GET /settings`), the same knob the chatbot nest uses. |
| 12 | */ |
| 13 | export function postRagMessage(threadId: string, content: string): Promise<AcceptedRagMessage> { |
| 14 | return client<AcceptedRagMessage>(`/rag/threads/${encodeURIComponent(threadId)}/messages`, { |
| 15 | method: "POST", |
| 16 | body: { content }, |
| 17 | }); |
| 18 | } |