gpt4free/g4f/tools
hlohaus c0d31c2abb refactor: improve media rendering and response formatting with precise changes
- Modified g4f/providers/response.py to ensure format_images_markdown returns the result directly without additional flags in the 'format_images_markdown' function.
- Updated g4f/gui/server/api.py to add 'tempfiles' parameter with default empty list to '_create_response_stream' method.
- Changed or added code in API response handling to iterate over 'tempfiles' and attempt to remove each file after response completion, with exception handling (try-except block with logger.exception).
- Adjusted g4f/Tools/files.py to fix tempfile creation: corrected the 'suffix' parameter in 'get_tempfile' to use 'suffix' directly instead of splitting.
- In g4f/tools/media.py, changed 'render_part' function to handle 'text' key properly, checking 'part.get("text")' and returning a dictionary with 'type': 'text' and 'text': value, if present.
2025-05-19 08:15:21 +02:00
..
__init__.py Update __init__.py 2025-01-01 15:00:56 +01:00
files.py refactor: improve media rendering and response formatting with precise changes 2025-05-19 08:15:21 +02:00
media.py refactor: improve media rendering and response formatting with precise changes 2025-05-19 08:15:21 +02:00
run_tools.py feat: improve file handling and streamline provider implementations 2025-04-08 19:00:44 +02:00
web_search.py refactor: improve image response handling, adjust aspect ratio defaults, and fix filename construction 2025-05-18 04:51:46 +02:00