mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-06-16 23:08:41 +00:00
Update metaSearchAgent.ts
This commit is contained in:
@ -29,6 +29,7 @@ export interface MetaSearchAgentType {
|
|||||||
embeddings: Embeddings,
|
embeddings: Embeddings,
|
||||||
optimizationMode: 'speed' | 'balanced' | 'quality',
|
optimizationMode: 'speed' | 'balanced' | 'quality',
|
||||||
fileIds: string[],
|
fileIds: string[],
|
||||||
|
systemInstructions: string,
|
||||||
) => Promise<eventEmitter>;
|
) => Promise<eventEmitter>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -239,6 +240,7 @@ class MetaSearchAgent implements MetaSearchAgentType {
|
|||||||
fileIds: string[],
|
fileIds: string[],
|
||||||
embeddings: Embeddings,
|
embeddings: Embeddings,
|
||||||
optimizationMode: 'speed' | 'balanced' | 'quality',
|
optimizationMode: 'speed' | 'balanced' | 'quality',
|
||||||
|
systemInstructions: string,
|
||||||
input: SearchInput,
|
input: SearchInput,
|
||||||
emitter: EventEmitter,
|
emitter: EventEmitter,
|
||||||
) {
|
) {
|
||||||
@ -275,6 +277,7 @@ class MetaSearchAgent implements MetaSearchAgentType {
|
|||||||
chat_history: input.chat_history,
|
chat_history: input.chat_history,
|
||||||
date: new Date().toISOString(),
|
date: new Date().toISOString(),
|
||||||
context: context,
|
context: context,
|
||||||
|
systemInstructions: systemInstructions,
|
||||||
});
|
});
|
||||||
|
|
||||||
const llmRes = await llm.stream(formattedChatPrompt);
|
const llmRes = await llm.stream(formattedChatPrompt);
|
||||||
@ -436,6 +439,7 @@ class MetaSearchAgent implements MetaSearchAgentType {
|
|||||||
embeddings: Embeddings,
|
embeddings: Embeddings,
|
||||||
optimizationMode: 'speed' | 'balanced' | 'quality',
|
optimizationMode: 'speed' | 'balanced' | 'quality',
|
||||||
fileIds: string[],
|
fileIds: string[],
|
||||||
|
systemInstructions: string,
|
||||||
) {
|
) {
|
||||||
const emitter = new eventEmitter();
|
const emitter = new eventEmitter();
|
||||||
|
|
||||||
@ -444,6 +448,7 @@ class MetaSearchAgent implements MetaSearchAgentType {
|
|||||||
fileIds,
|
fileIds,
|
||||||
embeddings,
|
embeddings,
|
||||||
optimizationMode,
|
optimizationMode,
|
||||||
|
systemInstructions,
|
||||||
{
|
{
|
||||||
chat_history: history,
|
chat_history: history,
|
||||||
query: message,
|
query: message,
|
||||||
|
Reference in New Issue
Block a user