Download src/runtime/provider.py from DiabetesCareChatbot/dmChatbotBackend: direct link, hf CLI and curl.
- Browser
- Download file 540 Bytes
-
https://huggingface.co/spaces/DiabetesCareChatbot/dmChatbotBackend/resolve/main/src/runtime/provider.py
- Command line
-
hf download hf://spaces/DiabetesCareChatbot/dmChatbotBackend/src/runtime/provider.py
-
curl -L -o provider.py https://huggingface.co/spaces/DiabetesCareChatbot/dmChatbotBackend/resolve/main/src/runtime/provider.py
540 Bytes
| from __future__ import annotations | |
| from src.core.model_manager import model_manager | |
| def set_model_provider(provider_name: str) -> None: | |
| """Set the provider used by newly created Manager and Worker runtimes.""" | |
| normalized = provider_name.strip().lower() | |
| if normalized: | |
| model_manager.select_model(normalized, None) | |
| def set_model_selection(provider_name: str, model_name: str = None) -> None: | |
| """Set the provider and model used by newly created agents.""" | |
| model_manager.select_model(provider_name, model_name) | |