feat: 完成意心ai agent

This commit is contained in:
ccnetcore
2026-01-07 22:25:54 +08:00
parent 00a9bd00e5
commit 40234343ff
19 changed files with 1469 additions and 33 deletions

View File

@@ -75,10 +75,7 @@ public class AnthropicChatCompletionsService(
{
Guid errorId = Guid.NewGuid();
var error = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
logger.LogError("Anthropic非流式对话异常 请求地址:{Address},ErrorId{errorId}, StatusCode: {StatusCode.GetHashCode()} Response: {Response}",
options.Endpoint,
errorId,
response.StatusCode, error);
logger.LogError($"Anthropic非流式对话异常 请求地址:{options.Endpoint},ErrorId{errorId}, StatusCode: {response.StatusCode.GetHashCode()}, Response: {error}");
throw new Exception( $"恭喜你运气爆棚遇到了错误尊享包对话异常StatusCode【{response.StatusCode.GetHashCode()}】ErrorId【{errorId}】");
}
@@ -125,10 +122,7 @@ public class AnthropicChatCompletionsService(
{
Guid errorId = Guid.NewGuid();
var error = await response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
logger.LogError("Anthropic流式对话异常 请求地址:{Address},ErrorId{errorId}, StatusCode: {StatusCode.GetHashCode()} Response: {Response}",
options.Endpoint,
errorId,
response.StatusCode, error);
logger.LogError($"Anthropic流式对话异常 请求地址:{options.Endpoint},ErrorId{errorId}, StatusCode: {response.StatusCode.GetHashCode()}, Response: {error}");
throw new Exception( $"恭喜你运气爆棚遇到了错误尊享包对话异常StatusCode【{response.StatusCode.GetHashCode()}】ErrorId【{errorId}】");
}