feat(summary): send complete articles within user budget (#39)
This commit is contained in:
@ -174,7 +174,7 @@ func TestTicket28LaterGroupFailureDiscardsAllScoresWithExplicitBudgetedExcerpt(t
|
||||
}))
|
||||
defer srv.Close()
|
||||
ranker, _ := NewLayaHTTPRanker(LayaHTTPConfig{BaseURL: srv.URL, BatchSize: 1})
|
||||
got, err := ranker.Rank(context.Background(), "title_content", []models.UserAsset{{Name: strings.Repeat("a", 400), Symbol: "ONE"}, {Name: strings.Repeat("b", 400), Symbol: "TWO"}, {Name: strings.Repeat("c", 400), Symbol: "THREE"}}, []generation.Candidate{{ID: "c", Article: scraper.Article{Title: "private title", Content: longContent}}})
|
||||
got, err := ranker.Rank(context.Background(), "title_content", []models.UserAsset{{Name: strings.Repeat("a", 400), Symbol: "ONE"}, {Name: strings.Repeat("b", 400), Symbol: "TWO"}, {Name: strings.Repeat("c", 400), Symbol: "THREE"}}, []generation.Candidate{{ID: "c", Article: scraper.Article{Title: "private title", ContentState: scraper.ContentComplete, Content: longContent}}})
|
||||
if err == nil || got != nil || calls != 2 {
|
||||
t.Fatalf("partial ranking/fallback: calls=%d err=%v", calls, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user