Ask user tool

This commit is contained in:
moosecrap committed 2026-11-01 21:25:41 -08:00
1 parent 6c33951c81
commit 2ad9311961
3 files changed
+50

No files matched your search

+13
View File
@@ -26,6 +26,7 @@ from .browse_wikipedia import handle as wikipedia_handler
from .get_model_info import handle as get_model_info_handler
from .generate_image import handle as generate_image_handler
from .search_tags import handle as search_tags_handler
from .ask_user import handle as ask_user_handler
# Central registry of all available tools
TOOL_REGISTRY = [
@@ -167,4 +168,16 @@ TOOL_REGISTRY = [
},
handler=search_tags_handler
),
Tool(
name="ask_user",
description="Asks the human operator a question and waits for their answer. Use this when the model is missing critical information or needs guidance. This blocks the server until the user responds.",
schema={
"type": "object",
"properties": {
"question": {"type": "string", "description": "The question to ask the human operator."}
},
"required": ["question"],
},
handler=ask_user_handler
),
]