Skip to content

Commit

Permalink
Fix requestOptions in startChat (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
wong2 authored and hsubox76 committed Sep 5, 2024
1 parent 71905ad commit 70cc353
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/real-windows-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@google/generative-ai": patch
---

Fix reference to `requestOptions` in `startChat`.
2 changes: 0 additions & 2 deletions common/api-review/generative-ai.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,6 @@ export class GenerativeModel {
// (undocumented)
model: string;
// (undocumented)
requestOptions: RequestOptions;
// (undocumented)
safetySettings: SafetySetting[];
startChat(startChatParams?: StartChatParams): ChatSession;
// (undocumented)
Expand Down
1 change: 0 additions & 1 deletion docs/reference/main/generative-ai.generativemodel.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export declare class GenerativeModel
| [cachedContent](./generative-ai.generativemodel.cachedcontent.md) | | [CachedContent](./generative-ai.cachedcontent.md) | |
| [generationConfig](./generative-ai.generativemodel.generationconfig.md) | | [GenerationConfig](./generative-ai.generationconfig.md) | |
| [model](./generative-ai.generativemodel.model.md) | | string | |
| [requestOptions](./generative-ai.generativemodel.requestoptions.md) | | [RequestOptions](./generative-ai.requestoptions.md) | |
| [safetySettings](./generative-ai.generativemodel.safetysettings.md) | | [SafetySetting](./generative-ai.safetysetting.md)<!-- -->\[\] | |
| [systemInstruction?](./generative-ai.generativemodel.systeminstruction.md) | | [Content](./generative-ai.content.md) | _(Optional)_ |
| [toolConfig?](./generative-ai.generativemodel.toolconfig.md) | | [ToolConfig](./generative-ai.toolconfig.md) | _(Optional)_ |
Expand Down

This file was deleted.

3 changes: 1 addition & 2 deletions packages/main/src/models/generative-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ export class GenerativeModel {
model: string;
generationConfig: GenerationConfig;
safetySettings: SafetySetting[];
requestOptions: RequestOptions;
tools?: Tool[];
toolConfig?: ToolConfig;
systemInstruction?: Content;
Expand Down Expand Up @@ -172,7 +171,7 @@ export class GenerativeModel {
cachedContent: this.cachedContent?.name,
...startChatParams,
},
this.requestOptions,
this._requestOptions,
);
}

Expand Down

0 comments on commit 70cc353

Please sign in to comment.