feat(logging): add logger
This commit is contained in:
parent
7c84025f3c
commit
aae85cd767
15 changed files with 240 additions and 17 deletions
|
@ -18,6 +18,7 @@ import type { Embeddings } from '@langchain/core/embeddings';
|
|||
import formatChatHistoryAsString from '../utils/formatHistory';
|
||||
import eventEmitter from 'events';
|
||||
import computeSimilarity from '../utils/computeSimilarity';
|
||||
import logger from '../utils/logger';
|
||||
|
||||
const basicSearchRetrieverPrompt = `
|
||||
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.
|
||||
|
@ -241,7 +242,7 @@ const basicWebSearch = (
|
|||
'error',
|
||||
JSON.stringify({ data: 'An error has occurred please try again later' }),
|
||||
);
|
||||
console.error(err);
|
||||
logger.error(`Error in websearch: ${err}`);
|
||||
}
|
||||
|
||||
return emitter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue