Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/plugins/googleai/src/gemini.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ export function googleAIModel(
if (streamingCallback) {
const result = await client
.startChat(chatRequest)
.sendMessageStream(msg.parts);
.sendMessageStream(msg.parts, options);
for await (const item of result.stream) {
(item as GenerateContentResponse).candidates?.forEach((candidate) => {
const c = fromJSONModeScopedGeminiCandidate(candidate);
Expand All @@ -606,7 +606,7 @@ export function googleAIModel(
} else {
const result = await client
.startChat(chatRequest)
.sendMessage(msg.parts);
.sendMessage(msg.parts, options);
if (!result.response.candidates?.length)
throw new Error('No valid candidates returned.');
const responseCandidates =
Expand Down
Loading