This commit is contained in:
2025-05-23 13:30:36 -05:00
parent f9f88be8af
commit 842b592bfc
2 changed files with 5 additions and 3 deletions

View File

@ -50,7 +50,7 @@ async def on_message(message):
await message.channel.send(f"`Please wait... image generation queued: {prompt}`")
await picture_time(message, prompt)
if message.content.lower().startswith('wiki '):
if message.content.lower().startswith('garfwiki '):
search_term = message.content[5:]
summary = await wikisum(search_term)
await message.channel.send(summary)

View File

@ -1,10 +1,12 @@
import wikipedia
from garfpy import generate_chat
async def wikisum(search_term):
try:
summary = wikipedia.summary(search_term)
return summary
garfsum = generate_chat(f"Please summarize in your own words: {summary}")
return garfsum
# except wikipedia.exceptions.DisambiguationError as e:
except Exception as e:
return e