mirror of
https://github.com/linux-do/new-api.git
synced 2025-11-14 01:43:44 +08:00
feat: 初步兼容midjourney-proxy-plus
This commit is contained in:
@@ -11,6 +11,13 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func MidjourneyErrorWrapper(code int, desc string) *dto.MidjourneyResponse {
|
||||
return &dto.MidjourneyResponse{
|
||||
Code: code,
|
||||
Description: desc,
|
||||
}
|
||||
}
|
||||
|
||||
// OpenAIErrorWrapper wraps an error into an OpenAIErrorWithStatusCode
|
||||
func OpenAIErrorWrapper(err error, code string, statusCode int) *dto.OpenAIErrorWithStatusCode {
|
||||
text := err.Error()
|
||||
|
||||
Reference in New Issue
Block a user