blob: 230b5f5fe82cd09a65e2952198d0c4032e9b12f0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import g4f
from g4f import BaseProvider
def get_provider(provider: str) -> BaseProvider | None:
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
|