File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 3232 "@apidevtools/swagger-parser" : " ^10.1.0" ,
3333 "@langchain/community" : " ^0.0.16" ,
3434 "@langchain/openai" : " ^0.0.11" ,
35+ "cheminfo-types" : " ^1.7.2" ,
3536 "cors" : " ^2.8.5" ,
3637 "dotenv" : " ^16.3.1" ,
3738 "express" : " ^4.17.1" ,
38- "hnswlib-node" : " ^1.4.2" ,
3939 "json-refs" : " ^3.0.15" ,
4040 "langchain" : " ^0.1.2" ,
4141 "multer" : " ^1.4.5-lts.1" ,
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import JsonRefs from 'json-refs'
33import OpenAI from 'openai' ;
44import dotenv from 'dotenv' ;
55import * as fs from 'fs' ;
6- import { HNSWLib } from "@ langchain/community/ vectorstores/hnswlib " ;
6+ import { MemoryVectorStore } from "langchain/vectorstores/memory " ;
77import { OpenAIEmbeddings } from "@langchain/openai" ;
88
99dotenv . config ( ) ;
@@ -91,7 +91,7 @@ class FlowtestAI {
9191
9292 const documents = chunks . map ( ( chunk ) => JSON . stringify ( chunk ) ) ;
9393
94- const vectorStore = await HNSWLib . fromTexts (
94+ const vectorStore = await MemoryVectorStore . fromTexts (
9595 documents ,
9696 [ ] ,
9797 new OpenAIEmbeddings ( {
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ const FlowTestAI = () => {
104104 }
105105 navigate ( '/flow' , { state : initialNodes } )
106106 } catch ( err ) {
107- enqueueSnackbar ( `Failed to create flowtest: ${ err } ` , { variant : 'error' } ) ;
107+ enqueueSnackbar ( `Failed to create flowtest: ${ JSON . stringify ( err ) } ` , { variant : 'error' } ) ;
108108 }
109109 // setFlowTest(createdFlowTest)
110110 // setIsDirty(false)
You can’t perform that action at this time.
0 commit comments