Skip to content

Commit 83ce032

Browse files
mongodbenBen Perlmutter
andauthored
(EAI-992): Remove ChatLlm (#751)
* refactor GenerateRespose * Clean up imports * consolidate generate user prompt to the legacy file * update test config imports * Fix broken tests * get started * nominally working generate res w/ search * small refactors * aint pretty but fully functional * hacky if more functional * more hack * tools * functional if not pretty * Add processing * working tool calling * making progress * keepin on * Clean config * working e2e * update model version * Remove no longer used stuff * decouple search results for references and whats shown to model * fix scripts build errs * remove ChatLlm * lite fixes * Remove stub --------- Co-authored-by: Ben Perlmutter <mongodben@mongodb.com>
1 parent 50d3f44 commit 83ce032

File tree

9 files changed

+11
-640
lines changed

9 files changed

+11
-640
lines changed

packages/mongodb-rag-core/src/DataStreamer.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
import { Response } from "express";
2-
import { OpenAiStreamingResponse } from "./llm";
32
import { References } from "./References";
43
import { logger } from "./logger";
4+
import OpenAI from "openai";
55

66
export function escapeNewlines(str: string): string {
77
return str.replaceAll(`\n`, `\\n`);
88
}
99

10+
export type OpenAiStreamingResponse = AsyncIterable<
11+
Omit<OpenAI.ChatCompletionChunk, "model" | "object">
12+
>;
13+
1014
interface ServerSentEventDispatcher<Data extends object | string> {
1115
connect(): void;
1216
disconnect(): void;

packages/mongodb-rag-core/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
export * from "./llm";
2-
export * as Llm from "./llm";
31
export * from "./chunk";
42
export * as Chunk from "./chunk";
53
export * from "./contentStore";

packages/mongodb-rag-core/src/llm/ChatLlm.ts

Lines changed: 0 additions & 153 deletions
This file was deleted.

packages/mongodb-rag-core/src/llm/LangchainChatLlm.test.ts

Lines changed: 0 additions & 119 deletions
This file was deleted.

packages/mongodb-rag-core/src/llm/LangchainChatLlm.ts

Lines changed: 0 additions & 75 deletions
This file was deleted.

0 commit comments

Comments
 (0)