__init__.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 .Airforce import Airforce
  12. from .AmigoChat import AmigoChat
  13. from .Blackbox import Blackbox
  14. from .Blackbox2 import Blackbox2
  15. from .ChatGpt import ChatGpt
  16. from .ChatGptEs import ChatGptEs
  17. from .Cloudflare import Cloudflare
  18. from .Copilot import Copilot
  19. from .DarkAI import DarkAI
  20. from .DDG import DDG
  21. from .DeepInfraChat import DeepInfraChat
  22. from .Flux import Flux
  23. from .Free2GPT import Free2GPT
  24. from .FreeGpt import FreeGpt
  25. from .GizAI import GizAI
  26. from .Liaobots import Liaobots
  27. from .Mhystical import Mhystical
  28. from .PerplexityLabs import PerplexityLabs
  29. from .Pi import Pi
  30. from .Pizzagpt import Pizzagpt
  31. from .PollinationsAI import PollinationsAI
  32. from .Prodia import Prodia
  33. from .ReplicateHome import ReplicateHome
  34. from .RubiksAI import RubiksAI
  35. from .TeachAnything import TeachAnything
  36. from .You import You
  37. import sys
  38. __modules__: list = [
  39. getattr(sys.modules[__name__], provider) for provider in dir()
  40. if not provider.startswith("__")
  41. ]
  42. __providers__: list[ProviderType] = [
  43. provider for provider in __modules__
  44. if isinstance(provider, type)
  45. and issubclass(provider, BaseProvider)
  46. ]
  47. __all__: list[str] = [
  48. provider.__name__ for provider in __providers__
  49. ]
  50. __map__: dict[str, ProviderType] = dict([
  51. (provider.__name__, provider) for provider in __providers__
  52. ])
  53. class ProviderUtils:
  54. convert: dict[str, ProviderType] = __map__