adachsoft/ai-integration-moonshot
最新稳定版本:v1.0.1
Composer 安装命令:
composer require adachsoft/ai-integration-moonshot
包简介
Moonshot provider for adachsoft/ai-integration tool-calling API
README 文档
README
Moonshot provider for adachsoft/ai-integration tool-calling API.
Installation
composer require adachsoft/ai-integration-moonshot
Usage
use AdachSoft\AiIntegration\PublicApi\Builder\ToolCallingChatFacadeBuilder;
use AdachSoft\AiIntegrationMoonshot\MoonshotProvider;
$builder = ToolCallingChatFacadeBuilder::create();
MoonshotProvider::register($builder, getenv('MOONSHOT_API_KEY'));
$facade = $builder->build();
// Use $facade with your ToolCallingChatRequest DTO where you select the model id.
Production tests
Production tests use environment variables loaded from system env and .env files via vlucas/phpdotenv.
Environment variables:
MOONSHOT_API_KEY- required Moonshot API key.MOONSHOT_MODEL- optional non-thinking model override (default:moonshot-v1-8k).MOONSHOT_THINKING_MODEL- optional thinking model override (default:kimi-k2-thinking).
Run production tests:
vendor/bin/phpunit --group production tests/Production
For thinking models, pass reasoning_content from the previous assistant response using metadata['reasoning_content'] when building the next assistant message. The library forwards this value in payload messages and does not persist conversation history by itself.
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-23