优化:AI小助手在线列表样式改为与普通用户一致
This commit is contained in:
@@ -133,7 +133,11 @@ PROMPT;
|
||||
{
|
||||
$startTime = microtime(true);
|
||||
$apiKey = $config->getDecryptedApiKey();
|
||||
$endpoint = rtrim($config->api_endpoint, '/').'/v1/chat/completions';
|
||||
// 智能拼接 URL:如果端点已包含 /v1,则只追加 /chat/completions
|
||||
$base = rtrim($config->api_endpoint, '/');
|
||||
$endpoint = str_ends_with($base, '/v1')
|
||||
? $base.'/chat/completions'
|
||||
: $base.'/v1/chat/completions';
|
||||
|
||||
try {
|
||||
$response = Http::withToken($apiKey)
|
||||
|
||||
Reference in New Issue
Block a user