2023-11-16 15:56:23 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
2024-02-21 23:16:58 +00:00
|
|
|
from ..providers.types import BaseProvider, ProviderType
|
2024-02-27 10:55:40 +00:00
|
|
|
from ..providers.retry_provider import RetryProvider, IterProvider
|
2024-02-21 23:16:58 +00:00
|
|
|
from ..providers.base_provider import AsyncProvider, AsyncGeneratorProvider
|
|
|
|
from ..providers.create_images import CreateImagesProvider
|
|
|
|
|
2024-01-01 16:48:57 +00:00
|
|
|
from .deprecated import *
|
2024-03-12 01:06:06 +00:00
|
|
|
from .not_working import *
|
2024-02-08 21:02:52 +00:00
|
|
|
from .selenium import *
|
2024-01-01 16:48:57 +00:00
|
|
|
from .needs_auth import *
|
|
|
|
from .unfinished import *
|
|
|
|
|
2024-03-12 01:06:06 +00:00
|
|
|
from .Aura import Aura
|
|
|
|
from .Bing import Bing
|
2024-02-21 23:16:58 +00:00
|
|
|
from .BingCreateImages import BingCreateImages
|
2024-03-12 01:06:06 +00:00
|
|
|
from .ChatForAi import ChatForAi
|
|
|
|
from .Chatgpt4Online import Chatgpt4Online
|
|
|
|
from .ChatgptAi import ChatgptAi
|
|
|
|
from .ChatgptFree import ChatgptFree
|
|
|
|
from .ChatgptNext import ChatgptNext
|
|
|
|
from .ChatgptX import ChatgptX
|
|
|
|
from .DeepInfra import DeepInfra
|
2024-04-10 06:14:50 +00:00
|
|
|
from .DeepInfraImage import DeepInfraImage
|
2024-04-09 03:54:47 +00:00
|
|
|
from .DuckDuckGo import DuckDuckGo
|
2024-03-12 01:06:06 +00:00
|
|
|
from .FlowGpt import FlowGpt
|
|
|
|
from .FreeChatgpt import FreeChatgpt
|
|
|
|
from .FreeGpt import FreeGpt
|
2024-03-13 22:29:49 +00:00
|
|
|
from .GigaChat import GigaChat
|
2024-03-12 01:06:06 +00:00
|
|
|
from .GeminiPro import GeminiPro
|
|
|
|
from .GeminiProChat import GeminiProChat
|
|
|
|
from .GptTalkRu import GptTalkRu
|
|
|
|
from .HuggingChat import HuggingChat
|
|
|
|
from .HuggingFace import HuggingFace
|
|
|
|
from .Koala import Koala
|
|
|
|
from .Liaobots import Liaobots
|
|
|
|
from .Llama2 import Llama2
|
2024-04-07 08:36:13 +00:00
|
|
|
from .Local import Local
|
2024-03-12 01:06:06 +00:00
|
|
|
from .PerplexityLabs import PerplexityLabs
|
|
|
|
from .Pi import Pi
|
2024-04-11 01:34:07 +00:00
|
|
|
from .ReplicateImage import ReplicateImage
|
2024-03-12 01:06:06 +00:00
|
|
|
from .Vercel import Vercel
|
2024-04-08 05:24:00 +00:00
|
|
|
from .WhiteRabbitNeo import WhiteRabbitNeo
|
2024-03-12 01:06:06 +00:00
|
|
|
from .You import You
|
2023-08-27 15:37:44 +00:00
|
|
|
|
2023-11-16 15:56:23 +00:00
|
|
|
import sys
|
2023-10-09 22:45:29 +00:00
|
|
|
|
2023-11-16 15:56:23 +00:00
|
|
|
__modules__: list = [
|
|
|
|
getattr(sys.modules[__name__], provider) for provider in dir()
|
|
|
|
if not provider.startswith("__")
|
|
|
|
]
|
2024-01-01 16:48:57 +00:00
|
|
|
__providers__: list[ProviderType] = [
|
2023-11-16 15:56:23 +00:00
|
|
|
provider for provider in __modules__
|
|
|
|
if isinstance(provider, type)
|
|
|
|
and issubclass(provider, BaseProvider)
|
2023-10-12 18:28:54 +00:00
|
|
|
]
|
2023-11-16 15:56:23 +00:00
|
|
|
__all__: list[str] = [
|
|
|
|
provider.__name__ for provider in __providers__
|
|
|
|
]
|
2024-01-01 16:48:57 +00:00
|
|
|
__map__: dict[str, ProviderType] = dict([
|
2023-11-16 15:56:23 +00:00
|
|
|
(provider.__name__, provider) for provider in __providers__
|
|
|
|
])
|
|
|
|
|
|
|
|
class ProviderUtils:
|
2024-01-01 16:48:57 +00:00
|
|
|
convert: dict[str, ProviderType] = __map__
|