Skip to main content
Tongyi Qwen is a large language model developed by Alibaba’s Damo Academy. It is capable of understanding user intent through natural language understanding and semantic analysis, based on user input in natural language. It provides services and assistance to users in different domains and tasks. By providing clear and detailed instructions, you can obtain results that better align with your expectations. In this notebook, we will introduce how to use langchain with Tongyi mainly in Chat corresponding to the package langchain/chat_models in langchain

Tool Calling

ChatTongyi supports tool calling API that lets you describe tools and their arguments, and have the model return a JSON object with a tool to invoke and the inputs to that tool.

Use with bind_tools

Construct args manually

Partial Mode

Enable the large model to continue generating content from the initial text you provide.

Tongyi With Vision

Qwen-VL(qwen-vl-plus/qwen-vl-max) are models that can process images.