Skip to content

VinF Hybrid Inference: Document exported LanguageModel types #9003

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 61 additions & 2 deletions common/api-review/vertexai.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,67 @@ export class IntegerSchema extends Schema {
constructor(schemaParams?: SchemaParams);
}

// @public
export interface LanguageModelCreateCoreOptions {
expectedInputs?: LanguageModelExpectedInput[];
// (undocumented)
temperature?: number;
// (undocumented)
topK?: number;
}

// @public
export interface LanguageModelCreateOptions extends LanguageModelCreateCoreOptions {
// (undocumented)
initialPrompts?: LanguageModelInitialPrompts;
// (undocumented)
signal?: AbortSignal;
// (undocumented)
systemPrompt?: string;
}

// @public
export interface LanguageModelExpectedInput {
// (undocumented)
languages?: string[];
// (undocumented)
type: LanguageModelMessageType;
}

// @public
export type LanguageModelInitialPrompts = LanguageModelMessage[] | LanguageModelMessageShorthand[];

// @public
export interface LanguageModelMessage {
// (undocumented)
content: LanguageModelMessageContent[];
// Warning: (ae-forgotten-export) The symbol "LanguageModelMessageRole" needs to be exported by the entry point index.d.ts
//
// (undocumented)
role: LanguageModelMessageRole;
}

// @public
export interface LanguageModelMessageContent {
// Warning: (ae-forgotten-export) The symbol "LanguageModelMessageContentValue" needs to be exported by the entry point index.d.ts
//
// (undocumented)
content: LanguageModelMessageContentValue;
// (undocumented)
type: LanguageModelMessageType;
}

// @public
export interface LanguageModelMessageShorthand {
// (undocumented)
content: string;
// (undocumented)
role: LanguageModelMessageRole;
}

// @public
export type LanguageModelMessageType = 'text' | 'image' | 'audio';

