feat: support gpt-4 with vision (#683, #714)

This commit is contained in:
JustSong
2023-11-19 18:38:54 +08:00
parent 76f9288c34
commit 495fc628e4
10 changed files with 56 additions and 17 deletions

View File

@@ -48,7 +48,7 @@ type AIProxyLibraryStreamResponse struct {
func requestOpenAI2AIProxyLibrary(request GeneralOpenAIRequest) *AIProxyLibraryRequest {
query := ""
if len(request.Messages) != 0 {
query = request.Messages[len(request.Messages)-1].Content
query = request.Messages[len(request.Messages)-1].StringContent()
}
return &AIProxyLibraryRequest{
Model: request.Model,