Skip to content

Commit f688228

Browse files
Generate vertex reference docs (#8226)
* generate vertex reference docs * Update docs-devsite/index.md Co-authored-by: rachelsaunders <[email protected]> * Update docs-devsite/vertexai-preview.vertexaioptions.md Co-authored-by: rachelsaunders <[email protected]> * addressed PR comments * regenerate --------- Co-authored-by: rachelsaunders <[email protected]>
1 parent 4c83b34 commit f688228

File tree

52 files changed

+3079
-13
lines changed

Some content is hidden

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

52 files changed

+3079
-13
lines changed

docs-devsite/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ https://github.com/firebase/firebase-js-sdk
2727
| [@firebase/performance](./performance.md#performance_package) | The Firebase Performance Monitoring Web SDK. This SDK does not work in a Node.js environment. |
2828
| [@firebase/remote-config](./remote-config.md#remote-config_package) | The Firebase Remote Config Web SDK. This SDK does not work in a Node.js environment. |
2929
| [@firebase/storage](./storage.md#storage_package) | Cloud Storage for Firebase |
30+
| [@firebase/vertexai-preview](./vertexai-preview.md#vertexai-preview_package) | The Firebase Vertex Web SDK. |
3031

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# BaseParams interface
13+
Base parameters for a number of methods.
14+
15+
<b>Signature:</b>
16+
17+
```typescript
18+
export interface BaseParams
19+
```
20+
21+
## Properties
22+
23+
| Property | Type | Description |
24+
| --- | --- | --- |
25+
| [generationConfig](./vertexai-preview.baseparams.md#baseparamsgenerationconfig) | [GenerationConfig](./vertexai-preview.generationconfig.md#generationconfig_interface) | |
26+
| [safetySettings](./vertexai-preview.baseparams.md#baseparamssafetysettings) | [SafetySetting](./vertexai-preview.safetysetting.md#safetysetting_interface)<!-- -->\[\] | |
27+
28+
## BaseParams.generationConfig
29+
30+
<b>Signature:</b>
31+
32+
```typescript
33+
generationConfig?: GenerationConfig;
34+
```
35+
36+
## BaseParams.safetySettings
37+
38+
<b>Signature:</b>
39+
40+
```typescript
41+
safetySettings?: SafetySetting[];
42+
```
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# ChatSession class
13+
ChatSession class that enables sending chat messages and stores history of sent and received messages so far.
14+
15+
<b>Signature:</b>
16+
17+
```typescript
18+
export declare class ChatSession
19+
```
20+
21+
## Constructors
22+
23+
| Constructor | Modifiers | Description |
24+
| --- | --- | --- |
25+
| [(constructor)(apiSettings, model, params, requestOptions)](./vertexai-preview.chatsession.md#chatsessionconstructor) | | Constructs a new instance of the <code>ChatSession</code> class |
26+
27+
## Properties
28+
29+
| Property | Modifiers | Type | Description |
30+
| --- | --- | --- | --- |
31+
| [model](./vertexai-preview.chatsession.md#chatsessionmodel) | | string | |
32+
| [params](./vertexai-preview.chatsession.md#chatsessionparams) | | [StartChatParams](./vertexai-preview.startchatparams.md#startchatparams_interface) \| undefined | |
33+
| [requestOptions](./vertexai-preview.chatsession.md#chatsessionrequestoptions) | | [RequestOptions](./vertexai-preview.requestoptions.md#requestoptions_interface) \| undefined | |
34+
35+
## Methods
36+
37+
| Method | Modifiers | Description |
38+
| --- | --- | --- |
39+
| [getHistory()](./vertexai-preview.chatsession.md#chatsessiongethistory) | | Gets the chat history so far. Blocked prompts are not added to history. Blocked candidates are not added to history, nor are the prompts that generated them. |
40+
| [sendMessage(request)](./vertexai-preview.chatsession.md#chatsessionsendmessage) | | Sends a chat message and receives a non-streaming [GenerateContentResult](./vertexai-preview.generatecontentresult.md#generatecontentresult_interface) |
41+
| [sendMessageStream(request)](./vertexai-preview.chatsession.md#chatsessionsendmessagestream) | | Sends a chat message and receives the response as a [GenerateContentStreamResult](./vertexai-preview.generatecontentstreamresult.md#generatecontentstreamresult_interface) containing an iterable stream and a response promise. |
42+
43+
## ChatSession.(constructor)
44+
45+
Constructs a new instance of the `ChatSession` class
46+
47+
<b>Signature:</b>
48+
49+
```typescript
50+
constructor(apiSettings: ApiSettings, model: string, params?: StartChatParams | undefined, requestOptions?: RequestOptions | undefined);
51+
```
52+
53+
#### Parameters
54+
55+
| Parameter | Type | Description |
56+
| --- | --- | --- |
57+
| apiSettings | ApiSettings | |
58+
| model | string | |
59+
| params | [StartChatParams](./vertexai-preview.startchatparams.md#startchatparams_interface) \| undefined | |
60+
| requestOptions | [RequestOptions](./vertexai-preview.requestoptions.md#requestoptions_interface) \| undefined | |
61+
62+
## ChatSession.model
63+
64+
<b>Signature:</b>
65+
66+
```typescript
67+
model: string;
68+
```
69+
70+
## ChatSession.params
71+
72+
<b>Signature:</b>
73+
74+
```typescript
75+
params?: StartChatParams | undefined;
76+
```
77+
78+
## ChatSession.requestOptions
79+
80+
<b>Signature:</b>
81+
82+
```typescript
83+
requestOptions?: RequestOptions | undefined;
84+
```
85+
86+
## ChatSession.getHistory()
87+
88+
Gets the chat history so far. Blocked prompts are not added to history. Blocked candidates are not added to history, nor are the prompts that generated them.
89+
90+
<b>Signature:</b>
91+
92+
```typescript
93+
getHistory(): Promise<Content[]>;
94+
```
95+
<b>Returns:</b>
96+
97+
Promise&lt;[Content](./vertexai-preview.content.md#content_interface)<!-- -->\[\]&gt;
98+
99+
## ChatSession.sendMessage()
100+
101+
Sends a chat message and receives a non-streaming [GenerateContentResult](./vertexai-preview.generatecontentresult.md#generatecontentresult_interface)
102+
103+
<b>Signature:</b>
104+
105+
```typescript
106+
sendMessage(request: string | Array<string | Part>): Promise<GenerateContentResult>;
107+
```
108+
109+
#### Parameters
110+
111+
| Parameter | Type | Description |
112+
| --- | --- | --- |
113+
| request | string \| Array&lt;string \| [Part](./vertexai-preview.md#part)<!-- -->&gt; | |
114+
115+
<b>Returns:</b>
116+
117+
Promise&lt;[GenerateContentResult](./vertexai-preview.generatecontentresult.md#generatecontentresult_interface)<!-- -->&gt;
118+
119+
## ChatSession.sendMessageStream()
120+
121+
Sends a chat message and receives the response as a [GenerateContentStreamResult](./vertexai-preview.generatecontentstreamresult.md#generatecontentstreamresult_interface) containing an iterable stream and a response promise.
122+
123+
<b>Signature:</b>
124+
125+
```typescript
126+
sendMessageStream(request: string | Array<string | Part>): Promise<GenerateContentStreamResult>;
127+
```
128+
129+
#### Parameters
130+
131+
| Parameter | Type | Description |
132+
| --- | --- | --- |
133+
| request | string \| Array&lt;string \| [Part](./vertexai-preview.md#part)<!-- -->&gt; | |
134+
135+
<b>Returns:</b>
136+
137+
Promise&lt;[GenerateContentStreamResult](./vertexai-preview.generatecontentstreamresult.md#generatecontentstreamresult_interface)<!-- -->&gt;
138+
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# Citation interface
13+
A single citation.
14+
15+
<b>Signature:</b>
16+
17+
```typescript
18+
export interface Citation
19+
```
20+
21+
## Properties
22+
23+
| Property | Type | Description |
24+
| --- | --- | --- |
25+
| [endIndex](./vertexai-preview.citation.md#citationendindex) | number | |
26+
| [license](./vertexai-preview.citation.md#citationlicense) | string | |
27+
| [publicationDate](./vertexai-preview.citation.md#citationpublicationdate) | Date | |
28+
| [startIndex](./vertexai-preview.citation.md#citationstartindex) | number | |
29+
| [title](./vertexai-preview.citation.md#citationtitle) | string | |
30+
| [uri](./vertexai-preview.citation.md#citationuri) | string | |
31+
32+
## Citation.endIndex
33+
34+
<b>Signature:</b>
35+
36+
```typescript
37+
endIndex?: number;
38+
```
39+
40+
## Citation.license
41+
42+
<b>Signature:</b>
43+
44+
```typescript
45+
license?: string;
46+
```
47+
48+
## Citation.publicationDate
49+
50+
<b>Signature:</b>
51+
52+
```typescript
53+
publicationDate?: Date;
54+
```
55+
56+
## Citation.startIndex
57+
58+
<b>Signature:</b>
59+
60+
```typescript
61+
startIndex?: number;
62+
```
63+
64+
## Citation.title
65+
66+
<b>Signature:</b>
67+
68+
```typescript
69+
title?: string;
70+
```
71+
72+
## Citation.uri
73+
74+
<b>Signature:</b>
75+
76+
```typescript
77+
uri?: string;
78+
```
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# CitationMetadata interface
13+
Citation metadata that may be found on a [GenerateContentCandidate](./vertexai-preview.generatecontentcandidate.md#generatecontentcandidate_interface)<!-- -->.
14+
15+
<b>Signature:</b>
16+
17+
```typescript
18+
export interface CitationMetadata
19+
```
20+
21+
## Properties
22+
23+
| Property | Type | Description |
24+
| --- | --- | --- |
25+
| [citations](./vertexai-preview.citationmetadata.md#citationmetadatacitations) | [Citation](./vertexai-preview.citation.md#citation_interface)<!-- -->\[\] | |
26+
27+
## CitationMetadata.citations
28+
29+
<b>Signature:</b>
30+
31+
```typescript
32+
citations: Citation[];
33+
```
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# Content interface
13+
Content type for both prompts and response candidates.
14+
15+
<b>Signature:</b>
16+
17+
```typescript
18+
export interface Content
19+
```
20+
21+
## Properties
22+
23+
| Property | Type | Description |
24+
| --- | --- | --- |
25+
| [parts](./vertexai-preview.content.md#contentparts) | [Part](./vertexai-preview.md#part)<!-- -->\[\] | |
26+
| [role](./vertexai-preview.content.md#contentrole) | [Role](./vertexai-preview.md#role) | |
27+
28+
## Content.parts
29+
30+
<b>Signature:</b>
31+
32+
```typescript
33+
parts: Part[];
34+
```
35+
36+
## Content.role
37+
38+
<b>Signature:</b>
39+
40+
```typescript
41+
role: Role;
42+
```
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# CountTokensRequest interface
13+
Params for calling [GenerativeModel.countTokens()](./vertexai-preview.generativemodel.md#generativemodelcounttokens)
14+
15+
<b>Signature:</b>
16+
17+
```typescript
18+
export interface CountTokensRequest
19+
```
20+
21+
## Properties
22+
23+
| Property | Type | Description |
24+
| --- | --- | --- |
25+
| [contents](./vertexai-preview.counttokensrequest.md#counttokensrequestcontents) | [Content](./vertexai-preview.content.md#content_interface)<!-- -->\[\] | |
26+
27+
## CountTokensRequest.contents
28+
29+
<b>Signature:</b>
30+
31+
```typescript
32+
contents: Content[];
33+
```

0 commit comments

Comments
 (0)