v1.2修复优化

This commit is contained in:
canglan committed 2026-05-08 10:05:31 +08:00
1 parent 80b71a973a
commit 4cf6bd4b4b
12 files changed
+238 -128

No files matched your search

+4 -1
View File
@@ -84,6 +84,9 @@ class ChatController
ob_end_flush();
}
// 使用供应商配置中的 type 字段确定实际驱动
$providerType = $providerConfig['type'] ?? 'newapi';
$options = [
'provider' => $providerConfig,
'systemPrompt' => $systemPrompt,
@@ -91,7 +94,7 @@ class ChatController
];
try {
AIService::streamChat($providerKey, $model, $messages, $options, function ($chunk, $type = 'content') {
AIService::streamChat($providerType, $model, $messages, $options, function ($chunk, $type = 'content') {
if ($type === 'thinking') {
self::sendSSE(['thinking' => $chunk]);
} else {