Skip to content

Commit

Permalink
minor improvements for release
Browse files Browse the repository at this point in the history
  • Loading branch information
xtekky committed Nov 15, 2024
1 parent 66d3cec commit 6ac5454
Show file tree
Hide file tree
Showing 8 changed files with 188 additions and 179 deletions.
1 change: 1 addition & 0 deletions g4f/Provider/Pi.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Pi(AbstractProvider):
supports_stream = True
_session = None
default_model = "pi"
models = [default_model]

@classmethod
def create_completion(
Expand Down
1 change: 0 additions & 1 deletion g4f/Provider/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from .local import *

from .AIUncensored import AIUncensored
from .Allyfy import Allyfy
from .Airforce import Airforce
from .Bing import Bing
from .Blackbox import Blackbox
Expand Down
1 change: 1 addition & 0 deletions g4f/Provider/needs_auth/Gemini.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class Gemini(AsyncGeneratorProvider):
default_model = 'gemini'
image_models = ["gemini"]
default_vision_model = "gemini"
models = ["gemini", "gemini-1.5-flash", "gemini-1.5-pro"]
_cookies: Cookies = None
_snlm0e: str = None
_sid: str = None
Expand Down
1 change: 1 addition & 0 deletions g4f/Provider/needs_auth/Poe.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Poe(AbstractProvider):
needs_auth = True
supports_gpt_35_turbo = True
supports_stream = True
models = models.keys()

@classmethod
def create_completion(
Expand Down
8 changes: 8 additions & 0 deletions g4f/Provider/needs_auth/Raycast.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ class Raycast(AbstractProvider):
needs_auth = True
working = True

models = [
"gpt-3.5-turbo",
"gpt-4"
]

@staticmethod
def create_completion(
model: str,
Expand All @@ -25,6 +30,9 @@ def create_completion(
**kwargs,
) -> CreateResult:
auth = kwargs.get('auth')
if not auth:
raise ValueError("Raycast needs an auth token, pass it with the `auth` parameter")

headers = {
'Accept': 'application/json',
'Accept-Language': 'en-US,en;q=0.9',
Expand Down
1 change: 1 addition & 0 deletions g4f/Provider/needs_auth/Theb.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class Theb(AbstractProvider):
supports_gpt_35_turbo = True
supports_gpt_4 = True
supports_stream = True
models = models.keys()

@classmethod
def create_completion(
Expand Down
8 changes: 4 additions & 4 deletions g4f/Provider/Allyfy.py → g4f/Provider/not_working/Allyfy.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import json
import uuid
from aiohttp import ClientSession
from ..typing import AsyncResult, Messages
from .base_provider import AsyncGeneratorProvider, ProviderModelMixin
from .helper import format_prompt
from ...typing import AsyncResult, Messages
from ..base_provider import AsyncGeneratorProvider, ProviderModelMixin
from ..helper import format_prompt


class Allyfy(AsyncGeneratorProvider, ProviderModelMixin):
url = "https://allyfy.chat"
api_endpoint = "https://chatbot.allyfy.chat/api/v1/message/stream/super/chat"
working = True
working = False
supports_stream = True
supports_system_message = True
supports_message_history = True
Expand Down
Loading

0 comments on commit 6ac5454

Please sign in to comment.