perf(laya): compact relevance states
This commit is contained in:
@ -45,9 +45,9 @@ func TestTicket28GenerationAggregatesAllAssetsBeforeSelectionAndFailsClosed(t *t
|
||||
}
|
||||
results := []any{}
|
||||
for i := range body.States {
|
||||
score := []float64{0.2, 0.8}[i]
|
||||
score := []float64{0.2, 0.9}[i]
|
||||
if calls == 2 {
|
||||
score = []float64{0.9, 0.05}[i]
|
||||
score = []float64{0.8, 0.05}[i]
|
||||
}
|
||||
usage := map[string]any{"truncated": false}
|
||||
if calls == 2 && failure == "truncated_long_article" {
|
||||
@ -60,7 +60,7 @@ func TestTicket28GenerationAggregatesAllAssetsBeforeSelectionAndFailsClosed(t *t
|
||||
_ = json.NewEncoder(w).Encode(map[string]any{"results": results})
|
||||
}))
|
||||
defer srv.Close()
|
||||
ranker, _ := ai.NewLayaHTTPRanker(ai.LayaHTTPConfig{BaseURL: srv.URL})
|
||||
ranker, _ := ai.NewLayaHTTPRanker(ai.LayaHTTPConfig{BaseURL: srv.URL, BatchSize: 2})
|
||||
model, key := "model", models.SourceYahooFinance
|
||||
feed := &ticket17HTTPScraper{articles: []scraper.Article{{Title: "first", URL: "https://fixture.invalid/first", Content: content}, {Title: "second", URL: "https://fixture.invalid/second", Content: content}}}
|
||||
summary := &ticket17HTTPSummary{}
|
||||
|
||||
Reference in New Issue
Block a user