Overview
This node integrates with Alibaba's Qwen language models to generate chat completions. It allows users to interact with the Qwen 3 235B model via a proxy API, supporting both regular text-to-text conversations and search-enhanced chats. This node is useful for automating conversational AI tasks such as customer support, content generation, or any scenario requiring natural language understanding and generation.
Practical examples:
- Building a chatbot that answers user queries using the Qwen model.
- Enhancing customer service workflows by generating dynamic responses.
- Using the search chat type to incorporate external information retrieval during conversations.
Properties
| Name | Meaning |
|---|---|
| Connect this node to an AI Chain or AI Agent | Informational notice guiding users to connect this node to an AI Chain or AI Agent. |
| Model | The specific Qwen model to use for generating completions. Currently supports "Qwen 3 235B". |
| Chat Type | The type of chat interaction: - Text to Text: Regular text-based conversation. - Search: Enables search capabilities during chat. |
| Options | Additional configuration options: - Maximum Number of Tokens: Limits tokens generated (max 8192). - Sampling Temperature: Controls randomness (0–1). - Chat Mode: Normal or Expert mode for response detail. - Timeout: Max request time in milliseconds. - Max Retries: Number of retry attempts on failure. |
Output
The node outputs an object containing a response property, which holds an instance of the Qwen chat model client configured with the specified parameters. This output can be used downstream to invoke chat completions or bind tools as needed.
No direct JSON chat completion results are returned by default from the execute() method; instead, the node prepares and supplies the configured model instance for further use.
There is no binary data output.
Dependencies
- Requires an API key credential for accessing the Qwen proxy API.
- Depends on the
@langchain/openaipackage (version >= 0.3.0) for the ChatOpenAI class implementation. - The base URL for the API must be provided in the credentials.
- Node environment should allow network access to the Qwen API endpoint.
Troubleshooting
- Missing API Key: If the API key is not found in credentials, the node throws an error indicating the missing key. Ensure the API key is correctly set up in the node credentials.
- Model Methods Missing: If essential methods (
invoke,bind,bindTools) are missing from the model instance, it indicates an outdated or incompatible version of the@langchain/openaipackage. Update this package to version 0.3.0 or higher. - Timeouts and Retries: Long-running requests may timeout based on the configured timeout value. Adjust the timeout and max retries options if you encounter frequent timeouts or failures.
- Incorrect Base URL: Ensure the base URL in credentials points to the correct Qwen proxy API endpoint.
Links and References
- Qwen GitHub Repository
- Documentation for
@langchain/openaipackage (check npm or official docs for latest usage)