summaryrefslogtreecommitdiffstats
path: root/g4f/__init__.py
diff options
context:
space:
mode:
authorabc <98614666+xtekky@users.noreply.github.com>2023-08-17 14:57:37 +0200
committerabc <98614666+xtekky@users.noreply.github.com>2023-08-17 14:57:37 +0200
commit6d96a1efd27b94c564da6da9cddf3bfceaf7c0ed (patch)
tree0f046519635833db16e6b71505d355eb2c8cb717 /g4f/__init__.py
parent ~ (diff)
downloadgpt4free-6d96a1efd27b94c564da6da9cddf3bfceaf7c0ed.tar
gpt4free-6d96a1efd27b94c564da6da9cddf3bfceaf7c0ed.tar.gz
gpt4free-6d96a1efd27b94c564da6da9cddf3bfceaf7c0ed.tar.bz2
gpt4free-6d96a1efd27b94c564da6da9cddf3bfceaf7c0ed.tar.lz
gpt4free-6d96a1efd27b94c564da6da9cddf3bfceaf7c0ed.tar.xz
gpt4free-6d96a1efd27b94c564da6da9cddf3bfceaf7c0ed.tar.zst
gpt4free-6d96a1efd27b94c564da6da9cddf3bfceaf7c0ed.zip
Diffstat (limited to 'g4f/__init__.py')
-rw-r--r--g4f/__init__.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/g4f/__init__.py b/g4f/__init__.py
index d90faf06..47d2a7a3 100644
--- a/g4f/__init__.py
+++ b/g4f/__init__.py
@@ -1,6 +1,6 @@
from . import models
-from .provider import BaseProvider
-from .typing import Any, CreateResult
+from .Provider import BaseProvider
+from .typing import Any, CreateResult, Union
logging = False
@@ -8,13 +8,13 @@ logging = False
class ChatCompletion:
@staticmethod
def create(
- model: models.Model | str,
+ model: Union[models.Model, str],
messages: list[dict[str, str]],
- provider: type[BaseProvider] | None = None,
+ provider: Union[type[BaseProvider], None] = None,
stream: bool = False,
- auth: str | None = None,
+ auth: Union[str, None] = None,
**kwargs: Any,
- ) -> CreateResult | str:
+ ) -> Union[CreateResult, str]:
if isinstance(model, str):
try:
model = models.ModelUtils.convert[model]