Built in
π Text
Text is a local data type. To supply your own text, use the TextLoader
and enter a string. The text is not processed, this can be very versatile.
Usage
import { RAGApplicationBuilder } from '@llm-tools/embedjs';
import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';
import { HNSWDb } from '@llm-tools/embedjs-hnswlib';
const app = await new RAGApplicationBuilder()
.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)
.setEmbeddingModel(new OpenAiEmbeddings())
.setVectorDb(new HNSWDb())
.build();
app.addLoader(new TextLoader({ text: '...' }))
Was this page helpful?