mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-12-26 17:55:58 +08:00
feat: Refactor vision message handling and increase commit short SHA length
- Increase the length of the commit short SHA from 8 to 7 characters - Update relay-aiproxy.go to handle multiple content types in the last message - Refactor and modify countVisonTokenMessages function in relay-utils.go to handle different content types and update token counts accordingly - Update VisionMessage struct in relay.go to have Content as a slice of OpenaiVisionMessageContent
This commit is contained in:
@@ -19,9 +19,9 @@ type Message struct {
|
||||
}
|
||||
|
||||
type VisionMessage struct {
|
||||
Role string `json:"role"`
|
||||
Content OpenaiVisionMessageContent `json:"content"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Role string `json:"role"`
|
||||
Content []OpenaiVisionMessageContent `json:"content"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
}
|
||||
|
||||
// OpenaiVisionMessageContentType vision message content type
|
||||
|
||||
Reference in New Issue
Block a user