Refactor multiple flows to enhance performance, boost scalability, and ensure stability.#131
Refactor multiple flows to enhance performance, boost scalability, and ensure stability.#131luuquangvu wants to merge 255 commits intoNativu5:mainfrom
Conversation
…to better handle heavy tasks
… client status checks
…probabilities, and token details; adjust response handling accordingly.
…tput_text` validator, rename `created` to `created_at`, and update response handling accordingly.
…roved streaming of response items. Refactor image generation handling for consistency and add compatibility with output content.
…t` and ensure consistent initialization in image output handling.
…anagement Add dedicated router for /images endpoint and refactor image handling logic for better modularity. Enhance temporary image management with secure naming, token verification, and cleanup functionality.
…l and refactor variable handling
…y` for tools, tool_choice, and streaming settings
…nd update response handling for consistency
…mat for compatibility
…ck to default size
…andling, and improved extension determination
- Introduced `model_strategy` configuration for "append" (default + custom models) or "overwrite" (custom models only). - Enhanced `/v1/models` endpoint to return models based on the configured strategy. - Improved model loading with environment variable overrides and validation. - Refactored model handling logic for improved modularity and error handling.
…eld support - Enhanced `extract_gemini_models_env` to handle nested fields within environment variables. - Updated type hints for more flexibility in model overrides. - Improved `_merge_models_with_env` to better support field-level updates and appending new models.
|
Using latest image it seems to not support multi turn conversation am I right? Every message I send it forget the older one |
|
Also the new Gemini-api support having the model pulled from Gemini and not hard coded, it could be a good enhancement |
I don't know how you tested it, but it works fine for me. Note that to keep conversations running continuously through restarts, you need to enable Gemini Activities. |
|
Gemini activity is enabled, but I think it is using temporary chat (the best option to not saturate my chat history with all the users request) I think it should work regardless the original code worked |
|
The library's author is preparing to release a major 2.0 update. Therefore, this PR will also have to wait for it, as some features are being developed based on the latest code from the library. |
This PR is still a work in progress and uses features that aren't yet officially available in the Gemini-API library, so we'll need to wait for the library's official update before merging. Feel free to try it out and share any feedback or report any issues you encounter. Thanks!
Here are some highlights of the changes: