feat(summary): send complete articles within user budget (#39)
This commit is contained in:
@ -83,7 +83,7 @@ func TestLayaHTTPBearerEvidenceFallbackAndStableTies(t *testing.T) {
|
||||
defer srv.Close()
|
||||
ranker, _ := NewLayaHTTPRanker(LayaHTTPConfig{BaseURL: srv.URL, APIKey: "test-secret"})
|
||||
figi := "BBG000000001"
|
||||
candidates := []generation.Candidate{{ID: "1", Article: scraper.Article{Title: "Title", Content: "Title"}}, {ID: "2", Article: scraper.Article{Title: "Second", Content: "Available evidence", Symbols: []string{"SPX"}}}}
|
||||
candidates := []generation.Candidate{{ID: "1", Article: scraper.Article{Title: "Title", ContentState: scraper.ContentComplete, Content: "Title"}}, {ID: "2", Article: scraper.Article{Title: "Second", ContentState: scraper.ContentComplete, Content: "Available evidence", Symbols: []string{"SPX"}}}}
|
||||
got, err := ranker.Rank(context.Background(), "title_content", []models.UserAsset{{Name: "S&P 500", Symbol: "SPX", FIGI: &figi}}, candidates)
|
||||
if err != nil || !reflect.DeepEqual(got, candidates) {
|
||||
t.Fatalf("unstable ties or changed evidence: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user