Our new LangChain Academy Course Deep Research with LangGraph is now live! Enroll for free.
OSS (v1-alpha)
LangChain and LangGraph
TencentHunyuanEmbeddings
TENCENT_SECRET_ID
TENCENT_SECRET_KEY
npm install @langchain/community @langchain/core
npm install crypto-js
web
// in nodejs environment import { TencentHunyuanEmbeddings } from "@langchain/community/embeddings/tencent_hunyuan"; // in browser environment // import { TencentHunyuanEmbeddings } from "@langchain/community/embeddings/tencent_hunyuan/web"; /* Embed queries */ const embeddings = new TencentHunyuanEmbeddings(); const res = await embeddings.embedQuery("你好,世界!"); console.log(res); /* Embed documents */ const documentRes = await embeddings.embedDocuments(["你好,世界!", "再见"]); console.log({ documentRes });