-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate vertex reference docs (#8226)
* generate vertex reference docs * Update docs-devsite/index.md Co-authored-by: rachelsaunders <52258509+rachelsaunders@users.noreply.github.com> * Update docs-devsite/vertexai-preview.vertexaioptions.md Co-authored-by: rachelsaunders <52258509+rachelsaunders@users.noreply.github.com> * addressed PR comments * regenerate --------- Co-authored-by: rachelsaunders <52258509+rachelsaunders@users.noreply.github.com>
- Loading branch information
1 parent
4c83b34
commit f688228
Showing
52 changed files
with
3,079 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Project: /docs/reference/js/_project.yaml | ||
Book: /docs/reference/_book.yaml | ||
page_type: reference | ||
|
||
{% comment %} | ||
DO NOT EDIT THIS FILE! | ||
This is generated by the JS SDK team, and any local changes will be | ||
overwritten. Changes should be made in the source code at | ||
https://github.com/firebase/firebase-js-sdk | ||
{% endcomment %} | ||
|
||
# BaseParams interface | ||
Base parameters for a number of methods. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface BaseParams | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [generationConfig](./vertexai-preview.baseparams.md#baseparamsgenerationconfig) | [GenerationConfig](./vertexai-preview.generationconfig.md#generationconfig_interface) | | | ||
| [safetySettings](./vertexai-preview.baseparams.md#baseparamssafetysettings) | [SafetySetting](./vertexai-preview.safetysetting.md#safetysetting_interface)<!-- -->\[\] | | | ||
|
||
## BaseParams.generationConfig | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
generationConfig?: GenerationConfig; | ||
``` | ||
|
||
## BaseParams.safetySettings | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
safetySettings?: SafetySetting[]; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
Project: /docs/reference/js/_project.yaml | ||
Book: /docs/reference/_book.yaml | ||
page_type: reference | ||
|
||
{% comment %} | ||
DO NOT EDIT THIS FILE! | ||
This is generated by the JS SDK team, and any local changes will be | ||
overwritten. Changes should be made in the source code at | ||
https://github.com/firebase/firebase-js-sdk | ||
{% endcomment %} | ||
|
||
# ChatSession class | ||
ChatSession class that enables sending chat messages and stores history of sent and received messages so far. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export declare class ChatSession | ||
``` | ||
|
||
## Constructors | ||
|
||
| Constructor | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [(constructor)(apiSettings, model, params, requestOptions)](./vertexai-preview.chatsession.md#chatsessionconstructor) | | Constructs a new instance of the <code>ChatSession</code> class | | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [model](./vertexai-preview.chatsession.md#chatsessionmodel) | | string | | | ||
| [params](./vertexai-preview.chatsession.md#chatsessionparams) | | [StartChatParams](./vertexai-preview.startchatparams.md#startchatparams_interface) \| undefined | | | ||
| [requestOptions](./vertexai-preview.chatsession.md#chatsessionrequestoptions) | | [RequestOptions](./vertexai-preview.requestoptions.md#requestoptions_interface) \| undefined | | | ||
|
||
## Methods | ||
|
||
| Method | Modifiers | Description | | ||
| --- | --- | --- | | ||
| [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. | | ||
| [sendMessage(request)](./vertexai-preview.chatsession.md#chatsessionsendmessage) | | Sends a chat message and receives a non-streaming [GenerateContentResult](./vertexai-preview.generatecontentresult.md#generatecontentresult_interface) | | ||
| [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. | | ||
|
||
## ChatSession.(constructor) | ||
|
||
Constructs a new instance of the `ChatSession` class | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
constructor(apiSettings: ApiSettings, model: string, params?: StartChatParams | undefined, requestOptions?: RequestOptions | undefined); | ||
``` | ||
|
||
#### Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| apiSettings | ApiSettings | | | ||
| model | string | | | ||
| params | [StartChatParams](./vertexai-preview.startchatparams.md#startchatparams_interface) \| undefined | | | ||
| requestOptions | [RequestOptions](./vertexai-preview.requestoptions.md#requestoptions_interface) \| undefined | | | ||
|
||
## ChatSession.model | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
model: string; | ||
``` | ||
|
||
## ChatSession.params | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
params?: StartChatParams | undefined; | ||
``` | ||
|
||
## ChatSession.requestOptions | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
requestOptions?: RequestOptions | undefined; | ||
``` | ||
|
||
## ChatSession.getHistory() | ||
|
||
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. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
getHistory(): Promise<Content[]>; | ||
``` | ||
<b>Returns:</b> | ||
|
||
Promise<[Content](./vertexai-preview.content.md#content_interface)<!-- -->\[\]> | ||
|
||
## ChatSession.sendMessage() | ||
|
||
Sends a chat message and receives a non-streaming [GenerateContentResult](./vertexai-preview.generatecontentresult.md#generatecontentresult_interface) | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
sendMessage(request: string | Array<string | Part>): Promise<GenerateContentResult>; | ||
``` | ||
|
||
#### Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| request | string \| Array<string \| [Part](./vertexai-preview.md#part)<!-- -->> | | | ||
|
||
<b>Returns:</b> | ||
|
||
Promise<[GenerateContentResult](./vertexai-preview.generatecontentresult.md#generatecontentresult_interface)<!-- -->> | ||
|
||
## ChatSession.sendMessageStream() | ||
|
||
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. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
sendMessageStream(request: string | Array<string | Part>): Promise<GenerateContentStreamResult>; | ||
``` | ||
|
||
#### Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| request | string \| Array<string \| [Part](./vertexai-preview.md#part)<!-- -->> | | | ||
|
||
<b>Returns:</b> | ||
|
||
Promise<[GenerateContentStreamResult](./vertexai-preview.generatecontentstreamresult.md#generatecontentstreamresult_interface)<!-- -->> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
Project: /docs/reference/js/_project.yaml | ||
Book: /docs/reference/_book.yaml | ||
page_type: reference | ||
|
||
{% comment %} | ||
DO NOT EDIT THIS FILE! | ||
This is generated by the JS SDK team, and any local changes will be | ||
overwritten. Changes should be made in the source code at | ||
https://github.com/firebase/firebase-js-sdk | ||
{% endcomment %} | ||
|
||
# Citation interface | ||
A single citation. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface Citation | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [endIndex](./vertexai-preview.citation.md#citationendindex) | number | | | ||
| [license](./vertexai-preview.citation.md#citationlicense) | string | | | ||
| [publicationDate](./vertexai-preview.citation.md#citationpublicationdate) | Date | | | ||
| [startIndex](./vertexai-preview.citation.md#citationstartindex) | number | | | ||
| [title](./vertexai-preview.citation.md#citationtitle) | string | | | ||
| [uri](./vertexai-preview.citation.md#citationuri) | string | | | ||
|
||
## Citation.endIndex | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
endIndex?: number; | ||
``` | ||
|
||
## Citation.license | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
license?: string; | ||
``` | ||
|
||
## Citation.publicationDate | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
publicationDate?: Date; | ||
``` | ||
|
||
## Citation.startIndex | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
startIndex?: number; | ||
``` | ||
|
||
## Citation.title | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
title?: string; | ||
``` | ||
|
||
## Citation.uri | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
uri?: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Project: /docs/reference/js/_project.yaml | ||
Book: /docs/reference/_book.yaml | ||
page_type: reference | ||
|
||
{% comment %} | ||
DO NOT EDIT THIS FILE! | ||
This is generated by the JS SDK team, and any local changes will be | ||
overwritten. Changes should be made in the source code at | ||
https://github.com/firebase/firebase-js-sdk | ||
{% endcomment %} | ||
|
||
# CitationMetadata interface | ||
Citation metadata that may be found on a [GenerateContentCandidate](./vertexai-preview.generatecontentcandidate.md#generatecontentcandidate_interface)<!-- -->. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface CitationMetadata | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [citations](./vertexai-preview.citationmetadata.md#citationmetadatacitations) | [Citation](./vertexai-preview.citation.md#citation_interface)<!-- -->\[\] | | | ||
|
||
## CitationMetadata.citations | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
citations: Citation[]; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Project: /docs/reference/js/_project.yaml | ||
Book: /docs/reference/_book.yaml | ||
page_type: reference | ||
|
||
{% comment %} | ||
DO NOT EDIT THIS FILE! | ||
This is generated by the JS SDK team, and any local changes will be | ||
overwritten. Changes should be made in the source code at | ||
https://github.com/firebase/firebase-js-sdk | ||
{% endcomment %} | ||
|
||
# Content interface | ||
Content type for both prompts and response candidates. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface Content | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [parts](./vertexai-preview.content.md#contentparts) | [Part](./vertexai-preview.md#part)<!-- -->\[\] | | | ||
| [role](./vertexai-preview.content.md#contentrole) | [Role](./vertexai-preview.md#role) | | | ||
|
||
## Content.parts | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
parts: Part[]; | ||
``` | ||
|
||
## Content.role | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
role: Role; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Project: /docs/reference/js/_project.yaml | ||
Book: /docs/reference/_book.yaml | ||
page_type: reference | ||
|
||
{% comment %} | ||
DO NOT EDIT THIS FILE! | ||
This is generated by the JS SDK team, and any local changes will be | ||
overwritten. Changes should be made in the source code at | ||
https://github.com/firebase/firebase-js-sdk | ||
{% endcomment %} | ||
|
||
# CountTokensRequest interface | ||
Params for calling [GenerativeModel.countTokens()](./vertexai-preview.generativemodel.md#generativemodelcounttokens) | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface CountTokensRequest | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [contents](./vertexai-preview.counttokensrequest.md#counttokensrequestcontents) | [Content](./vertexai-preview.content.md#content_interface)<!-- -->\[\] | | | ||
|
||
## CountTokensRequest.contents | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
contents: Content[]; | ||
``` |
Oops, something went wrong.