feat: Add ContextKeyLocalCountTokens and update ResponseText2Usage to use context in multiple channels

This commit is contained in:
CaIon
2025-11-21 18:16:40 +08:00
parent 9b6b8d0eb8
commit c8bbf7bed8
17 changed files with 96 additions and 127 deletions
+1
View File
@@ -16,6 +16,7 @@ import (
"golang.org/x/image/webp"
)
// return image.Config, format, clean base64 string, error
func DecodeBase64ImageData(base64String string) (image.Config, string, string, error) {
// 去除base64数据的URL前缀(如果有)
if idx := strings.Index(base64String, ","); idx != -1 {