// @public
export enum Modality {
AUDIO = "AUDIO",
Expand Down Expand Up @@ -719,8 +780,6 @@ export interface ObjectSchemaInterface extends SchemaInterface {

// @public
export interface OnDeviceParams {
// Warning: (ae-forgotten-export) The symbol "LanguageModelCreateOptions" needs to be exported by the entry point index.d.ts
//
// (undocumented)
createOptions?: LanguageModelCreateOptions;
// Warning: (ae-forgotten-export) The symbol "LanguageModelPromptOptions" needs to be exported by the entry point index.d.ts
Expand Down
12 changes: 12 additions & 0 deletions docs-devsite/_toc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,18 @@ toc:
path: /docs/reference/js/vertexai.inlinedatapart.md
- title: IntegerSchema
path: /docs/reference/js/vertexai.integerschema.md
- title: LanguageModelCreateCoreOptions
path: /docs/reference/js/vertexai.languagemodelcreatecoreoptions.md
- title: LanguageModelCreateOptions
path: /docs/reference/js/vertexai.languagemodelcreateoptions.md
- title: LanguageModelExpectedInput
path: /docs/reference/js/vertexai.languagemodelexpectedinput.md
- title: LanguageModelMessage
path: /docs/reference/js/vertexai.languagemodelmessage.md
- title: LanguageModelMessageContent
path: /docs/reference/js/vertexai.languagemodelmessagecontent.md
- title: LanguageModelMessageShorthand
path: /docs/reference/js/vertexai.languagemodelmessageshorthand.md
- title: ModalityTokenCount
path: /docs/reference/js/vertexai.modalitytokencount.md
- title: ModelParams
Expand Down
53 changes: 53 additions & 0 deletions docs-devsite/vertexai.languagemodelcreatecoreoptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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 %}

# LanguageModelCreateCoreOptions interface
Defines Prompt API session configuration for availability checking and creation.

<b>Signature:</b>

```typescript
export interface LanguageModelCreateCoreOptions
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [expectedInputs](./vertexai.languagemodelcreatecoreoptions.md#languagemodelcreatecoreoptionsexpectedinputs) | [LanguageModelExpectedInput](./vertexai.languagemodelexpectedinput.md#languagemodelexpectedinput_interface)<!-- -->\[\] | Configures the Prompt API to prepare for the given input types. |
| [temperature](./vertexai.languagemodelcreatecoreoptions.md#languagemodelcreatecoreoptionstemperature) | number | |
| [topK](./vertexai.languagemodelcreatecoreoptions.md#languagemodelcreatecoreoptionstopk) | number | |

## LanguageModelCreateCoreOptions.expectedInputs

Configures the Prompt API to prepare for the given input types.

<b>Signature:</b>

```typescript
expectedInputs?: LanguageModelExpectedInput[];
```

## LanguageModelCreateCoreOptions.temperature

<b>Signature:</b>

```typescript
temperature?: number;
```

## LanguageModelCreateCoreOptions.topK

<b>Signature:</b>

```typescript
topK?: number;
```
54 changes: 54 additions & 0 deletions docs-devsite/vertexai.languagemodelcreateoptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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 %}

# LanguageModelCreateOptions interface
Defines Prompt API session configuration used during creation.

See Chrome's Prompt API explainer ([https://github.com/webmachinelearning/prompt-api](https://github.com/webmachinelearning/prompt-api)<!-- -->) for more context.

<b>Signature:</b>

```typescript
export interface LanguageModelCreateOptions extends LanguageModelCreateCoreOptions
```
<b>Extends:</b> [LanguageModelCreateCoreOptions](./vertexai.languagemodelcreatecoreoptions.md#languagemodelcreatecoreoptions_interface)

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [initialPrompts](./vertexai.languagemodelcreateoptions.md#languagemodelcreateoptionsinitialprompts) | [LanguageModelInitialPrompts](./vertexai.md#languagemodelinitialprompts) | |
| [signal](./vertexai.languagemodelcreateoptions.md#languagemodelcreateoptionssignal) | AbortSignal | |
| [systemPrompt](./vertexai.languagemodelcreateoptions.md#languagemodelcreateoptionssystemprompt) | string | |

## LanguageModelCreateOptions.initialPrompts

<b>Signature:</b>

```typescript
initialPrompts?: LanguageModelInitialPrompts;
```

## LanguageModelCreateOptions.signal

<b>Signature:</b>

```typescript
signal?: AbortSignal;
```

## LanguageModelCreateOptions.systemPrompt

<b>Signature:</b>

```typescript
systemPrompt?: string;
```
42 changes: 42 additions & 0 deletions docs-devsite/vertexai.languagemodelexpectedinput.md
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 %}

# LanguageModelExpectedInput interface
Defines input types to prepare for.

<b>Signature:</b>

```typescript
export interface LanguageModelExpectedInput
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [languages](./vertexai.languagemodelexpectedinput.md#languagemodelexpectedinputlanguages) | string\[\] | |
| [type](./vertexai.languagemodelexpectedinput.md#languagemodelexpectedinputtype) | [LanguageModelMessageType](./vertexai.md#languagemodelmessagetype) | |

## LanguageModelExpectedInput.languages

<b>Signature:</b>

```typescript
languages?: string[];
```

## LanguageModelExpectedInput.type

<b>Signature:</b>

```typescript
type: LanguageModelMessageType;
```
42 changes: 42 additions & 0 deletions docs-devsite/vertexai.languagemodelmessage.md
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 %}

# LanguageModelMessage interface
Defines a prompt format comparable to Vertex's [Content](./vertexai.content.md#content_interface)<!-- -->.

<b>Signature:</b>

```typescript
export interface LanguageModelMessage
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [content](./vertexai.languagemodelmessage.md#languagemodelmessagecontent) | [LanguageModelMessageContent](./vertexai.languagemodelmessagecontent.md#languagemodelmessagecontent_interface)<!-- -->\[\] | |
| [role](./vertexai.languagemodelmessage.md#languagemodelmessagerole) | LanguageModelMessageRole | |

## LanguageModelMessage.content

<b>Signature:</b>

```typescript
content: LanguageModelMessageContent[];
```

## LanguageModelMessage.role

<b>Signature:</b>

```typescript
role: LanguageModelMessageRole;
```
42 changes: 42 additions & 0 deletions docs-devsite/vertexai.languagemodelmessagecontent.md
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 %}

# LanguageModelMessageContent interface
Defines a prompt format comparable to Vertex's [Part](./vertexai.md#part)<!-- -->.

<b>Signature:</b>

```typescript
export interface LanguageModelMessageContent
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [content](./vertexai.languagemodelmessagecontent.md#languagemodelmessagecontentcontent) | LanguageModelMessageContentValue | |
| [type](./vertexai.languagemodelmessagecontent.md#languagemodelmessagecontenttype) | [LanguageModelMessageType](./vertexai.md#languagemodelmessagetype) | |

## LanguageModelMessageContent.content

<b>Signature:</b>

```typescript
content: LanguageModelMessageContentValue;
```

## LanguageModelMessageContent.type

<b>Signature:</b>

```typescript
type: LanguageModelMessageType;
```
42 changes: 42 additions & 0 deletions docs-devsite/vertexai.languagemodelmessageshorthand.md
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 %}

# LanguageModelMessageShorthand interface
Defines a prompt format comparable to a simplified Vertex [Content](./vertexai.content.md#content_interface)<!-- -->.

<b>Signature:</b>

```typescript
export interface LanguageModelMessageShorthand
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [content](./vertexai.languagemodelmessageshorthand.md#languagemodelmessageshorthandcontent) | string | |
| [role](./vertexai.languagemodelmessageshorthand.md#languagemodelmessageshorthandrole) | LanguageModelMessageRole | |

## LanguageModelMessageShorthand.content

<b>Signature:</b>

```typescript
content: string;
```

## LanguageModelMessageShorthand.role

<b>Signature:</b>

```typescript
role: LanguageModelMessageRole;
```
Loading
Loading