feat(generation): select articles in three passes
This commit is contained in:
@ -258,3 +258,15 @@ func (f FakeLayaRanker) Rank(ctx context.Context, mode string, assets []models.U
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
// Binary test seam: the loopback fixture's selected IDs represent yes decisions.
|
||||
func (f FakeLayaRanker) DecideMentions(ctx context.Context, mode, pass string, assets []models.UserAsset, candidates []generation.Candidate) ([]generation.Candidate, error) {
|
||||
return f.Rank(ctx, mode, assets, candidates)
|
||||
}
|
||||
func (c FakeCompanyCatalog) MentionNames(id string) ([]string, error) {
|
||||
company, err := c.ResolveCompany(id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return []string{company.Name}, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user