Skip to content

feat: add Qiniu provider support#2777

Open
JackChiang233 wants to merge 3 commits intozhayujie:masterfrom
JackChiang233:feat/add-qiniu-provider
Open

feat: add Qiniu provider support#2777
JackChiang233 wants to merge 3 commits intozhayujie:masterfrom
JackChiang233:feat/add-qiniu-provider

Conversation

@JackChiang233
Copy link
Copy Markdown

Summary

Added support for Qiniu AI (七牛云) as a new model provider. This integration allows users to utilize Qiniu's LLM infrastructure within the framework.

Changes Made

  • config.py - Added Qiniu API Key and Base configurations and mapped them to environment variables, enabling the system to configure and use Qiniu MaaS services.

  • bridge\agent_bridge.py`bridge\bridge.py` - Added an exact matching rule for Qiniu's default model to ensure that requests for this model are directly routed to the Qiniu provider.

  • channel\web\web_channel.py - Integrate Qiniu Cloud into the unified provider configuration system, making it visible, configurable, and savable in the web configuration page.

  • common\const.py - Add new Qiniu-related constants and register a default model as a globally unified identifier to support Qiniu provider access and routing.

  • models\bot_factory.py - Register the Qiniu branch in the Bot factory to ensure that the QINIU type can be correctly instantiated as a Qiniu Bot implementation.

  • models\qiniu\qiniu_bot.py \ models\qiniu\qiniu_session.py - Implement Qiniu dialogue invocation and session management (API requests + context trimming) to improve the actual operational capabilities of the Qiniu provider.

  • plugins\cow_cli\cow_cli.py - Added Qiniu model recognition logic to the CLI, enabling automatic matching of the Qiniu provider when the default Qiniu model is selected.

  • plugins\godcmd\godcmd.py - const.QINIU has been added to the whitelist of models set to #resetall.

Testing

python -m unittest tests.test_qiniu_provider -v		#OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants