feat: refactor bing_chat.py

Former-commit-id: 08dff9e62b
discord-bot-framework
Zack 1 year ago
parent 5f81b0ae03
commit 8e6bcef56e

@ -1,4 +1,5 @@
OPENAI_API_KEY="your_openai_api_key_here"
CHATGPT_BASE_URL=""
GOOGLE_API_KEY=""
ANTHROPIC_API_KEY=""
@ -36,4 +37,4 @@ REDIS_PORT=
#dbs
PINECONE_API_KEY=""
BING_COOKIE=""
BING_COOKIE=""

@ -29,7 +29,6 @@ class BingChat:
self.cookies = json.loads(open(cookies_path, encoding="utf-8").read())
self.bot = asyncio.run(Chatbot.create(cookies=self.cookies))
print(self.bot.___dict__)
def __call__(self, prompt: str, style: ConversationStyle = ConversationStyle.creative) -> str:
"""
Get a text response using the EdgeGPT model based on the provided prompt.

Loading…
Cancel
Save