Browse Source
openai: allow openai endpoint to accept webp images (#11412)
Co-authored-by: Richard Lyons <frob@cloudstaff.com>
mxyng/quant
frob
9 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
openai/openai.go
|
|
|
@ -423,7 +423,7 @@ func fromChatRequest(r ChatCompletionRequest) (*api.ChatRequest, error) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
types := []string{"jpeg", "jpg", "png"} |
|
|
|
types := []string{"jpeg", "jpg", "png", "webp"} |
|
|
|
valid := false |
|
|
|
for _, t := range types { |
|
|
|
prefix := "data:image/" + t + ";base64," |
|
|
|
|