Revert "Replace gemini batch JSON protocol"
This reverts commit f5d76fc3ec.
This commit is contained in:
@@ -258,11 +258,11 @@ func TestExtractCompleteRecommendationObjectsReturnsNilWhenArrayMissing(t *testi
|
||||
}
|
||||
|
||||
func TestGeminiVisionMaxOutputTokensShrinksForSingleCandidate(t *testing.T) {
|
||||
if got := geminiVisionMaxOutputTokens(1); got != 120 {
|
||||
t.Fatalf("expected 120 tokens for single candidate, got %d", got)
|
||||
if got := geminiVisionMaxOutputTokens(1); got != 180 {
|
||||
t.Fatalf("expected 180 tokens for single candidate, got %d", got)
|
||||
}
|
||||
if got := geminiVisionMaxOutputTokens(4); got != 300 {
|
||||
t.Fatalf("expected 300 tokens for four candidates, got %d", got)
|
||||
if got := geminiVisionMaxOutputTokens(4); got != 420 {
|
||||
t.Fatalf("expected 420 tokens for four candidates, got %d", got)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,17 +279,3 @@ func TestParseSingleCandidateVisionTextParsesKeyValueResponse(t *testing.T) {
|
||||
t.Fatalf("unexpected reason: %#v", parsed)
|
||||
}
|
||||
}
|
||||
|
||||
func TestParseGeminiVisionLinesParsesPipeDelimitedRows(t *testing.T) {
|
||||
raw := "0|Yes|positive|true|적합한 네온 도시|\n1|No|irrelevant|false|관련성 낮음|night city skyline"
|
||||
parsed, ok := parseGeminiVisionLines(raw)
|
||||
if !ok {
|
||||
t.Fatal("expected pipe-delimited parser to succeed")
|
||||
}
|
||||
if len(parsed.Recommendations) != 2 {
|
||||
t.Fatalf("unexpected parsed recommendations: %#v", parsed.Recommendations)
|
||||
}
|
||||
if parsed.Recommendations[0].Index != 0 || parsed.Recommendations[1].Index != 1 {
|
||||
t.Fatalf("unexpected parsed indices: %#v", parsed.Recommendations)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user