Skip to content

Commit

Permalink
Update (g4f/Provider/)
Browse files Browse the repository at this point in the history
  • Loading branch information
kqlio67 committed Nov 9, 2024
1 parent a96f9bd commit c1e6276
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions g4f/Provider/local/Ollama.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
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
Expand Down
4 changes: 2 additions & 2 deletions g4f/Provider/needs_auth/DeepInfra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

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
Expand Down
4 changes: 2 additions & 2 deletions g4f/Provider/needs_auth/Groq.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
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
Expand Down
4 changes: 2 additions & 2 deletions g4f/Provider/needs_auth/PerplexityApi.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions g4f/Provider/needs_auth/ThebApi.py
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -27,7 +27,7 @@
"qwen-7b-chat": "Qwen 7B"
}

class ThebApi(Openai):
class ThebApi(OpenaiAPI):
label = "TheB.AI API"
url = "https://theb.ai"
working = True
Expand Down Expand Up @@ -58,4 +58,4 @@ def create_async_generator(
"top_p": top_p,
}
}
return super().create_async_generator(model, messages, api_base=api_base, extra_data=data, **kwargs)
return super().create_async_generator(model, messages, api_base=api_base, extra_data=data, **kwargs)
2 changes: 1 addition & 1 deletion g4f/Provider/needs_auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
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
Expand Down

0 comments on commit c1e6276

Please sign in to comment.