Weaviate is an open source vector store. You can deploy it locally on docker or use their managed cloud offering.

Install Qdrant addon

npm install @llm-tools/embedjs-weaviate

Usage

import { RAGApplicationBuilder } from '@llm-tools/embedjs';

import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';

import { WeaviateDb } from '@llm-tools/embedjs-weaviate';

import { WebLoader } from '@llm-tools/embedjs-loader-web';



// set OPENAI_API_KEY in your env

process.env.OPENAI_API_KEY = "sk-xxx";



const app = await new RAGApplicationBuilder()

.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)

.setEmbeddingModel(new OpenAiEmbeddings())

.setVectorDatabase(new WeaviateDb({ host: '...', apiKey: '...', className: '...', scheme: '...' }))

.build();





//add data source and start query it

await app.addLoader(new WebLoader({ urlOrContent: 'https://www.forbes.com/profile/elon-musk' }));

await app.query('Tell me about Elon Musk');

If you can't find specific feature or run into issues, please feel free to reach out through the following channels.

Was this page helpful?