feat: may_ask (#981)

* feat: u may ask

* chore: adjust code according to CR

* chore: adjust code according to CR

* ut: test for suggestions.py

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
null4536251
2026-03-06 22:39:58 +08:00
committed by GitHub
parent 2e90101be8
commit 9d2144d431
10 changed files with 462 additions and 35 deletions

View File

@@ -7,7 +7,16 @@ from fastapi import FastAPI
from src.config.app_config import get_app_config
from src.gateway.config import get_gateway_config
from src.gateway.routers import agents, artifacts, mcp, memory, models, skills, uploads
from src.gateway.routers import (
agents,
artifacts,
mcp,
memory,
models,
skills,
suggestions,
uploads,
)
# Configure logging
logging.basicConfig(
@@ -104,6 +113,10 @@ This gateway provides custom endpoints for models, MCP configuration, skills, an
"name": "agents",
"description": "Create and manage custom agents with per-agent config and prompts",
},
{
"name": "suggestions",
"description": "Generate follow-up question suggestions for conversations",
},
{
"name": "health",
"description": "Health check and system status endpoints",
@@ -135,6 +148,9 @@ This gateway provides custom endpoints for models, MCP configuration, skills, an
# Agents API is mounted at /api/agents
app.include_router(agents.router)
# Suggestions API is mounted at /api/threads/{thread_id}/suggestions
app.include_router(suggestions.router)
@app.get("/health", tags=["health"])
async def health_check() -> dict:
"""Health check endpoint.