-
Checked other resources
Commit to Help
Example Codeimport { PDFLoader } from "langchain/document_loaders/fs/pdf";
import { MemoryVectorStore } from "langchain/vectorstores/memory";
import { RecursiveCharacterTextSplitter } from "langchain/text_splitter";
import { OpenAIEmbeddings } from "langchain/embeddings/openai";
import { PromptTemplate } from "@langchain/core/prompts";
import { RunnableSequence } from "@langchain/core/runnables";
import { StringOutputParser } from "@langchain/core/output_parsers" DescriptionI am trying to understand when to use import from Also even though the documents mention The @langchain/core package contains base abstractions that the rest of the LangChain ecosystem uses, along with the LangChain Expression Language. It is automatically installed along with langchain, but can also be used separately. Install with: Looks like I still need to npm install System Info[email protected] | MIT | deps: 18 | versions: 255 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The distinction between using imports from
The documentation excerpt clearly outlines the installation process and the rationale behind the modular approach to managing dependencies within the LangChain ecosystem. This approach allows developers to tailor their installation to their specific needs, ensuring compatibility and functionality across different parts of the LangChain library and its integrations. As for the specific functionalities provided by the I hope this clarifies your question. If you need further assistance, feel free to ask. Sources
|
Beta Was this translation helpful? Give feedback.
The distinction between using imports from
langchain
versus@langchain/core
and the necessity of installing@langchain/core
separately, despite it being automatically installed withlangchain
, is rooted in the modular architecture of the LangChain ecosystem.When to use imports from
langchain
versus@langchain/core
:langchain
for general functionalities provided by the LangChain library. This package is designed to offer a broad set of features and utilities for working with language models and integrations.@langchain/core
when you need access to the base abstractions that the rest of the LangChain ecosystem uses. This includes the LangChain Expression L…