Whitepaper
Docs
Sign In
Tool
Tool
v1.0
Dice Roller
Tool ID
dice_roller
Creator
@glorsh
Downloads
18+
Roll a 6-sided dice.
Get
README
No README available
Tool Code
Show
""" title: Dice Roller Tool author: LJ version: 1.0 license: MIT description: A tool for rolling a 6-sided dice. """ import random from typing import Dict, Any from pydantic import BaseModel, Field class Tools: class Valves(BaseModel): pass class UserValves(BaseModel): pass def __init__(self): self.valves = self.Valves() self.user_valves = self.UserValves() def roll_the_dice(self) -> str: """ Rolls a 6 sided die and returns the result. :return: The result of rolling the dice. """ result = random.randint(1, 6) return f"The dice rolled a {result}" #Usage # tools = Tools() # print(tools.roll_the_dice())