__init__.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 .AIUncensored import AIUncensored
  12. from .Airforce import Airforce
  13. from .AmigoChat import AmigoChat
  14. from .Bing import Bing
  15. from .Blackbox import Blackbox
  16. from .ChatGpt import ChatGpt
  17. from .ChatGptEs import ChatGptEs
  18. from .Cloudflare import Cloudflare
  19. from .Copilot import Copilot
  20. from .DarkAI import DarkAI
  21. from .DDG import DDG
  22. from .DeepInfraChat import DeepInfraChat
  23. from .Free2GPT import Free2GPT
  24. from .FreeGpt import FreeGpt
  25. from .GizAI import GizAI
  26. from .HuggingChat import HuggingChat
  27. from .Liaobots import Liaobots
  28. from .MagickPen import MagickPen
  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 .Reka import Reka
  35. from .ReplicateHome import ReplicateHome
  36. from .RobocodersAPI import RobocodersAPI
  37. from .RubiksAI import RubiksAI
  38. from .TeachAnything import TeachAnything
  39. from .Upstage import Upstage
  40. from .You import You
  41. from .Mhystical import Mhystical
  42. import sys
  43. __modules__: list = [
  44. getattr(sys.modules[__name__], provider) for provider in dir()
  45. if not provider.startswith("__")
  46. ]
  47. __providers__: list[ProviderType] = [
  48. provider for provider in __modules__
  49. if isinstance(provider, type)
  50. and issubclass(provider, BaseProvider)
  51. ]
  52. __all__: list[str] = [
  53. provider.__name__ for provider in __providers__
  54. ]
  55. __map__: dict[str, ProviderType] = dict([
  56. (provider.__name__, provider) for provider in __providers__
  57. ])
  58. class ProviderUtils:
  59. convert: dict[str, ProviderType] = __map__