feat: integrate chatbox research with datasets and backtests

This commit is contained in:
yuxuanhui
2026-09-08 12:43:00 +08:00
parent 43336ad960
commit aef8e1d310
37 changed files with 1421 additions and 42 deletions
+6
View File
@@ -28,6 +28,7 @@ from .schemas import (
AlphaDetail,
AlphaFilters,
AlphaPage,
AlphaSourcePage,
BulkOutput,
BulkUpdate,
CredentialsInput,
@@ -342,6 +343,11 @@ def create_app(settings=None, wq_client=None, ai_model_factory=None):
async with sessions.begin() as db:
return await Business(db).update_research(alpha_id, body)
@api.get("/alphas/{alpha_id}/sources", response_model=AlphaSourcePage, tags=["alphas"])
async def sources(alpha_id: str, limit: int = Query(25, ge=1, le=100), offset: int = Query(0, ge=0)):
async with sessions() as db:
return await Business(db).get_alpha_sources(alpha_id, limit, offset)
@api.get("/alphas/{alpha_id}/pnl", response_model=PnlOutput, tags=["alphas"])
async def pnl(alpha_id: str):
async with sessions() as db: