UNPKG

@langchain/community

Version:
1 lines 1.66 kB
{"version":3,"file":"index.cjs","names":["BaseChatTencentHunyuan"],"sources":["../../../src/chat_models/tencent_hunyuan/index.ts"],"sourcesContent":["import { type BaseChatModelParams } from \"@langchain/core/language_models/chat_models\";\nimport { sign } from \"../../utils/tencent_hunyuan/index.js\";\nimport {\n ChatTencentHunyuan as BaseChatTencentHunyuan,\n TencentHunyuanChatInput,\n} from \"./base.js\";\n\n/**\n * Wrapper around Tencent Hunyuan large language models that use the Chat endpoint.\n *\n * To use you should have the `TENCENT_SECRET_ID` and `TENCENT_SECRET_KEY`\n * environment variable set.\n *\n * @augments BaseLLM\n * @augments TencentHunyuanInput\n * @example\n * ```typescript\n * const messages = [new HumanMessage(\"Hello\")];\n *\n * const hunyuanLite = new ChatTencentHunyuan({\n * model: \"hunyuan-lite\",\n * tencentSecretId: \"YOUR-SECRET-ID\",\n * tencentSecretKey: \"YOUR-SECRET-KEY\",\n * });\n *\n * let res = await hunyuanLite.call(messages);\n *\n * const hunyuanPro = new ChatTencentHunyuan({\n * model: \"hunyuan-pro\",\n * temperature: 1,\n * tencentSecretId: \"YOUR-SECRET-ID\",\n * tencentSecretKey: \"YOUR-SECRET-KEY\",\n * });\n *\n * res = await hunyuanPro.call(messages);\n * ```\n */\nexport class ChatTencentHunyuan extends BaseChatTencentHunyuan {\n constructor(fields?: Partial<TencentHunyuanChatInput> & BaseChatModelParams) {\n super({ ...fields, sign });\n }\n}\n\nexport type { TencentHunyuanChatInput } from \"./base.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,IAAa,qBAAb,cAAwCA,aAAAA,mBAAuB;CAC7D,YAAY,QAAiE;AAC3E,QAAM;GAAE,GAAG;GAAQ,MAAA,cAAA;GAAM,CAAC"}