Wrapper around Ali Tongyi large language models that use the Chat endpoint.

To use you should have the ALIBABA_API_KEY environment variable set.

const qwen = new ChatAlibabaTongyi({
alibabaApiKey: "YOUR-API-KEY",
});

const qwen = new ChatAlibabaTongyi({
model: "qwen-turbo",
temperature: 1,
alibabaApiKey: "YOUR-API-KEY",
});

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

await qwen.call(messages);

Hierarchy (view full)

Implements

  • AlibabaTongyiChatInput

Constructors

Constructors