mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-14 21:02:49 +00:00
perf: 无法再AI机器人页面看到模型的问题
This commit is contained in:
parent
213ab8418b
commit
51e8f9555e
@ -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默认模型
|
||||
*
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user