HuggingFaceAPI.py 516 B

12345678910111213141516
  1. from __future__ import annotations
  2. from .OpenaiAPI import OpenaiAPI
  3. from .HuggingChat import HuggingChat
  4. class HuggingFaceAPI(OpenaiAPI):
  5. label = "HuggingFace (Inference API)"
  6. url = "https://api-inference.huggingface.co"
  7. login_url = "https://huggingface.co/settings/tokens"
  8. api_base = "https://api-inference.huggingface.co/v1"
  9. working = True
  10. default_model = "meta-llama/Llama-3.2-11B-Vision-Instruct"
  11. default_vision_model = default_model
  12. models = [
  13. *HuggingChat.models
  14. ]