Wrapper around Tencent Hunyuan large language models that use the Chat endpoint.

To use you should have the TENCENT_SECRET_ID and TENCENT_SECRET_KEY environment variable set.

Example

const messages = [new HumanMessage("Hello")];

const hunyuanLite = new ChatTencentHunyuan({
model: "hunyuan-lite",
tencentSecretId: "YOUR-SECRET-ID",
tencentSecretKey: "YOUR-SECRET-KEY",
});

let res = await hunyuanLite.call(messages);

const hunyuanPro = new ChatTencentHunyuan({
model: "hunyuan-pro",
temperature: 1,
tencentSecretId: "YOUR-SECRET-ID",
tencentSecretKey: "YOUR-SECRET-KEY",
});

res = await hunyuanPro.call(messages);

Hierarchy (view full)

Implements

  • TencentHunyuanChatInput

Constructors

Properties

model: string = "hunyuan-pro"
streaming: boolean = false
temperature?: number
tencentSecretId?: string
tencentSecretKey?: string
topP?: number

Accessors

Methods

  • Get the identifying parameters for the model

    Returns {
        Model: ModelName;
        model_name: string;
        EnableEnhancement?: boolean;
        Stream?: boolean;
        StreamModeration?: boolean;
        Temperature?: number;
        TopP?: number;
    }

    • Model: ModelName
    • model_name: string
    • Optional EnableEnhancement?: boolean
    • Optional Stream?: boolean
    • Optional StreamModeration?: boolean
    • Optional Temperature?: number
    • Optional TopP?: number

Generated using TypeDoc