Implement knowledge base management and enhance assistant configuration

Add CRUD functionality for knowledge bases, including routes for listing, creating, updating, and deleting knowledge bases. Update the assistant model to include foreign key references to knowledge bases and modify the assistant configuration to handle external API keys securely. Refactor related services and routes to accommodate these changes, ensuring proper handling of credential resolution and configuration normalization.
This commit is contained in:
Xin Wang
2026-06-09 08:31:39 +08:00
parent 34fba494a3
commit b444ea777c
6 changed files with 304 additions and 56 deletions

View File

@@ -18,7 +18,14 @@ from db.session import init_db
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from routes import assistants, credentials, health, voice_webrtc, voice_ws
from routes import (
assistants,
credentials,
health,
knowledge_bases,
voice_webrtc,
voice_ws,
)
@asynccontextmanager
@@ -40,6 +47,7 @@ app.add_middleware(
app.include_router(health.router)
app.include_router(assistants.router)
app.include_router(credentials.router)
app.include_router(knowledge_bases.router)
app.include_router(voice_webrtc.router)
app.include_router(voice_ws.router)