Create Provider.py
Browse files- g4f/Provider/Provider.py +16 -0
g4f/Provider/Provider.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
from ..typing import sha256, Dict, get_type_hints
|
| 3 |
+
|
| 4 |
+
url = None
|
| 5 |
+
model = None
|
| 6 |
+
supports_stream = False
|
| 7 |
+
needs_auth = False
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
def _create_completion(model: str, messages: list, stream: bool, **kwargs):
|
| 11 |
+
return
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
params = f'g4f.Providers.{os.path.basename(__file__)[:-3]} supports: ' + \
|
| 15 |
+
'(%s)' % ', '.join(
|
| 16 |
+
[f"{name}: {get_type_hints(_create_completion)[name].__name__}" for name in _create_completion.__code__.co_varnames[:_create_completion.__code__.co_argcount]])
|