forge
Explore
Log in

Don't you dare go Hollow

hezarfen_frontend

Clone
★ 0

0 watching0 forksTypeScript5.5 MiBdcf123aBurak Boduroğlu2 months ago674 commits

getRagThreadMessages.ts11 lines, 447 bytesHistoryRawDownload
1import { client, normalizePage, pageQuery, type Page, type PageParams } from "../client";
2import type { RagMessage } from "../client";
3
4export async function getRagThreadMessages(
5 threadId: string,
6 params?: PageParams,
7 signal?: AbortSignal,
8): Promise<Page<RagMessage>> {
9 const url = `/rag/threads/${encodeURIComponent(threadId)}/messages${pageQuery(params)}`;
10 return normalizePage<RagMessage>(await client<unknown>(url, { signal }));
11}