feat(summary): send complete articles within user budget (#39)

This commit is contained in:
2026-11-24 17:39:26 +01:00
parent d0c7cb7cae
commit 79953ce49f
73 changed files with 1688 additions and 288 deletions

View File

@ -34,7 +34,7 @@ func (safeSummarizer) Summarize(context.Context, string, []models.UserAsset, []g
func TestGenerationSucceedsWithoutArticleTablesAndRollsBackSummaryPostgres(t *testing.T) {
db, _ := ticket7DB(t)
for _, statement := range []string{
`CREATE TABLE users(id UUID PRIMARY KEY,language TEXT DEFAULT 'fr',ranking_mode TEXT DEFAULT 'title',summary_model_id UUID NULL)`,
`CREATE TABLE users(id UUID PRIMARY KEY,language TEXT DEFAULT 'fr',ranking_mode TEXT DEFAULT 'title',summary_prompt_token_budget INT NOT NULL DEFAULT 250000,summary_model_id UUID NULL)`,
`CREATE TABLE user_assets(id UUID PRIMARY KEY,user_id UUID,symbol TEXT,name TEXT,figi TEXT NULL,created_at TIMESTAMPTZ DEFAULT NOW())`,
`CREATE TABLE sources(id UUID PRIMARY KEY,name TEXT,type TEXT,enabled BOOLEAN,article_limit INTEGER DEFAULT 20,source_key TEXT,created_at TIMESTAMPTZ DEFAULT NOW())`,
`CREATE TABLE settings(key TEXT PRIMARY KEY,value TEXT)`,