feat: Introduce JSON decoding utility functions and update error handling in Claude and OpenAI response structures

This commit is contained in:
1808837298@qq.com
2025-03-16 18:34:39 +08:00
parent a4a40c495d
commit b3b1c803fc
6 changed files with 39 additions and 14 deletions

View File

@@ -165,8 +165,8 @@ func (c *ClaudeRequest) ParseSystem() []ClaudeMediaMessage {
}
type ClaudeError struct {
Type string `json:"type"`
Message string `json:"message"`
Type string `json:"type,omitempty"`
Message string `json:"message,omitempty"`
}
type ClaudeErrorWithStatusCode struct {