首次提交
This commit is contained in:
29
app/tools.py
Normal file
29
app/tools.py
Normal file
@@ -0,0 +1,29 @@
|
||||
import logging
|
||||
from typing import Dict, Callable, Any
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
def dummy_tool(query: str) -> dict:
|
||||
"""
|
||||
Dummy Tool: A placeholder tool for demonstration.
|
||||
|
||||
Args:
|
||||
query: Any string input.
|
||||
|
||||
Returns:
|
||||
A mock structured response.
|
||||
"""
|
||||
logger.info(f"[Tool] dummy_tool called with: {query}")
|
||||
return {
|
||||
"status": "success",
|
||||
"message": f"Processed query: {query}",
|
||||
"data": "dummy_value"
|
||||
}
|
||||
|
||||
# ==========================
|
||||
# 🛠️ Tool Registry
|
||||
# ==========================
|
||||
# Map tool names to their function implementation
|
||||
TOOL_REGISTRY: Dict[str, Callable] = {
|
||||
"dummy_tool": dummy_tool,
|
||||
}
|
||||
Reference in New Issue
Block a user