This commit is contained in:
@@ -63,3 +63,9 @@ func TestIsRenderableArtgridResultAcceptsArtlistCanonical(t *testing.T) {
|
||||
t.Fatal("expected artlist canonical clip URL to be accepted for Artgrid collector")
|
||||
}
|
||||
}
|
||||
|
||||
func TestGeminiCandidateLimitNeverExceedsCandidates(t *testing.T) {
|
||||
if got := GeminiCandidateLimit(9); got != 9 {
|
||||
t.Fatalf("expected Gemini limit to stay within candidate count, got %d", got)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ func RankSearchResults(query string, results []SearchResult) []SearchResult {
|
||||
|
||||
func GeminiCandidateLimit(total int) int {
|
||||
switch {
|
||||
case total <= 8:
|
||||
case total <= 12:
|
||||
return total
|
||||
case total <= 16:
|
||||
return 12
|
||||
|
||||
Reference in New Issue
Block a user