-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Description
Problem
In the Typescript version of the documentation, the code sample that describes how to set up a RAG chain is missing a variable declaration, and throws an error. Specifically, the variable vectorStore
is not defined.
Fix
What is missing is an import of some vector store and embeddings model, eg. for MemoryVectorStore with OpenAIEmbeddings this would be:
import { OpenAIEmbeddings } from "@langchain/openai";
import { MemoryVectorStore } from "langchain/vectorstores/memory";
and the definition of embeddings
and vectorStore
as :
const embeddings = new OpenAIEmbeddings({
model: "text-embedding-3-large"
});
const vectorStore = new MemoryVectorStore(embeddings);
Metadata
Metadata
Assignees
Labels
No labels