代码提交同步

This commit is contained in:
wong
2025-09-13 10:45:32 +08:00
parent a2a0cb8461
commit cc432ba18f
10 changed files with 8043 additions and 131 deletions

View File

@@ -2,6 +2,7 @@
namespace app\ai\controller;
use app\common\util\JwtUtil;
use think\facade\Env;
class DouBaoAI
@@ -31,12 +32,17 @@ class DouBaoAI
{
$this->__init();
$content = input('content','');
if (empty($content)){
return json_encode(['code' => 500, 'msg' => '提示词缺失']);
}
// 发送请求
$params = [
'model' => 'doubao-1-5-pro-32k-250115',
'messages' => [
['role' => 'system', 'content' => '你是人工智能助手.'],
['role' => 'user', 'content' => '厦门天气'],
['role' => 'user', 'content' => $content],
],
/*'extra_headers' => [
'x-is-encrypted' => true