feat: Add GEMINI_VISION_MAX_IMAGE_NUM configuration

- Introduced `GEMINI_VISION_MAX_IMAGE_NUM` to README files for better user guidance.
- Updated `env.go` to retrieve the maximum image number from environment variables, defaulting to 16.
- Modified image handling logic in `relay-gemini.go` to respect the new configuration, allowing disabling of the limit by setting it to -1.
- Removed hardcoded constant for maximum image number in `constant.go` to streamline configuration management.
This commit is contained in:
CalciumIon
2024-12-20 21:36:23 +08:00
parent c289694fe8
commit f9a7f6085e
5 changed files with 8 additions and 7 deletions

View File

@@ -1,9 +1,5 @@
package gemini
const (
GeminiVisionMaxImageNum = 16
)
var ModelList = []string{
// stable version
"gemini-1.5-pro", "gemini-1.5-flash", "gemini-1.5-flash-8b",