feat(chat): prevent ws not open errors
This commit is contained in:
parent
7532c436db
commit
3a01eebc04
6 changed files with 59 additions and 15 deletions
|
|
@ -167,7 +167,6 @@ const createBasicAcademicSearchAnsweringChain = (
|
|||
if (optimizationMode === 'speed') {
|
||||
return docsWithContent.slice(0, 15);
|
||||
} else if (optimizationMode === 'balanced') {
|
||||
console.log('Balanced mode');
|
||||
const [docEmbeddings, queryEmbedding] = await Promise.all([
|
||||
embeddings.embedDocuments(
|
||||
docsWithContent.map((doc) => doc.pageContent),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue