Skip to content

Commit

Permalink
feat: provider updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Zero6992 committed May 30, 2024
1 parent 575a26f commit e64ef25
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/aclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
import g4f.debug
from g4f.client import Client
from g4f.stubs import ChatCompletion
from g4f.Provider import RetryProvider, OpenaiChat, Liaobots,Bing, You
from g4f.Provider import FreeGpt, ChatgptNext, AItianhuSpace
from g4f.Provider import RetryProvider, OpenaiChat, Aichatos, Liaobots # gpt-4
from g4f.Provider import DuckDuckGo, Ecosia # gpt-3.5-turbo

from openai import AsyncOpenAI

Expand All @@ -29,7 +29,7 @@ def __init__(self) -> None:
super().__init__(intents=intents)
self.tree = app_commands.CommandTree(self)
self.chatBot = Client(
provider = RetryProvider([OpenaiChat, Liaobots, FreeGpt, ChatgptNext, AItianhuSpace, Bing, You], shuffle=False),
provider = RetryProvider([OpenaiChat, Aichatos, DuckDuckGo, Ecosia, Liaobots], shuffle=False),
)
self.chatModel = os.getenv("MODEL")
self.conversation_history = []
Expand All @@ -40,7 +40,6 @@ def __init__(self) -> None:
self.replying_all_discord_channel_id = os.getenv("REPLYING_ALL_DISCORD_CHANNEL_ID")
self.openai_client = AsyncOpenAI(api_key=os.getenv("OPENAI_KEY"))


config_dir = os.path.abspath(f"{__file__}/../../")
prompt_name = 'system_prompt.txt'
prompt_path = os.path.join(config_dir, prompt_name)
Expand Down

0 comments on commit e64ef25

Please sign in to comment.