perf: 无法再AI机器人页面看到模型的问题

This commit is contained in:
kuaifan 2025-02-25 11:37:51 +08:00
parent 213ab8418b
commit 51e8f9555e
2 changed files with 22 additions and 1 deletions

View File

@ -323,6 +323,27 @@ class SystemController extends AbstractController
return Base::retSuccess('success', $setting ?: json_decode('{}'));
}
/**
* @api {get} api/system/setting/aibot_models 05. 获取AI模型
*
* @apiDescription 获取所有AI机器人模型设置
* @apiVersion 1.0.0
* @apiGroup system
* @apiName aibot_models
*
* @apiSuccess {Number} ret 返回状态码1正确、0错误
* @apiSuccess {String} msg 返回信息(错误描述)
* @apiSuccess {Object} data 返回数据
*/
public function setting__aibot_models()
{
$setting = Base::setting('aibotSetting');
$setting = array_filter($setting, function($value, $key) {
return str_ends_with($key, '_models') || str_ends_with($key, '_model');
}, ARRAY_FILTER_USE_BOTH);
return Base::retSuccess('success', $setting ?: json_decode('{}'));
}
/**
* @api {get} api/system/setting/aibot_defmodels 05. 获取AI默认模型
*

View File

@ -462,7 +462,7 @@ export default {
// AI
getAITags() {
this.$store.dispatch("call", {
url: 'system/setting/aibot',
url: 'system/setting/aibot_models',
}).then(({data}) => {
this.handleAITags(data);
});