- Add complete Python backend (Litestar + LangGraph) with chat, conversations, tickets APIs - Add GitHub Actions workflow for auto-deploying backend to Azure Web App (soc-backend) - Add gunicorn to requirements.txt for production serving - Update CLAUDE.md and EXTERNAL_SERVICES.md with latest config - Remove obsolete claudehd.md (merged into gpthd.md) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22 lines
718 B
Python
22 lines
718 B
Python
"""LangChain tool definitions for the ReAct agent."""
|
|
|
|
from app.tools.kb import kb_search
|
|
from app.tools.tickets import ticket_list, ticket_detail
|
|
|
|
# Mapping from frontend tool names to LangChain tool objects.
|
|
# The frontend sends a list of tool *keys* (e.g. ["knowledge", "tickets"]);
|
|
# the backend resolves them here and binds them to the ReAct agent.
|
|
ALL_TOOLS: dict[str, list] = {
|
|
"knowledge": [kb_search],
|
|
"tickets": [ticket_list, ticket_detail],
|
|
}
|
|
|
|
|
|
def resolve_tools(tool_keys: list[str]) -> list:
|
|
"""Return a flat list of LangChain tools for the given frontend keys."""
|
|
tools = []
|
|
for key in tool_keys:
|
|
if key in ALL_TOOLS:
|
|
tools.extend(ALL_TOOLS[key])
|
|
return tools
|