Add GeminiGetHandler, enhance Gemini functionality, and enable token counting
- Added `GeminiGetHandler` for handling GET requests with extended Gemini model support. - Introduced `geminiCountTokens` function to calculate token usage. - Refactored `APIRequest` and related methods to support `alt` parameter for enhanced flexibility. - Updated routes and request processing to integrate new handler and functions.
This commit is contained in:
@@ -77,6 +77,7 @@ func (s *Server) setupRoutes() {
|
||||
{
|
||||
v1beta.GET("/models", s.handlers.GeminiModels)
|
||||
v1beta.POST("/models/:action", s.handlers.GeminiHandler)
|
||||
v1beta.GET("/models/:action", s.handlers.GeminiGetHandler)
|
||||
}
|
||||
|
||||
// Root endpoint
|
||||
|
||||
Reference in New Issue
Block a user