wpmind/includes/Providers/Moonshot/MoonshotProvider.php
LinuxJoy adb6c49301 style: phpcbf 自动格式化 — 全量 WPCS 3.x 规范对齐
135 文件 19,211 处自动修复:空格→Tab 缩进、括号间距、
函数声明空格、前置自增、尾逗号等纯格式化改动。
零逻辑变更,php -l + token 级对比验证通过。

新增 phpcs.xml.dist / phpstan.neon.dist 项目配置。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 00:48:46 +08:00

64 lines
1.2 KiB
PHP

<?php
/**
* Moonshot (Kimi) Provider
*
* @package WPMind
* @since 1.3.0
*/
declare(strict_types=1);
namespace WPMind\Providers\Moonshot;
use WPMind\Providers\AbstractOpenAiCompatibleProvider;
use WordPress\AiClient\Providers\Contracts\ModelMetadataDirectoryInterface;
/**
* Moonshot (Kimi) AI Provider
*
* @since 1.3.0
*/
class MoonshotProvider extends AbstractOpenAiCompatibleProvider {
/**
* {@inheritDoc}
*/
protected static function baseUrl(): string {
return 'https://api.moonshot.cn/v1';
}
/**
* {@inheritDoc}
*/
protected static function providerId(): string {
return 'moonshot';
}
/**
* {@inheritDoc}
*/
protected static function providerName(): string {
return 'Moonshot (Kimi)';
}
/**
* {@inheritDoc}
*/
protected static function credentialsUrl(): ?string {
return 'https://platform.moonshot.cn/console/api-keys';
}
/**
* {@inheritDoc}
*/
protected static function textGenerationModelClass(): string {
return MoonshotTextGenerationModel::class;
}
/**
* {@inheritDoc}
*/
protected static function createModelMetadataDirectory(): ModelMetadataDirectoryInterface {
return new MoonshotModelMetadataDirectory();
}
}