Overview

QwenLLMService provides access to Alibaba Cloud’s Qwen language models through an OpenAI-compatible interface. It inherits from OpenAILLMService and supports streaming responses, function calling, and context management, with particularly strong capabilities for Chinese language processing.

Installation

To use Qwen services, install the required dependencies:
pip install "pipecat-ai[qwen]"

Prerequisites

Qwen Account Setup

Before using Qwen LLM services, you need:
  1. Alibaba Cloud Account: Sign up at Alibaba Cloud
  2. API Key: Generate an API key from your Model Studio dashboard
  3. Model Selection: Choose from available Qwen models with multilingual capabilities

Required Environment Variables

  • QWEN_API_KEY: Your Qwen API key for authentication