Skip to content

Commit 70c7695

Browse files
daniel-lxshannesrudolph
authored andcommitted
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 68a7c83 commit 70c7695

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

@@ -368,7 +369,7 @@ export class GeminiHandler extends BaseProvider implements SingleCompletionHandl
368369
}
369370

370371
// Prepare the content for generation
371-
const contents: any[] = []
372+
const contents: Content[] = []
372373

373374
if (inputImage) {
374375
// For image editing mode, include both text and image

0 commit comments

Comments
 (0)