Skip to content

Commit 1b1562f

Browse files
committed
fix: use proper Content[] type instead of any[] for type safety
Address PR review feedback by using the correct Content type from the Gemini SDK for the contents array in generateImage method
1 parent 8da0394 commit 1b1562f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/api/providers/gemini.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
type GenerateContentParameters,
66
type GenerateContentConfig,
77
type GroundingMetadata,
8+
type Content,
89
} from "@google/genai"
910
import type { JWTInput } from "google-auth-library"
1011

@@ -361,7 +362,7 @@ export class GeminiHandler extends BaseProvider implements SingleCompletionHandl
361362
}
362363

363364
// Prepare the content for generation
364-
const contents: any[] = []
365+
const contents: Content[] = []
365366

366367
if (inputImage) {
367368
// For image editing mode, include both text and image

0 commit comments

Comments
 (0)