You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using this code. Its working good without setStore. Folder and cache created but query not working:
import{RAGApplicationBuilder,SIMPLE_MODELS}from'@llm-tools/embedjs';import{LmdbStore}from'@llm-tools/embedjs-lmdb';import*aspathfrom"path";import{OpenAiEmbeddings}from"@llm-tools/embedjs-openai";import{QdrantDb}from"@llm-tools/embedjs-qdrant";exportdefaultasyncfunctionhandler(req,res){constapp=awaitnewRAGApplicationBuilder().setModel(SIMPLE_MODELS.OPENAI_GPT4_O).setEmbeddingModel(newOpenAiEmbeddings()).setVectorDatabase(newQdrantDb({apiKey: process.env.QDRANTDB_API_KEY||'',url: process.env.QDRANTDB_API_URL||'',clusterName: process.env.QDRANTDB_CLUSTER_NAME||'',})).setStore(newLmdbStore({path: path.resolve('./lmbdb-cache')})).build();constresponse=awaitapp.query("What is the LeaderOS");res.status(200).json({ response });}
Error:
Cannot read properties of undefined (reading 'entries')
TypeError: Cannot read properties of undefined (reading 'entries')\n at LmdbStore.addEntryToConversation (file:///Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/@llm-tools/embedjs-lmdb/src/lmdb-store.js:86:22)\n at async OpenAi.query (file:///Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/@llm-tools/embedjs-interfaces/src/interfaces/base-model.js:64:13)\n at async handler (webpack-internal:///(api)/./src/pages/api/create-cache.js:27:22)\n at async apiResolver (/Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/next/dist/compiled/next-server/pages-api.runtime.dev.js:21:3901)\n at async PagesAPIRouteModule.render (/Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/next/dist/compiled/next-server/pages-api.runtime.dev.js:21:5372)\n at async DevServer.runApi (/Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/next/dist/server/next-server.js:618:9)\n at async NextNodeServer.handleCatchallRenderRequest (/Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/next/dist/server/next-server.js:278:37)\n at async DevServer.handleRequestImpl (/Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/next/dist/server/base-server.js:853:17)\n at async /Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/next/dist/server/dev/next-dev-server.js:373:20\n at async Span.traceAsyncFn (/Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/next/dist/trace/trace.js:153:20)\n at async DevServer.handleRequest (/Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/next/dist/server/dev/next-dev-server.js:370:24)\n at async invokeRender (/Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/next/dist/server/lib/router-server.js:183:21)\n at async handleRequest (/Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/next/dist/server/lib/router-server.js:360:24)\n at async requestHandlerImpl (/Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/next/dist/server/lib/router-server.js:384:13)\n at async Server.requestListener (/Users/firatkaya/WebstormProjects/leaderos-ai-api-v2/node_modules/next/dist/server/lib/start-server.js:142:13)
The text was updated successfully, but these errors were encountered:
🐛 Describe the bug
I'm using this code. Its working good without setStore. Folder and cache created but query not working:
Error:
The text was updated successfully, but these errors were encountered: