You’ll need to sign up for an ZhipuAI API key and set it as an environment variable named ZHIPUAI_API_KEY.https://open.bigmodel.cnThen, you’ll need to install the @langchain/community package:
import { ZhipuAIEmbeddings } from "@langchain/community/embeddings/zhipuai";const model = new ZhipuAIEmbeddings({});const res = await model.embedQuery( "What would be a good company name a company that makes colorful socks?");console.log({ res });