gateway/modules/features/chatBot/chatbotTools/sharedTools/toolStreamingStatus.py
2025-10-03 16:48:33 +02:00

24 lines
929 B
Python

"""Tool for sending streaming status updates to users."""
from langchain_core.tools import tool
@tool
def send_streaming_message(message: str) -> str:
"""Send a streaming message to the user to provide updates during processing.
Use this tool to send short status updates to the user while you are working
on their request. This helps keep the user informed about what you are doing.
Args:
message: A short message describing what you are currently doing.
Examples: "Searching database for relevant information..."
"Analyzing search results..."
"Processing your request..."
Returns:
A confirmation that the message was sent.
"""
# This tool doesn't actually do anything - it's just for the AI to signal
# what it's doing to the frontend via the tool call mechanism
return f"Status update sent: {message}"