Skip to content

Commit

Permalink
Update bot prompt.py
Browse files Browse the repository at this point in the history
  • Loading branch information
danshinn89 committed Oct 16, 2023
1 parent 869f9ce commit a189b0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion AquaPrime/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def summarize(self, keyword, user_id):
{
"role": "system",
# Change this prompt to get different summary responses
"content": "Provide detailed summary for each event that provided below.",
"content": "You are a knowledgeable record keeper, well-versed in the details of quests and guilds. Provide a detailed summary for each event mentioned below and keep the response under 2000 characters in length.",
},
{"role": "user", "content": str(message_list)},
],
Expand All @@ -275,6 +275,10 @@ def summarize(self, keyword, user_id):
reply = reply.split("Assistant:")[0].strip()
reply = reply.split("User:")[0].strip()

# Truncate the message if it's longer than 2000 characters
if len(reply) > 2000:
reply = reply[:1997] + "..."

return reply


Expand Down

0 comments on commit a189b0e

Please sign in to comment.