cnllm

Python toolkit for Chinese LLMs, with flexible batch capacity, structured real-time visulization and automated accumulation for streaming, and explicit feedback

What is cnllm?

Python toolkit for Chinese LLMs, with flexible batch capacity, structured real-time visulization and automated accumulation for streaming, and explicit feedback on vendor-native parameter validation.

Overview of cnllm

What it is

CNLLM is a Python toolkit that provides a unified OpenAI-compatible interface layer for Chinese large language models. It includes enhanced tools to simplify development workflows, allowing developers to use Chinese LLMs within mainstream frameworks built on the OpenAI ecosystem, such as LangChain, LlamaIndex, AutoGen, Haystack, and DeepEval. The toolkit aims to reduce adaptation, implementation, and maintenance effort, particularly in multi-model collaboration scenarios, and to lower token consumption during AI agent development.

Key features

  • Unified interface: a single set of interfaces and parameters to call different Chinese LLMs, returning OpenAI API standard responses - Parameter validation: validates all parameters with explicit feedback, including vendor-native parameters, and supports parameter handling behavior control (drop_params)
  • Streaming response: provides streaming lifecycle monitoring via repr(), and incremental field access via .still, .think, and .tools properties with automated accumulation - Batch capability: supports independent configuration for individual requests within batch tasks, real-time batch progress statistics (.status), configurable failure strategy (stop_on_error), and memory management (keep)

Use cases

CNLLM is suitable for developers who need to integrate Chinese LLMs into applications built on the OpenAI ecosystem. It is especially useful in scenarios requiring multi-model collaboration, where it can simplify adapter parsing, reduce implementation and maintenance effort, and decrease token consumption. Use cases include building chat applications, embedding generation, and managing batch or streaming interactions with multiple Chinese LLM providers.

Getting started

Install as an Agent Skill (recommended): bash npx skills add kanchengw/cnllm-skill Or install via pip: bash pip install cnllm For SDK initialization and usage examples, see the repository README.

License and pricing

Licensed under Apache-2.0. The project is open source and free to use; pricing is not applicable.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/kanchengwcnllm.svg)](https://yunodb.com/tools/kanchengwcnllm?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/kanchengwcnllm?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/kanchengwcnllm.svg" alt="Featured on YunoDB" height="20"></a>