Skip to content

Commit 3a63e57

Browse files
committed
add todo, and update docs
1 parent 76c82e5 commit 3a63e57

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs-devsite/ai.templategenerativemodel.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ Makes a single non-streaming call to the model and returns an object containing
8585
<b>Signature:</b>
8686

8787
```typescript
88-
generateContent(templateId: string, templateVariables: object, // anything!
89-
singleRequestOptions?: SingleRequestOptions): Promise<GenerateContentResult>;
88+
generateContent(templateId: string, templateVariables: object, singleRequestOptions?: SingleRequestOptions): Promise<GenerateContentResult>;
9089
```
9190

9291
#### Parameters

packages/ai/src/methods/chat-session.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ export class ChatSession {
187187
// errors propagate to the user's `result.response` promise.
188188
if (response.candidates && response.candidates.length > 0) {
189189
this._history.push(newContent);
190+
// TODO: Validate that `response.candidates[0].content` is not null.
190191
const responseContent = { ...response.candidates[0].content };
191192
if (!responseContent.role) {
192193
responseContent.role = 'model';

0 commit comments

Comments
 (0)