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