We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to use LmdbCache with Nextjs but i got error.
My route.ts file:
import {auth} from '@/lib/auth' import {OpenAi, RAGApplication, RAGApplicationBuilder} from "@llm-tools/embedjs"; import * as path from "path"; const { QdrantDb } = require("@llm-tools/embedjs/vectorDb/qdrant"); const { LmdbCache } = require("@llm-tools/embedjs/cache/lmdb"); let ragApplication: RAGApplication; const ragBuilder = new RAGApplicationBuilder() .setModel(new OpenAi({ modelName: 'gpt-3.5-turbo' })) .setVectorDb( new QdrantDb({ apiKey: process.env.QDRANTDB_API_KEY || '', url: process.env.QDRANTDB_API_URL || '', clusterName: process.env.QDRANTDB_CLUSTER_NAME || '', }) ) .setLoaderInit(false); export async function POST(request: Request) { const session = await auth() const { query } = await request.json() if (!session) { return new Response(null, { status: 401 }) } if (!ragApplication) { ragApplication = await ragBuilder.build(); } const result = await ragApplication.query(query); return Response.json({ result }) }
Error:
Import trace for requested module: ./node_modules/.pnpm/@[email protected]_@[email protected][email protected]/node_modules/@llm-tools/embedjs/dist/cache/lmdb-cache.cjs ./app/api/chat/route.ts ⨯ ./node_modules/.pnpm/[email protected]/node_modules/lmdb/dist/index.cjs:3109:0 Module not found: Can't resolve 'cbor-x' https://nextjs.org/docs/messages/module-not-found
If I install the cbor-x node package, I got this error:
⨯ node_modules/.pnpm/[email protected]/node_modules/node-gyp-build-optional-packages/index.js (77:0) @ load.path ⨯ Error: No native build was found for platform=darwin arch=arm64 runtime=node abi=108 uv=1 armv=8 libc=glibc node=18.20.2 webpack=true attempted loading from: .next/server/vendor-chunks and package: @/-darwin-arm64
The text was updated successfully, but these errors were encountered:
@benfiratkaya did this get resolved? What happened in the end?
Sorry, something went wrong.
adhityan
No branches or pull requests
I'm trying to use LmdbCache with Nextjs but i got error.
My route.ts file:
Error:
If I install the cbor-x node package, I got this error:
The text was updated successfully, but these errors were encountered: