core/apps/webapp/app/routes/api.v1.conversation.$conversationId.stream.tsx
Harshith Mullapudi f39c7cc6d0
feat: remove trigger and run base on bullmq (#126)
* feat: remove trigger and run base on bullmq
* fix: telemetry and trigger deploymen
* feat: add Ollama container and update ingestion status for unchanged documents
* feat: add logger to bullmq workers
* 1. Remove chat and deep-search from trigger
2. Add ai/sdk for chat UI
3. Added a better model manager

* refactor: simplify clustered graph query and add stop conditions for AI responses

* fix: streaming

* fix: docker docs

---------

Co-authored-by: Manoj <saimanoj58@gmail.com>
2025-10-26 12:56:12 +05:30

46 lines
1.3 KiB
XML

// import { json } from "@remix-run/node";
// import { createActionApiRoute } from "~/services/routeBuilders/apiBuilder.server";
// import { UI_MESSAGE_STREAM_HEADERS } from "ai";
// import { getConversationAndHistory } from "~/services/conversation.server";
// import { z } from "zod";
// import { createResumableStreamContext } from "resumable-stream";
// export const ConversationIdSchema = z.object({
// conversationId: z.string(),
// });
// const { action, loader } = createActionApiRoute(
// {
// params: ConversationIdSchema,
// allowJWT: true,
// authorization: {
// action: "oauth",
// },
// corsStrategy: "all",
// },
// async ({ authentication, params }) => {
// const conversation = await getConversationAndHistory(
// params.conversationId,
// authentication.userId,
// );
// const lastConversation = conversation?.ConversationHistory.pop();
// if (!lastConversation) {
// return json({}, { status: 204 });
// }
// const streamContext = createResumableStreamContext({
// waitUntil: null,
// });
// return new Response(
// await streamContext.resumeExistingStream(lastConversation.id),
// { headers: UI_MESSAGE_STREAM_HEADERS },
// );
// },
// );
// export { action, loader };