Files
opendan/PoC/example_modules/tell_joke/tell_joke.module.py
T

14 lines
422 B
Python
Raw Normal View History

2023-06-05 13:21:34 +08:00
from jarvis.functional_modules.functional_module import functional_module, CallerContext
import joke_db
@functional_module(
name="tell_joke",
description="Tell a joke. DO NOT come up with a joke if you call this function, this module will tell one.",
signature={})
async def do_nothing(context: CallerContext):
the_joke = joke_db.random_joke()
await context.reply_text(the_joke)
return the_joke