feat(api): add pagination to messages endpoint and improve chat API robustness

- Add pagination support to /api/conversations/[id]/messages with limit and before query params, returning hasMore and cursor for efficient message fetching
- Enhance /api/ollama/chat by adding non-blocking Ollama availability check and conditionally disabling debug logging in production环境下Featured
This commit is contained in:
Evandro Fonseca Junior committed 2025-10-29 17:22:21 -03:00
1 parent 30290ae87a
commit 1545020afe
9 files changed
+114 -38

No files matched your search

+1 -1
View File
@@ -83,7 +83,7 @@ export async function chatWithStream(
? [{ role: "system", content: system }, ...messages]
: messages,
stream: true,
options,
options: { ...(options || {}), keep_alive: "5m" },
};
// Adicionar tools se fornecidos