__init__.py 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. from __future__ import annotations
  2. from ..providers.types import BaseProvider, ProviderType
  3. from ..providers.retry_provider import RetryProvider, IterListProvider
  4. from ..providers.base_provider import AsyncProvider, AsyncGeneratorProvider
  5. from ..providers.create_images import CreateImagesProvider
  6. from .deprecated import *
  7. from .selenium import *
  8. from .needs_auth import *
  9. from .not_working import *
  10. from .local import *
  11. from .hf_space import HuggingSpace
  12. from .Airforce import Airforce
  13. from .AmigoChat import AmigoChat
  14. from .Blackbox import Blackbox
  15. from .BlackboxCreateAgent import BlackboxCreateAgent
  16. from .ChatGpt import ChatGpt
  17. from .ChatGptEs import ChatGptEs
  18. from .ClaudeSon import ClaudeSon
  19. from .Cloudflare import Cloudflare
  20. from .Copilot import Copilot
  21. from .DarkAI import DarkAI
  22. from .DDG import DDG
  23. from .DeepInfraChat import DeepInfraChat
  24. from .Free2GPT import Free2GPT
  25. from .FreeGpt import FreeGpt
  26. from .GizAI import GizAI
  27. from .Liaobots import Liaobots
  28. from .Mhystical import Mhystical
  29. from .PerplexityLabs import PerplexityLabs
  30. from .Pi import Pi
  31. from .Pizzagpt import Pizzagpt
  32. from .PollinationsAI import PollinationsAI
  33. from .Prodia import Prodia
  34. from .ReplicateHome import ReplicateHome
  35. from .RubiksAI import RubiksAI
  36. from .TeachAnything import TeachAnything
  37. from .You import You
  38. import sys
  39. __modules__: list = [
  40. getattr(sys.modules[__name__], provider) for provider in dir()
  41. if not provider.startswith("__")
  42. ]
  43. __providers__: list[ProviderType] = [
  44. provider for provider in __modules__
  45. if isinstance(provider, type)
  46. and issubclass(provider, BaseProvider)
  47. ]
  48. __all__: list[str] = [
  49. provider.__name__ for provider in __providers__
  50. ]
  51. __map__: dict[str, ProviderType] = dict([
  52. (provider.__name__, provider) for provider in __providers__
  53. ])
  54. class ProviderUtils:
  55. convert: dict[str, ProviderType] = __map__