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-05-19 06:09:55 +03:00
|
|
|
from ..providers.retry_provider import RetryProvider, IterListProvider
|
2024-02-22 02:16:58 +03:00
|
|
|
from ..providers.base_provider import AsyncProvider, AsyncGeneratorProvider
|
|
|
|
from ..providers.create_images import CreateImagesProvider
|
|
|
|
|
2024-10-19 13:21:19 +03:00
|
|
|
from .deprecated import *
|
|
|
|
from .selenium import *
|
|
|
|
from .needs_auth import *
|
2024-11-06 18:25:09 +03:00
|
|
|
from .not_working import *
|
|
|
|
from .local import *
|
2024-01-01 19:48:57 +03:00
|
|
|
|
2024-10-11 09:32:22 +03:00
|
|
|
from .AIUncensored import AIUncensored
|
2024-09-13 17:09:31 +03:00
|
|
|
from .Airforce import Airforce
|
Fix api streaming, fix AsyncClient (#2357)
* Fix api streaming, fix AsyncClient, Improve Client class, Some providers fixes, Update models list, Fix some tests, Update model list in Airforce provid
er, Add OpenAi image generation url to api, Fix reload and debug in api arguments, Fix websearch in gui
* Fix Cloadflare and Pi and AmigoChat provider
* Fix conversation support in DDG provider, Add cloudflare bypass with nodriver
* Fix unittests without curl_cffi
2024-11-16 15:19:51 +03:00
|
|
|
from .AmigoChat import AmigoChat
|
2024-03-12 04:06:06 +03:00
|
|
|
from .Bing import Bing
|
2024-04-12 22:00:57 +03:00
|
|
|
from .Blackbox import Blackbox
|
2024-09-24 13:23:53 +03:00
|
|
|
from .ChatGpt import ChatGpt
|
|
|
|
from .ChatGptEs import ChatGptEs
|
2024-10-11 09:32:22 +03:00
|
|
|
from .Cloudflare import Cloudflare
|
|
|
|
from .DarkAI import DarkAI
|
2024-07-08 23:49:38 +03:00
|
|
|
from .DDG import DDG
|
2024-09-24 13:23:53 +03:00
|
|
|
from .DeepInfraChat import DeepInfraChat
|
2024-09-06 23:19:18 +03:00
|
|
|
from .Free2GPT import Free2GPT
|
2024-03-12 04:06:06 +03:00
|
|
|
from .FreeGpt import FreeGpt
|
2024-10-26 19:00:55 +03:00
|
|
|
from .GizAI import GizAI
|
2024-03-12 04:06:06 +03:00
|
|
|
from .HuggingChat import HuggingChat
|
|
|
|
from .Liaobots import Liaobots
|
2024-09-07 01:16:11 +03:00
|
|
|
from .MagickPen import MagickPen
|
2024-03-12 04:06:06 +03:00
|
|
|
from .PerplexityLabs import PerplexityLabs
|
|
|
|
from .Pi import Pi
|
2024-06-22 19:13:49 +03:00
|
|
|
from .Pizzagpt import Pizzagpt
|
2024-09-12 20:28:50 +03:00
|
|
|
from .Prodia import Prodia
|
2024-07-08 23:49:38 +03:00
|
|
|
from .Reka import Reka
|
|
|
|
from .ReplicateHome import ReplicateHome
|
2024-10-17 13:17:38 +03:00
|
|
|
from .RubiksAI import RubiksAI
|
2024-09-02 11:55:51 +03:00
|
|
|
from .TeachAnything import TeachAnything
|
|
|
|
from .Upstage import Upstage
|
2024-03-12 04:06:06 +03:00
|
|
|
from .You import You
|
2024-11-05 03:15:06 +03:00
|
|
|
from .Mhystical import Mhystical
|
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-04-12 22:00:57 +03:00
|
|
|
convert: dict[str, ProviderType] = __map__
|