Skip to content

Commit 1b1d9a4

Browse files
committed
feat: 11.0.0
1 parent 7fe4f76 commit 1b1d9a4

96 files changed

Lines changed: 1956 additions & 176 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/Constant/AppConstant.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ class AppConstant
66
{
77
const APP = 'blog';
88
const APP_NAME = 'ModStartBlog';
9-
const VERSION = '11.0.0';
9+
const VERSION = '11.1.0';
1010
}
1111

module/AdminManager/Docs/release.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## [Unreleased]
2+
3+
- 优化:多语言管理菜单显示优化
4+
5+
---
6+
17
## 1.8.0 调用命令升级,日志优化显示
28

39
- 新增:系统升级调用命令容错处理

module/AdminManager/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
"title": "管理员基础框架",
1414
"version": "1.8.0",
1515
"author": "ModStart",
16-
"modstartVersion": ">=3.3.0",
16+
"modstartVersion": ">=5.0.0",
1717
"description": "提供基于管理员角色、管理员、管理日志基础功能"
1818
}

module/AigcBase/Api/Controller/TaskController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
use Illuminate\Routing\Controller;
66
use Module\Member\Support\MemberLoginCheck;
77

8+
/**
9+
* Class TaskController
10+
* @package Module\AigcBase\Api\Controller
11+
* @Api AIGC基础
12+
*/
813
class TaskController extends Controller implements MemberLoginCheck
914
{
1015

module/AigcBase/Docs/module/content.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,9 @@
2121

2222
> 以上AI驱动需要在后台模块进行自定义安装
2323
24+
25+
## 模块入口
26+
27+
- `/aigc/distribution` AI分发
28+
2429
{ADMIN_MENUS}

module/AigcBase/Docs/release.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
11
## [Unreleased]
22

3+
- 新增:AI对话支持是否推理参数(reasoning),默认非推理模式
4+
- 新增:对话 Provider 新增 chatReasoningEffort() 辅助方法,支持推理强度(none/low/medium/high)配置
5+
- 优化:将中间件检查方式从 class_exists 改为 file_exists,提升系统兼容性
6+
7+
---
8+
9+
## 1.5.0 新增 AigcChatUtil 工具类与模型配置优化
10+
311
- 新增:AigcChatUtil 工具类,支持通过系统配置调用 AI 对话,提供 chat() 和 chatText() 方法
412
- 新增:AigcKeyPoolUtil 新增 configuredChatModelMap() 方法,仅返回已配置的 AI 模型选项
513
- 优化:后台 AI 驱动下拉选项改为仅显示已配置的模型
614
- 优化:chatText() 方法增加 markdown 选项并自动去除 AI 返回内容中的 HTML 标签
715

16+
- 优化:多语言管理菜单显示优化
817
---
918

1019
## 1.4.5 新增支持 systemPrompt 配置,支持系统级提示词设置

module/AigcBase/Provider/AbstractAigcChatProvider.php

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,32 @@ protected function chatPrepare($sessionId, $msg, $option)
8080
'systemPrompt' => null,
8181
// 是否是 Markdown 返回,默认为 false
8282
'markdown' => false,
83-
], $option);;
83+
// 是否推理,默认为非推理模式
84+
'reasoning' => false,
85+
// 推理强度(none|low|medium|high),显式指定时优先于 reasoning 使用
86+
'reasoning_effort' => null,
87+
], $option);
8488
return [
8589
$sessionId,
8690
$msg,
8791
$option,
8892
];
8993
}
9094

95+
/**
96+
* 计算模型推理强度参数值(供 LLMPX 等支持推理的 API 使用)
97+
* 显式指定 reasoning_effort 时直接返回;否则根据是否推理(reasoning)返回 none / high
98+
* @param array $option chatPrepare 处理后的 option
99+
* @return string none|low|medium|high
100+
*/
101+
protected function chatReasoningEffort($option)
102+
{
103+
if (!empty($option['reasoning_effort'])) {
104+
return $option['reasoning_effort'];
105+
}
106+
return empty($option['reasoning']) ? 'none' : 'high';
107+
}
108+
91109
/**
92110
* @param $sessionId string 会话ID
93111
* @param $msg string|array 消息

module/AigcBase/Util/AigcChatUtil.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class AigcChatUtil
1919
* @param array $option 选项
2020
* - driver: 直接指定驱动全名(优先级最高)
2121
* - driverKey: 从配置读取驱动的 config key,默认 AigcBase_AdminDefaultChatDriver
22+
* - reasoning: 是否推理,默认 false(非推理模式)
23+
* - reasoning_effort: 推理强度(none|low|medium|high),显式指定时优先于 reasoning
2224
* @return array Response格式
2325
* @throws BizException
2426
*/

module/AigcBase/Web/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/* @var \Illuminate\Routing\Router $router */
33
$middlewares = [];
4-
if (class_exists(\Module\Member\Middleware\WebAuthMiddleware::class)) {
4+
if (file_exists(base_path('module/Member/Middleware/WebAuthMiddleware.php'))) {
55
$middlewares[] = \Module\Member\Middleware\WebAuthMiddleware::class;
66
}
77
$router->group([

module/AigcBase/config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
"AigcChatXunfei",
3333
"AigcChatZhipuAi"
3434
],
35-
"version": "1.4.5",
36-
"modstartVersion": ">=4.1.0",
35+
"version": "1.5.0",
36+
"modstartVersion": ">=5.0.0",
3737
"author": "ModStart",
3838
"description": "提供AI基础框架包,支持各种模型接入",
3939
"providers": [],

0 commit comments

Comments
 (0)