mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-15 14:51:19 -08:00
- 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.
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| _logging.py | ||
| _tokenizer.py | ||
| run.py | ||
| stubs.py | ||