feat: add AI research chatbot with confirmed business tools

This commit is contained in:
yuxuanhui
2026-09-07 23:02:55 +08:00
parent 3cd280d068
commit 79ab20b4ea
44 changed files with 4647 additions and 197 deletions
+4 -1
View File
@@ -11,6 +11,7 @@ from app.config import Settings
from app.main import create_app
from app.models import Base
from app.worldquant import WqClient
from tests.ai_fake import fake_model
TEST_PASSWORD = "browser-test-password"
@@ -120,7 +121,9 @@ def create_test_app():
record = next((r for r in records if path == f"/alphas/{r['id']}"), None)
return httpx.Response(200, json=record) if record else httpx.Response(404)
application = create_app(settings, WqClient(settings, transport=httpx.MockTransport(upstream)))
application = create_app(
settings, WqClient(settings, transport=httpx.MockTransport(upstream)), ai_model_factory=fake_model
)
original_lifespan = application.router.lifespan_context
@asynccontextmanager