Add error message for non 2XX status codes

This commit is contained in:
kardolus
2023-10-18 10:46:18 -04:00
parent c6e6f54832
commit 9663b7586d
5 changed files with 82 additions and 7 deletions

View File

@@ -41,3 +41,11 @@ type Data struct {
FinishReason string `json:"finish_reason"`
} `json:"choices"`
}
type ErrorResponse struct {
Error struct {
Message string `json:"message"`
Type string `json:"type"`
Code string `json:"code"`
} `json:"error"`
}