mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-10-16 05:10:49 +08:00
feat: Update environment variables and modify model mappings
- Added `OPENROUTER_API_KEY` and `AZURE_API_KEYS` to `example.env`. - Updated `AZURE_DEFAULT_MODEL` to "model-router" in `example.env`. - Added `AZURE_ROUTES` with multiple model URLs in `example.env`. - Changed the mapping for `"phi-4-multimodal"` in `DeepInfraChat.py` to `"microsoft/Phi-4-multimodal-instruct"`. - Added `media` parameter to `GptOss.create_completion` method and raised a `ValueError` if `media` is provided. - Updated `model_aliases` in `any_model_map.py` to include new mappings for various models. - Removed several model aliases from `PollinationsAI` in `any_model_map.py`. - Added new models and updated existing models in `model_map` across various files, including `any_model_map.py` and `__init__.py`. - Refactored `AnyModelProviderMixin` to include `model_aliases` and updated the logic for handling model aliases.
This commit is contained in:
@@ -127,6 +127,7 @@ class Backend_Api(Api):
|
||||
except MissingAuthError as e:
|
||||
return jsonify({"error": {"message": f"{type(e).__name__}: {e}"}}), 401
|
||||
except Exception as e:
|
||||
logger.exception(e)
|
||||
return jsonify({"error": {"message": f"{type(e).__name__}: {e}"}}), 500
|
||||
return jsonify(response)
|
||||
|
||||
|
Reference in New Issue
Block a user