Skip to content

Commit

Permalink
Merge pull request #76 from FuseFairy/master
Browse files Browse the repository at this point in the history
upgrade EdgeGPT==0.4.4
  • Loading branch information
FuseFairy committed May 18, 2023
2 parents c0d6dd5 + d4679d8 commit 59cd3c6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
> ## Using Microsoft's Bing Chat AI and Bing Image Creator on discord bot.
## Update
> ### 2023/5/7: Mention bot for replyall messsages.
> ### 2023/5/7 : Mention bot for replyall messsages.
> ### 2023/4/26 : Create a separate chat for each user.
> ### 2023/4/24 : Now can generate images by Creative style.
Expand Down
6 changes: 3 additions & 3 deletions cogs/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ async def send_message(chatbot: Chatbot, message, user_message: str):
try:
# Change conversation style
if conversation_style == "creative":
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.creative, wss_link="wss://sydney.bing.com/sydney/ChatHub")
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.creative)
elif conversation_style == "precise":
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.precise, wss_link="wss://sydney.bing.com/sydney/ChatHub")
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.precise)
else:
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.balanced, wss_link="wss://sydney.bing.com/sydney/ChatHub")
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.balanced)
# Get reply text
try:
text = f"{reply['item']['messages'][4]['text']}"
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
discord.py==2.2.3
python-dotenv==0.20.0
PyYAML==6.0
EdgeGPT==0.3.9
EdgeGPT==0.4.4
6 changes: 3 additions & 3 deletions src/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ async def send_message(chatbot: Chatbot, interaction: discord.Interaction, user_
try:
# Change conversation style
if conversation_style == "creative":
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.creative, wss_link="wss://sydney.bing.com/sydney/ChatHub")
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.creative)
elif conversation_style == "precise":
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.precise, wss_link="wss://sydney.bing.com/sydney/ChatHub")
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.precise)
else:
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.balanced, wss_link="wss://sydney.bing.com/sydney/ChatHub")
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.balanced)
# Get reply text
try:
text = f"{reply['item']['messages'][4]['text']}"
Expand Down

0 comments on commit 59cd3c6

Please sign in to comment.