feat(summary): send complete articles within user budget (#39)
This commit is contained in:
@ -125,7 +125,7 @@ func TestTicket29WholeWatchlistFitsOneJudgmentAndPreservesListing(t *testing.T)
|
||||
}))
|
||||
defer srv.Close()
|
||||
ranker, _ := NewLayaHTTPRanker(LayaHTTPConfig{BaseURL: srv.URL})
|
||||
got, err := ranker.Rank(context.Background(), "title_content", assets, []generation.Candidate{{ID: "original-id", Article: scraper.Article{Title: "headline", Content: "Entire short content"}}})
|
||||
got, err := ranker.Rank(context.Background(), "title_content", assets, []generation.Candidate{{ID: "original-id", Article: scraper.Article{Title: "headline", ContentState: scraper.ContentComplete, Content: "Entire short content"}}})
|
||||
if err != nil || calls != 1 || states != 1 || len(got) != 1 || got[0].ID != "original-id" {
|
||||
t.Fatalf("calls=%d states=%d err=%v", calls, states, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user