Add system instruction support and enhance internal API handlers

- Introduced `SystemInstruction` field in `PrepareRequest` and `GenerateContentRequest` for better message parsing.
- Updated `SendMessage` and `SendMessageStream` to handle system instructions in client API calls.
- Enhanced error handling and manual flushing logic in response flows.
- Added new internal API endpoints `/v1internal:generateContent` and `/v1internal:streamGenerateContent`.
- Improved proxy handling and transport logic in HTTP client initialization.
This commit is contained in:
Luis Pater
2025-07-10 05:16:54 +08:00
parent 65f47c196a
commit 273e1d9cbe
5 changed files with 442 additions and 35 deletions

View File

@@ -81,6 +81,8 @@ func (s *Server) setupRoutes() {
},
})
})
s.engine.POST("/v1internal:method", s.handlers.Internal)
}
// Start begins listening for and serving HTTP requests.