Removed compact mode

This commit is contained in:
Willie Zutz
2025-04-19 13:36:50 -06:00
parent b2da9faeed
commit 73b5e8832e
11 changed files with 15 additions and 160 deletions

View File

@ -34,7 +34,6 @@ export interface MetaSearchAgentType {
optimizationMode: 'speed' | 'balanced' | 'quality',
fileIds: string[],
systemInstructions: string,
isCompact?: boolean,
) => Promise<eventEmitter>;
}
@ -45,7 +44,6 @@ interface Config {
rerankThreshold: number;
queryGeneratorPrompt: string;
responsePrompt: string;
preciseResponsePrompt: string;
activeEngines: string[];
}
@ -240,10 +238,7 @@ class MetaSearchAgent implements MetaSearchAgentType {
embeddings: Embeddings,
optimizationMode: 'speed' | 'balanced' | 'quality',
systemInstructions: string,
isCompact?: boolean,
) {
console.log("compact mode", isCompact);
console.log("optimization mode", optimizationMode);
return RunnableSequence.from([
RunnableMap.from({
@ -290,9 +285,7 @@ class MetaSearchAgent implements MetaSearchAgentType {
ChatPromptTemplate.fromMessages([
[
'system',
isCompact
? this.config.preciseResponsePrompt
: this.config.responsePrompt,
this.config.responsePrompt
],
new MessagesPlaceholder('chat_history'),
['user', '{query}'],
@ -483,7 +476,6 @@ class MetaSearchAgent implements MetaSearchAgentType {
optimizationMode: 'speed' | 'balanced' | 'quality',
fileIds: string[],
systemInstructions: string,
isCompact?: boolean,
) {
const emitter = new eventEmitter();
@ -492,8 +484,7 @@ class MetaSearchAgent implements MetaSearchAgentType {
fileIds,
embeddings,
optimizationMode,
systemInstructions,
isCompact,
systemInstructions
);
const stream = answeringChain.streamEvents(