feat(agents): fix unresloved types
This commit is contained in:
parent
6b8f7dc32c
commit
c521b032a7
|
@ -19,6 +19,7 @@ import formatChatHistoryAsString from '../utils/formatHistory';
|
||||||
import eventEmitter from 'events';
|
import eventEmitter from 'events';
|
||||||
import computeSimilarity from '../utils/computeSimilarity';
|
import computeSimilarity from '../utils/computeSimilarity';
|
||||||
import logger from '../utils/logger';
|
import logger from '../utils/logger';
|
||||||
|
import { IterableReadableStream } from '@langchain/core/utils/stream';
|
||||||
|
|
||||||
const basicAcademicSearchRetrieverPrompt = `
|
const basicAcademicSearchRetrieverPrompt = `
|
||||||
You will be given a conversation below and a follow up question. You need to rephrase the follow-up question if needed so it is a standalone question that can be used by the LLM to search the web for information.
|
You will be given a conversation below and a follow up question. You need to rephrase the follow-up question if needed so it is a standalone question that can be used by the LLM to search the web for information.
|
||||||
|
|
|
@ -19,6 +19,7 @@ import formatChatHistoryAsString from '../utils/formatHistory';
|
||||||
import eventEmitter from 'events';
|
import eventEmitter from 'events';
|
||||||
import computeSimilarity from '../utils/computeSimilarity';
|
import computeSimilarity from '../utils/computeSimilarity';
|
||||||
import logger from '../utils/logger';
|
import logger from '../utils/logger';
|
||||||
|
import { IterableReadableStream } from '@langchain/core/utils/stream';
|
||||||
|
|
||||||
const basicRedditSearchRetrieverPrompt = `
|
const basicRedditSearchRetrieverPrompt = `
|
||||||
You will be given a conversation below and a follow up question. You need to rephrase the follow-up question if needed so it is a standalone question that can be used by the LLM to search the web for information.
|
You will be given a conversation below and a follow up question. You need to rephrase the follow-up question if needed so it is a standalone question that can be used by the LLM to search the web for information.
|
||||||
|
|
|
@ -96,7 +96,7 @@ const basicWebSearchResponsePrompt = `
|
||||||
const strParser = new StringOutputParser();
|
const strParser = new StringOutputParser();
|
||||||
|
|
||||||
const handleStream = async (
|
const handleStream = async (
|
||||||
stream: IterableReadableStream<StreamEvent>,
|
stream: IterableReadableStream<StreamEvent>,
|
||||||
emitter: eventEmitter,
|
emitter: eventEmitter,
|
||||||
) => {
|
) => {
|
||||||
for await (const event of stream) {
|
for await (const event of stream) {
|
||||||
|
|
|
@ -18,6 +18,7 @@ import type { Embeddings } from '@langchain/core/embeddings';
|
||||||
import formatChatHistoryAsString from '../utils/formatHistory';
|
import formatChatHistoryAsString from '../utils/formatHistory';
|
||||||
import eventEmitter from 'events';
|
import eventEmitter from 'events';
|
||||||
import logger from '../utils/logger';
|
import logger from '../utils/logger';
|
||||||
|
import { IterableReadableStream } from '@langchain/core/utils/stream';
|
||||||
|
|
||||||
const basicWolframAlphaSearchRetrieverPrompt = `
|
const basicWolframAlphaSearchRetrieverPrompt = `
|
||||||
You will be given a conversation below and a follow up question. You need to rephrase the follow-up question if needed so it is a standalone question that can be used by the LLM to search the web for information.
|
You will be given a conversation below and a follow up question. You need to rephrase the follow-up question if needed so it is a standalone question that can be used by the LLM to search the web for information.
|
||||||
|
|
|
@ -10,6 +10,7 @@ import eventEmitter from 'events';
|
||||||
import type { BaseChatModel } from '@langchain/core/language_models/chat_models';
|
import type { BaseChatModel } from '@langchain/core/language_models/chat_models';
|
||||||
import type { Embeddings } from '@langchain/core/embeddings';
|
import type { Embeddings } from '@langchain/core/embeddings';
|
||||||
import logger from '../utils/logger';
|
import logger from '../utils/logger';
|
||||||
|
import { IterableReadableStream } from '@langchain/core/utils/stream';
|
||||||
|
|
||||||
const writingAssistantPrompt = `
|
const writingAssistantPrompt = `
|
||||||
You are Perplexica, an AI model who is expert at searching the web and answering user's queries. You are currently set on focus mode 'Writing Assistant', this means you will be helping the user write a response to a given query.
|
You are Perplexica, an AI model who is expert at searching the web and answering user's queries. You are currently set on focus mode 'Writing Assistant', this means you will be helping the user write a response to a given query.
|
||||||
|
|
|
@ -19,6 +19,7 @@ import formatChatHistoryAsString from '../utils/formatHistory';
|
||||||
import eventEmitter from 'events';
|
import eventEmitter from 'events';
|
||||||
import computeSimilarity from '../utils/computeSimilarity';
|
import computeSimilarity from '../utils/computeSimilarity';
|
||||||
import logger from '../utils/logger';
|
import logger from '../utils/logger';
|
||||||
|
import { IterableReadableStream } from '@langchain/core/utils/stream';
|
||||||
|
|
||||||
const basicYoutubeSearchRetrieverPrompt = `
|
const basicYoutubeSearchRetrieverPrompt = `
|
||||||
You will be given a conversation below and a follow up question. You need to rephrase the follow-up question if needed so it is a standalone question that can be used by the LLM to search the web for information.
|
You will be given a conversation below and a follow up question. You need to rephrase the follow-up question if needed so it is a standalone question that can be used by the LLM to search the web for information.
|
||||||
|
|
Loading…
Reference in New Issue