feat(generation): score articles with selected relevance model (#48)

This commit is contained in:
2026-11-25 18:09:36 +01:00
parent c5b8d0d4da
commit 90dd2a65d2
53 changed files with 1639 additions and 105 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_prompt_token_budget INT NOT NULL DEFAULT 250000,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,ranking_model_id UUID,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)`,