Skip to content

Commit b01bd39

Browse files
sararobcopybara-github
authored andcommitted
fix: update readme
PiperOrigin-RevId: 590567567
1 parent d669b11 commit b01bd39

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

+15
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,21 @@ async function multiPartContentImageString() {
117117
multiPartContentImageString();
118118
```
119119

120+
## Content generation: non-streaming
121+
122+
```typescript
123+
async function generateContent() {
124+
const request = {
125+
contents: [{role: 'user', parts: [{text: 'How are you doing today?'}]}],
126+
};
127+
const resp = await generativeModel.generateContent(request);
128+
129+
console.log('aggregated response: ', JSON.stringify(await resp.response));
130+
};
131+
132+
generateContent();
133+
```
134+
120135
## Counting tokens
121136

122137
```typescript

0 commit comments

Comments
 (0)