summaryrefslogtreecommitdiffstats
path: root/g4f
diff options
context:
space:
mode:
authorkqlio67 <kqlio67@users.noreply.github.com>2024-11-09 08:48:34 +0100
committerkqlio67 <kqlio67@users.noreply.github.com>2024-11-09 08:48:34 +0100
commitc1e6276414632761b5ed6a98f61ca4cb7286e582 (patch)
treeb822f19fed9c1e6006db309023c9d18f99d4becd /g4f
parentfix(g4f/Provider/Blackbox.py): Improve Blackbox AI response text processing (diff)
downloadgpt4free-c1e6276414632761b5ed6a98f61ca4cb7286e582.tar
gpt4free-c1e6276414632761b5ed6a98f61ca4cb7286e582.tar.gz
gpt4free-c1e6276414632761b5ed6a98f61ca4cb7286e582.tar.bz2
gpt4free-c1e6276414632761b5ed6a98f61ca4cb7286e582.tar.lz
gpt4free-c1e6276414632761b5ed6a98f61ca4cb7286e582.tar.xz
gpt4free-c1e6276414632761b5ed6a98f61ca4cb7286e582.tar.zst
gpt4free-c1e6276414632761b5ed6a98f61ca4cb7286e582.zip
Diffstat (limited to 'g4f')
-rw-r--r--g4f/Provider/local/Ollama.py4
-rw-r--r--g4f/Provider/needs_auth/DeepInfra.py4
-rw-r--r--g4f/Provider/needs_auth/Groq.py4
-rw-r--r--g4f/Provider/needs_auth/OpenaiAPI.py (renamed from g4f/Provider/needs_auth/Openai.py)2
-rw-r--r--g4f/Provider/needs_auth/PerplexityApi.py4
-rw-r--r--g4f/Provider/needs_auth/ThebApi.py6
-rw-r--r--g4f/Provider/needs_auth/__init__.py2
7 files changed, 13 insertions, 13 deletions
diff --git a/g4f/Provider/local/Ollama.py b/g4f/Provider/local/Ollama.py
index c503a46a..de68a218 100644
--- a/g4f/Provider/local/Ollama.py
+++ b/g4f/Provider/local/Ollama.py
@@ -3,10 +3,10 @@ from __future__ import annotations
import requests
import os
-from ..needs_auth.Openai import Openai
+from ..needs_auth.OpenaiAPI import OpenaiAPI
from ...typing import AsyncResult, Messages
-class Ollama(Openai):
+class Ollama(OpenaiAPI):
label = "Ollama"
url = "https://ollama.com"
needs_auth = False
diff --git a/g4f/Provider/needs_auth/DeepInfra.py b/g4f/Provider/needs_auth/DeepInfra.py
index ebe5bfbf..35e7ca7f 100644
--- a/g4f/Provider/needs_auth/DeepInfra.py
+++ b/g4f/Provider/needs_auth/DeepInfra.py
@@ -2,9 +2,9 @@ from __future__ import annotations
import requests
from ...typing import AsyncResult, Messages
-from .Openai import Openai
+from .OpenaiAPI import OpenaiAPI
-class DeepInfra(Openai):
+class DeepInfra(OpenaiAPI):
label = "DeepInfra"
url = "https://deepinfra.com"
working = True
diff --git a/g4f/Provider/needs_auth/Groq.py b/g4f/Provider/needs_auth/Groq.py
index 027d98bf..943fc81a 100644
--- a/g4f/Provider/needs_auth/Groq.py
+++ b/g4f/Provider/needs_auth/Groq.py
@@ -1,9 +1,9 @@
from __future__ import annotations
-from .Openai import Openai
+from .OpenaiAPI import OpenaiAPI
from ...typing import AsyncResult, Messages
-class Groq(Openai):
+class Groq(OpenaiAPI):
label = "Groq"
url = "https://console.groq.com/playground"
working = True
diff --git a/g4f/Provider/needs_auth/Openai.py b/g4f/Provider/needs_auth/OpenaiAPI.py
index 382ebada..116b5f6f 100644
--- a/g4f/Provider/needs_auth/Openai.py
+++ b/g4f/Provider/needs_auth/OpenaiAPI.py
@@ -9,7 +9,7 @@ from ...requests import StreamSession, raise_for_status
from ...errors import MissingAuthError, ResponseError
from ...image import to_data_uri
-class Openai(AsyncGeneratorProvider, ProviderModelMixin):
+class OpenaiAPI(AsyncGeneratorProvider, ProviderModelMixin):
label = "OpenAI API"
url = "https://platform.openai.com"
working = True
diff --git a/g4f/Provider/needs_auth/PerplexityApi.py b/g4f/Provider/needs_auth/PerplexityApi.py
index 3ee65b30..85d7cc98 100644
--- a/g4f/Provider/needs_auth/PerplexityApi.py
+++ b/g4f/Provider/needs_auth/PerplexityApi.py
@@ -1,9 +1,9 @@
from __future__ import annotations
-from .Openai import Openai
+from .OpenaiAPI import OpenaiAPI
from ...typing import AsyncResult, Messages
-class PerplexityApi(Openai):
+class PerplexityApi(OpenaiAPI):
label = "Perplexity API"
url = "https://www.perplexity.ai"
working = True
diff --git a/g4f/Provider/needs_auth/ThebApi.py b/g4f/Provider/needs_auth/ThebApi.py
index 22fc62ed..2006f7ad 100644
--- a/g4f/Provider/needs_auth/ThebApi.py
+++ b/g4f/Provider/needs_auth/ThebApi.py
@@ -1,7 +1,7 @@
from __future__ import annotations
from ...typing import CreateResult, Messages
-from .Openai import Openai
+from .OpenaiAPI import OpenaiAPI
models = {
"theb-ai": "TheB.AI",
@@ -27,7 +27,7 @@ models = {
"qwen-7b-chat": "Qwen 7B"
}
-class ThebApi(Openai):
+class ThebApi(OpenaiAPI):
label = "TheB.AI API"
url = "https://theb.ai"
working = True
@@ -58,4 +58,4 @@ class ThebApi(Openai):
"top_p": top_p,
}
}
- return super().create_async_generator(model, messages, api_base=api_base, extra_data=data, **kwargs) \ No newline at end of file
+ return super().create_async_generator(model, messages, api_base=api_base, extra_data=data, **kwargs)
diff --git a/g4f/Provider/needs_auth/__init__.py b/g4f/Provider/needs_auth/__init__.py
index e979f86d..26c50c0a 100644
--- a/g4f/Provider/needs_auth/__init__.py
+++ b/g4f/Provider/needs_auth/__init__.py
@@ -11,7 +11,7 @@ from .GeminiPro import GeminiPro
from .Groq import Groq
from .HuggingFace import HuggingFace
from .MetaAI import MetaAI
-from .Openai import Openai
+from .OpenaiAPI import OpenaiAPI
from .OpenaiChat import OpenaiChat
from .PerplexityApi import PerplexityApi
from .Poe import Poe