perf: 更新 AI 支持更多模型和支持提示词

This commit is contained in:
kuaifan
2024-11-29 21:11:16 +08:00
parent 61b1206091
commit 0d4b005f4e
10 changed files with 371 additions and 267 deletions

View File

@@ -957,7 +957,8 @@ class DialogController extends AbstractController
* @apiGroup dialog
* @apiName msg__stream
*
* @apiParam {Number} dialog_id 对话ID
* @apiParam {String} [type] 消息类型(暂时无用,预留)
* - ai: 默认
* @apiParam {Number} userid 通知会员ID
* @apiParam {String} stream_url 流动消息地址
*
@@ -967,7 +968,6 @@ class DialogController extends AbstractController
*/
public function msg__stream()
{
// $dialog_id = intval(Request::input('dialog_id'));
$userid = intval(Request::input('userid'));
$stream_url = trim(Request::input('stream_url'));
//
@@ -975,6 +975,8 @@ class DialogController extends AbstractController
return Base::retError('参数错误');
}
//
$stream_url = '/ai' . preg_replace('/^\/ai/?', '/', $stream_url);
//
$params = [
'userid' => $userid,
'msg' => [