
Security News
Socket Security Analysis Is Now One Click Away on npm
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.
@langchain/deepseek
Advanced tools
This package contains the LangChain.js integrations for DeepSeek.
npm install @langchain/deepseek @langchain/core
This package adds support for DeepSeek's chat model inference.
Set the necessary environment variable (or pass it in via the constructor):
export DEEPSEEK_API_KEY=
import { ChatDeepSeek } from "@langchain/deepseek";
import { HumanMessage } from "@langchain/core/messages";
const model = new ChatDeepSeek({
apiKey: process.env.DEEPSEEK_API_KEY, // Default value.
model: "<model_name>",
});
const res = await model.invoke([
{
role: "user",
content: message,
},
]);
To develop the @langchain/deepseek package, you'll need to follow these instructions:
pnpm install
pnpm build
Or from the repo root:
pnpm build --filter @langchain/deepseek
Test files should live within a tests/ file in the src/ folder. Unit tests should end in .test.ts and integration tests should
end in .int.test.ts:
$ pnpm test
$ pnpm test:int
Run the linter & formatter to ensure your code is up to standard:
pnpm lint && pnpm format
If you add a new file to be exported, either import & re-export from src/index.ts, or add it to the exports field in the package.json file and run pnpm build to generate the new entrypoint.
FAQs
Deepseek integration for LangChain.js
The npm package @langchain/deepseek receives a total of 27,856 weekly downloads. As such, @langchain/deepseek popularity was classified as popular.
We found that @langchain/deepseek demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.

Product
Socket is now scanning AI agent skills across multiple languages and ecosystems, detecting malicious behavior before developers install, starting with skills.sh's 60,000+ skills.