refactor: Change ClaudeError field type to non-pointer and enhance response handling with reasoning content

This commit is contained in:
1808837298@qq.com
2025-03-14 17:48:26 +08:00
parent 69e44a03b1
commit 19bfa158cc
2 changed files with 10 additions and 2 deletions

View File

@@ -183,7 +183,7 @@ type ClaudeResponse struct {
Completion string `json:"completion,omitempty"`
StopReason string `json:"stop_reason,omitempty"`
Model string `json:"model,omitempty"`
Error *ClaudeError `json:"error,omitempty"`
Error ClaudeError `json:"error,omitempty"`
Usage *ClaudeUsage `json:"usage,omitempty"`
Index *int `json:"index,omitempty"`
ContentBlock *ClaudeMediaMessage `json:"content_block,omitempty"`