mirror of
https://github.com/xtekky/gpt4free.git
synced 2024-12-23 11:02:40 +03:00
Update (g4f/Provider/)
This commit is contained in:
parent
a96f9bdbdf
commit
c1e6276414
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
@ -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
|
||||
|
@ -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)
|
||||
return super().create_async_generator(model, messages, api_base=api_base, extra_data=data, **kwargs)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user