Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@langchain/baidu-qianfan
Advanced tools
This package contains the LangChain.js integrations for Baidu Qianfan via the qianfan/sdk package.
npm install @langchain/baidu-qianfan @langchain/core
This package adds support for Qianfan chat model inference.
Set the necessary environment variable (or pass it in via the constructor):
export QIANFAN_AK=""
export QIANFAN_SK=""
export QIANFAN_ACCESS_KEY=""
export QIANFAN_SECRET_KEY=""
import { ChatBaiduQianfan } from "@langchain/baidu-qianfan";
import { HumanMessage } from "@langchain/core/messages";
const chat = new ChatBaiduQianfan({
model: 'ERNIE-Lite-8K'
});
const message = new HumanMessage("北京天气");
const res = await chat.invoke([message]);
import { BaiduQianfanEmbeddings } from "@langchain/baidu-qianfan";
const embeddings = new BaiduQianfanEmbeddings();
const res = await embeddings.embedQuery("Introduce the city Beijing");
FAQs
Baidu Qianfan integration for LangChain.js
We found that @langchain/baidu-qianfan demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.