JsonLoader.
Headers are included for each line, so for example if you have a json like {"age": 18}, then it will be added as age: 18.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
JsonLoader.
Headers are included for each line, so for example if you have a json like {"age": 18}, then it will be added as age: 18.
import { RAGApplicationBuilder, JsonLoader } 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())
.setVectorDatabase(new HNSWDb())
.build();
app.addLoader(new JsonLoader({ object: {...} }))
Was this page helpful?
