Skip to content

Commit e182795

Browse files
committed
Refresh docs for v0.8.3
Change-Id: I7536e809b9a1b8f26fc970a42c83000b0d607793
1 parent 0f0a96d commit e182795

File tree

251 files changed

+8534
-2909
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+8534
-2909
lines changed

docs/api/google/generativeai.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ See the [python quickstart](https://ai.google.dev/tutorials/python_quickstart) f
5252

5353
## Modules
5454

55+
[`caching`](../google/generativeai/caching.md) module
56+
5557
[`protos`](../google/generativeai/protos.md) module: This module provides low level access to the ProtoBuffer "Message" classes used by the API.
5658

5759
[`types`](../google/generativeai/types.md) module: A collection of type definitions used throughout the library.
@@ -66,16 +68,8 @@ See the [python quickstart](https://ai.google.dev/tutorials/python_quickstart) f
6668

6769
## Functions
6870

69-
[`chat(...)`](../google/generativeai/chat.md): Calls the API to initiate a chat with a model using provided parameters
70-
71-
[`chat_async(...)`](../google/generativeai/chat_async.md): Calls the API to initiate a chat with a model using provided parameters
72-
7371
[`configure(...)`](../google/generativeai/configure.md): Captures default client configuration.
7472

75-
[`count_message_tokens(...)`](../google/generativeai/count_message_tokens.md): Calls the API to calculate the number of tokens used in the prompt.
76-
77-
[`count_text_tokens(...)`](../google/generativeai/count_text_tokens.md): Calls the API to count the number of tokens in the text prompt.
78-
7973
[`create_tuned_model(...)`](../google/generativeai/create_tuned_model.md): Calls the API to initiate a tuning process that optimizes a model for specific data, returning an operation object to track and manage the tuning progress.
8074

8175
[`delete_file(...)`](../google/generativeai/delete_file.md): Calls the API to permanently delete a specified file using a supported file service.
@@ -86,10 +80,6 @@ See the [python quickstart](https://ai.google.dev/tutorials/python_quickstart) f
8680

8781
[`embed_content_async(...)`](../google/generativeai/embed_content_async.md): Calls the API to create async embeddings for content passed in.
8882

89-
[`generate_embeddings(...)`](../google/generativeai/generate_embeddings.md): Calls the API to create an embedding for the text passed in.
90-
91-
[`generate_text(...)`](../google/generativeai/generate_text.md): Calls the API to generate text based on the provided prompt.
92-
9383
[`get_base_model(...)`](../google/generativeai/get_base_model.md): Calls the API to fetch a base model by name.
9484

9585
[`get_file(...)`](../google/generativeai/get_file.md): Calls the API to retrieve a specified file using a supported file service.
@@ -121,17 +111,25 @@ See the [python quickstart](https://ai.google.dev/tutorials/python_quickstart) f
121111

122112
<tr>
123113
<td>
114+
124115
__version__<a id="__version__"></a>
116+
125117
</td>
126118
<td>
127-
`'0.7.2'`
119+
120+
`'0.8.3'`
121+
128122
</td>
129123
</tr><tr>
130124
<td>
125+
131126
annotations<a id="annotations"></a>
127+
132128
</td>
133129
<td>
130+
134131
Instance of `__future__._Feature`
132+
135133
</td>
136134
</tr>
137135
</table>

docs/api/google/generativeai/ChatSession.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,25 @@ This `ChatSession` object collects the messages sent and received, in its
5858

5959
<tr>
6060
<td>
61+
6162
`model`<a id="model"></a>
63+
6264
</td>
6365
<td>
66+
6467
The model to use in the chat.
68+
6569
</td>
6670
</tr><tr>
6771
<td>
72+
6873
`history`<a id="history"></a>
74+
6975
</td>
7076
<td>
77+
7178
A chat history to initialize the object with.
79+
7280
</td>
7381
</tr>
7482
</table>
@@ -84,17 +92,25 @@ A chat history to initialize the object with.
8492

8593
<tr>
8694
<td>
95+
8796
`history`<a id="history"></a>
97+
8898
</td>
8999
<td>
100+
90101
The chat history.
102+
91103
</td>
92104
</tr><tr>
93105
<td>
106+
94107
`last`<a id="last"></a>
108+
95109
</td>
96110
<td>
111+
97112
returns the last received `genai.GenerateContentResponse`
113+
98114
</td>
99115
</tr>
100116
</table>
@@ -167,31 +183,47 @@ Like <a href="../../google/generativeai/GenerativeModel.md#generate_content"><co
167183

168184
<tr>
169185
<td>
186+
170187
`content`
188+
171189
</td>
172190
<td>
191+
173192
The message contents.
193+
174194
</td>
175195
</tr><tr>
176196
<td>
197+
177198
`generation_config`
199+
178200
</td>
179201
<td>
202+
180203
Overrides for the model's generation config.
204+
181205
</td>
182206
</tr><tr>
183207
<td>
208+
184209
`safety_settings`
210+
185211
</td>
186212
<td>
213+
187214
Overrides for the model's safety settings.
215+
188216
</td>
189217
</tr><tr>
190218
<td>
219+
191220
`stream`
221+
192222
</td>
193223
<td>
224+
194225
If True, yield response chunks as they are generated.
226+
195227
</td>
196228
</tr>
197229
</table>

docs/api/google/generativeai/GenerativeModel.md

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The `genai.GenerativeModel` class wraps default parameters for calls to <a href=
3131

3232
<pre class="devsite-click-to-copy prettyprint lang-py tfo-signature-link">
3333
<code>google.generativeai.GenerativeModel(
34-
model_name: str = &#x27;gemini-pro&#x27;,
34+
model_name: str = &#x27;gemini-1.5-flash-002&#x27;,
3535
safety_settings: (safety_types.SafetySettingOptions | None) = None,
3636
generation_config: (generation_types.GenerationConfigType | None) = None,
3737
tools: (content_types.FunctionLibraryType | None) = None,
@@ -93,26 +93,38 @@ To list the compatible model names use:
9393

9494
<tr>
9595
<td>
96+
9697
`model_name`<a id="model_name"></a>
98+
9799
</td>
98100
<td>
101+
99102
The name of the model to query. To list compatible models use
103+
100104
</td>
101105
</tr><tr>
102106
<td>
107+
103108
`safety_settings`<a id="safety_settings"></a>
109+
104110
</td>
105111
<td>
112+
106113
Sets the default safety filters. This controls which content is blocked
107114
by the api before being returned.
115+
108116
</td>
109117
</tr><tr>
110118
<td>
119+
111120
`generation_config`<a id="generation_config"></a>
121+
112122
</td>
113123
<td>
124+
114125
A `genai.GenerationConfig` setting the default generation parameters to
115126
use.
127+
116128
</td>
117129
</tr>
118130
</table>
@@ -128,17 +140,25 @@ use.
128140

129141
<tr>
130142
<td>
143+
131144
`cached_content`<a id="cached_content"></a>
145+
132146
</td>
133147
<td>
134148

149+
150+
135151
</td>
136152
</tr><tr>
137153
<td>
154+
138155
`model_name`<a id="model_name"></a>
156+
139157
</td>
140158
<td>
141159

160+
161+
142162
</td>
143163
</tr>
144164
</table>
@@ -209,24 +229,36 @@ Creates a model with `cached_content` as model's context.
209229

210230
<tr>
211231
<td>
232+
212233
`cached_content`
234+
213235
</td>
214236
<td>
237+
215238
context for the model.
239+
216240
</td>
217241
</tr><tr>
218242
<td>
243+
219244
`generation_config`
245+
220246
</td>
221247
<td>
248+
222249
Overrides for the model's generation config.
250+
223251
</td>
224252
</tr><tr>
225253
<td>
254+
226255
`safety_settings`
256+
227257
</td>
228258
<td>
259+
229260
Overrides for the model's safety settings.
261+
230262
</td>
231263
</tr>
232264
</table>
@@ -239,7 +271,9 @@ Overrides for the model's safety settings.
239271
<tr><th colspan="2">Returns</th></tr>
240272
<tr class="alt">
241273
<td colspan="2">
274+
242275
`GenerativeModel` object with `cached_content` as its context.
276+
243277
</td>
244278
</tr>
245279

@@ -323,45 +357,69 @@ But note that an `Iterable[protos.Part]` is taken as the parts of a single messa
323357

324358
<tr>
325359
<td>
360+
326361
`contents`
362+
327363
</td>
328364
<td>
365+
329366
The contents serving as the model's prompt.
367+
330368
</td>
331369
</tr><tr>
332370
<td>
371+
333372
`generation_config`
373+
334374
</td>
335375
<td>
376+
336377
Overrides for the model's generation config.
378+
337379
</td>
338380
</tr><tr>
339381
<td>
382+
340383
`safety_settings`
384+
341385
</td>
342386
<td>
387+
343388
Overrides for the model's safety settings.
389+
344390
</td>
345391
</tr><tr>
346392
<td>
393+
347394
`stream`
395+
348396
</td>
349397
<td>
398+
350399
If True, yield response chunks as they are generated.
400+
351401
</td>
352402
</tr><tr>
353403
<td>
404+
354405
`tools`
406+
355407
</td>
356408
<td>
409+
357410
`protos.Tools` more info coming soon.
411+
358412
</td>
359413
</tr><tr>
360414
<td>
415+
361416
`request_options`
417+
362418
</td>
363419
<td>
420+
364421
Options for the request.
422+
365423
</td>
366424
</tr>
367425
</table>
@@ -415,10 +473,14 @@ Returns a `genai.ChatSession` attached to this model.
415473

416474
<tr>
417475
<td>
476+
418477
`history`
478+
419479
</td>
420480
<td>
481+
421482
An iterable of <a href="../../google/generativeai/protos/Content.md"><code>protos.Content</code></a> objects, or equivalents to initialize the session.
483+
422484
</td>
423485
</tr>
424486
</table>

0 commit comments

Comments
 (0)