change
This commit is contained in:
@@ -33,7 +33,6 @@ namespace TechHelper.Client.AI
|
||||
string content = response.Choices[0].Message?.Content;
|
||||
if (!string.IsNullOrEmpty(content))
|
||||
{
|
||||
// 移除 <think>...</think> 标签及其内容
|
||||
int startIndex = content.IndexOf("<think>");
|
||||
int endIndex = content.IndexOf("</think>");
|
||||
if (startIndex != -1 && endIndex != -1 && endIndex > startIndex)
|
||||
@@ -46,11 +45,11 @@ namespace TechHelper.Client.AI
|
||||
}
|
||||
catch (HttpRequestException ex)
|
||||
{
|
||||
Console.WriteLine($"API 请求错误:{ex.Message}");
|
||||
throw;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"发生未知错误:{ex.Message}");
|
||||
throw;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user