mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-18 20:30:51 +08:00
Enhance Gemini request handling for contents support and improve error logging
- Added conditional logic to process `contents` in Gemini request templates, ensuring fallback behavior. - Introduced detailed debug logs for quota errors and request issues. - Updated handling of `rawJson` to construct templates more dynamically.
This commit is contained in:
@@ -242,6 +242,7 @@ func FixCLIToolResponse(input string) (string, error) {
|
||||
// Extract the contents array which contains the conversation messages
|
||||
contents := parsed.Get("request.contents")
|
||||
if !contents.Exists() {
|
||||
// log.Debugf(input)
|
||||
return input, fmt.Errorf("contents not found in input")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user