chore: 添加静态资源文件和版本配置文件

添加大量图片、字体、音频等静态资源文件,包括用户界面图片、模板文件和安装界面素材
添加系统版本配置文件(.version)和常量定义文件(.constant)
更新供应商依赖文件,包括Symfony VarDumper组件和相关许可证文件
添加验证码配置文件(captcha.php)和.gitignore规则
This commit is contained in:
2026-03-06 20:14:23 +08:00
commit c9a98f342c
4485 changed files with 490986 additions and 0 deletions

39
crmeb/services/ai/Ai.php Normal file
View File

@@ -0,0 +1,39 @@
<?php
namespace crmeb\services\ai;
use crmeb\basic\BaseManager;
use crmeb\services\AccessTokenServeService;
use think\Container;
use think\facade\Config;
class Ai extends BaseManager
{
/**
* 空间名
* @var string
*/
protected string $namespace = '\\crmeb\\services\\ai\\storage\\';
protected function getDefaultDriver()
{
return Config::get('ai.default', 'ai');
}
protected function invokeClass($class)
{
if (!class_exists($class)) {
throw new \RuntimeException('class not exists: ' . $class);
}
$this->getConfigFile();
if (!$this->config) {
$this->config = Config::get($this->configFile . '.stores.' . $this->name, []);
}
$handleAccessToken = new AccessTokenServeService($this->config['access_key'] ?? '', $this->config['secret_key'] ?? '');
$handle = Container::getInstance()->invokeClass($class, [$this->name, $handleAccessToken, $this->configFile]);
$this->config = [];
return $handle;
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace crmeb\services\ai\storage;
use crmeb\basic\BaseAi;
class Ai extends BaseAi
{
const CONVERSATION = 'v2/chat/conversation';
const CHAT = 'v2/chat/chat';
protected function initialize(array $config = [])
{
parent::initialize($config);
}
public function chat(string $systemContent, string $userContent)
{
$param['messages'] = [
[
'role' => 'system',
'content' => $systemContent
],
[
'role' => 'user',
'content' => $userContent
]
];
$param['max_tokens'] = '4096';
$param['temperature'] = '1';
$param['frequency_penalty'] = '0';
$param['presence_penalty'] = '0';
$param['model'] = 'deepseek-chat';
$param['response_format'] = '{ "type": "json_object" }';
$result = $this->accessToken->httpRequest(self::CHAT, $param);
return str_replace(['```json', '```'], '', $result['data']['choices'][0]['message']['content']);
}
}