Skip to content

Commit a16b9d4

Browse files
authored
fix: include cachedContent in generate request (#469)
1 parent 3f9eee6 commit a16b9d4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/models/chat_session.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,20 +339,21 @@ export class ChatSessionPreview {
339339
): Promise<GenerateContentResult> {
340340
const newContent: Content[] =
341341
formulateNewContentFromSendMessageRequest(request);
342-
const generateContentrequest: GenerateContentRequest = {
342+
const generateContentRequest: GenerateContentRequest = {
343343
contents: this.historyInternal.concat(newContent),
344344
safetySettings: this.safetySettings,
345345
generationConfig: this.generationConfig,
346346
tools: this.tools,
347347
toolConfig: this.toolConfig,
348348
systemInstruction: this.systemInstruction,
349+
cachedContent: this.cachedContent,
349350
};
350351

351352
const generateContentResult: GenerateContentResult = await generateContent(
352353
this.location,
353354
this.resourcePath,
354355
this.fetchToken(),
355-
generateContentrequest,
356+
generateContentRequest,
356357
this.apiEndpoint,
357358
this.generationConfig,
358359
this.safetySettings,

0 commit comments

Comments
 (0)