diff options
author | abc <98614666+xtekky@users.noreply.github.com> | 2023-10-10 00:46:02 +0200 |
---|---|---|
committer | abc <98614666+xtekky@users.noreply.github.com> | 2023-10-10 00:46:02 +0200 |
commit | 7f8526a1227e016fc79328ddcbe7afd09c0d63d1 (patch) | |
tree | 509f4bef20adab9656898d9d199939f16f9072f5 /g4f/gui/server/provider.py | |
parent | ~ (diff) | |
download | gpt4free-7f8526a1227e016fc79328ddcbe7afd09c0d63d1.tar gpt4free-7f8526a1227e016fc79328ddcbe7afd09c0d63d1.tar.gz gpt4free-7f8526a1227e016fc79328ddcbe7afd09c0d63d1.tar.bz2 gpt4free-7f8526a1227e016fc79328ddcbe7afd09c0d63d1.tar.lz gpt4free-7f8526a1227e016fc79328ddcbe7afd09c0d63d1.tar.xz gpt4free-7f8526a1227e016fc79328ddcbe7afd09c0d63d1.tar.zst gpt4free-7f8526a1227e016fc79328ddcbe7afd09c0d63d1.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/gui/server/provider.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/g4f/gui/server/provider.py b/g4f/gui/server/provider.py new file mode 100644 index 00000000..286f881b --- /dev/null +++ b/g4f/gui/server/provider.py @@ -0,0 +1,17 @@ +import g4f + +def get_provider(provider: str) -> g4f.Provider.BaseProvider: + + if isinstance(provider, str): + print(provider) + if provider == 'g4f.Provider.Auto': + return None + + if provider in g4f.Provider.ProviderUtils.convert: + return g4f.Provider.ProviderUtils.convert[provider] + + else: + return None + + else: + return None |