summaryrefslogtreecommitdiffstats
path: root/g4f/__init__.py
diff options
context:
space:
mode:
authorMIDORIBIN <aquarion123@gmail.com>2023-07-25 02:56:49 +0200
committerMIDORIBIN <aquarion123@gmail.com>2023-07-25 02:56:49 +0200
commit6dd8a5a1f44c2e480f1a7f8751eff321cae0876b (patch)
tree665b9be6f7bfbe89c06a04befe4a3566d602c3aa /g4f/__init__.py
parentMerge pull request #769 from fungamer2-2/main (diff)
downloadgpt4free-6dd8a5a1f44c2e480f1a7f8751eff321cae0876b.tar
gpt4free-6dd8a5a1f44c2e480f1a7f8751eff321cae0876b.tar.gz
gpt4free-6dd8a5a1f44c2e480f1a7f8751eff321cae0876b.tar.bz2
gpt4free-6dd8a5a1f44c2e480f1a7f8751eff321cae0876b.tar.lz
gpt4free-6dd8a5a1f44c2e480f1a7f8751eff321cae0876b.tar.xz
gpt4free-6dd8a5a1f44c2e480f1a7f8751eff321cae0876b.tar.zst
gpt4free-6dd8a5a1f44c2e480f1a7f8751eff321cae0876b.zip
Diffstat (limited to '')
-rw-r--r--g4f/__init__.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/g4f/__init__.py b/g4f/__init__.py
index 09b24b55..e5d3d4bf 100644
--- a/g4f/__init__.py
+++ b/g4f/__init__.py
@@ -1,12 +1,12 @@
import sys
from . import Provider
-from g4f.models import Model, ModelUtils
+from g4f import models
logging = False
class ChatCompletion:
@staticmethod
- def create(model: Model.model or str, messages: list, provider: Provider.Provider = None, stream: bool = False, auth: str = False, **kwargs):
+ def create(model: models.Model | str, messages: list, provider: Provider.Provider = None, stream: bool = False, auth: str = False, **kwargs):
kwargs['auth'] = auth
if provider and provider.working == False:
return f'{provider.__name__} is not working'
@@ -19,7 +19,7 @@ class ChatCompletion:
try:
if isinstance(model, str):
try:
- model = ModelUtils.convert[model]
+ model = models.ModelUtils.convert[model]
except KeyError:
raise Exception(f'The model: {model} does not exist')