6188617037
Environment Corruption Check / test-python-versions (3.12.8) (push) Failing after 2s
Environment Corruption Check / test-python-versions (3.11.11) (push) Failing after 1s
Pre-commit checks / pre-commit-check (push) Failing after 1s
Environment Corruption Check / test-python-versions (3.13.2) (push) Failing after 4s
22 lines
572 B
Python
22 lines
572 B
Python
from app.tool import BaseTool
|
|
|
|
|
|
class AskHuman(BaseTool):
|
|
"""Add a tool to ask human for help."""
|
|
|
|
name: str = "ask_human"
|
|
description: str = "Use this tool to ask human for help."
|
|
parameters: str = {
|
|
"type": "object",
|
|
"properties": {
|
|
"inquire": {
|
|
"type": "string",
|
|
"description": "The question you want to ask human.",
|
|
}
|
|
},
|
|
"required": ["inquire"],
|
|
}
|
|
|
|
async def execute(self, inquire: str) -> str:
|
|
return input(f"""Bot: {inquire}\n\nYou: """).strip()
|