mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-04 22:27:29 +00:00
Address copilot feedback
This commit is contained in:
parent
24fdcc52b3
commit
04213dff14
6 changed files with 14 additions and 6 deletions
|
|
@ -17,7 +17,7 @@ tool = {
|
|||
|
||||
|
||||
def execute(arguments):
|
||||
count = arguments.get("count", 1)
|
||||
sides = arguments.get("sides", 20)
|
||||
count = max(1, min(arguments.get("count", 1), 1000))
|
||||
sides = max(2, min(arguments.get("sides", 20), 1000))
|
||||
rolls = [random.randint(1, sides) for _ in range(count)]
|
||||
return {"rolls": rolls, "total": sum(rolls)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue