gpt4free/g4f/api
hlohaus da6506707b feat: Improve handling of media and API response structures
- Added validation for `media` parameter in `MarkItDown` class to raise `ValueError` if `media` is not provided.
- Included a check for `has_markitdown` in `MarkItDown` class to raise `ImportError` if `markitdown` is not installed.
- Refactored API response structure by defining `responses` as a reusable dictionary in `g4f/api/__init__.py`.
- Updated `/v1/chat/completions` endpoint to include a new parameter `conversation_id` in the `chat_completions` function.
- Enhanced logic in `chat_completions` to set `conversation_id` from configuration or function input.
- Added a new endpoint `/api/{provider}/{conversation_id}/chat/completions` in `g4f/api/__init__.py` to handle chat completions with `conversation_id`.
- Replaced duplicate response dictionary definitions with the reusable `responses` dictionary in the `/api/{provider}/chat/completions` and `/v1/chat/completions` endpoints.
2025-04-27 01:10:05 +02:00
..
__init__.py feat: Improve handling of media and API response structures 2025-04-27 01:10:05 +02:00
_logging.py Improve logging implementation (#2347) 2024-11-15 07:38:51 +01:00
_tokenizer.py ~ | improve compatibility with lower python versions 2023-11-19 22:59:18 +00:00
run.py Add workers and use_colors options to api 2024-04-20 15:41:49 +02:00
stubs.py Set return_conversation to True 2025-04-26 23:10:06 +02:00