refactor: Enhance Claude response handling

This commit is contained in:
1808837298@qq.com
2025-03-16 19:11:58 +08:00
parent b3b1c803fc
commit 53b3599827
4 changed files with 74 additions and 64 deletions

View File

@@ -26,7 +26,7 @@ type OpenAITextResponse struct {
Object string `json:"object"`
Created int64 `json:"created"`
Choices []OpenAITextResponseChoice `json:"choices"`
Error *OpenAIError `json:"error"`
Error *OpenAIError `json:"error,omitempty"`
Usage `json:"usage"`
}