-
Notifications
You must be signed in to change notification settings - Fork 943
Generate vertex reference docs #8226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.