Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions .changeset/tender-meals-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/ai': patch
---

Tag code execution with beta tag (public preview).
23 changes: 14 additions & 9 deletions common/api-review/ai.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,13 @@ export interface CitationMetadata {
citations: Citation[];
}

// @public
// @beta
export interface CodeExecutionResult {
outcome?: Outcome;
output?: string;
}

// @public
// @beta
export interface CodeExecutionResultPart {
// (undocumented)
codeExecutionResult?: CodeExecutionResult;
Expand All @@ -203,7 +203,7 @@ export interface CodeExecutionResultPart {
thoughtSignature?: never;
}

// @public
// @beta
export interface CodeExecutionTool {
codeExecution: {};
}
Expand Down Expand Up @@ -271,13 +271,13 @@ export interface ErrorDetails {
reason?: string;
}

// @public
// @beta
export interface ExecutableCode {
code?: string;
language?: Language;
}

// @public
// @beta
export interface ExecutableCodePart {
// (undocumented)
codeExecutionResult?: never;
Expand Down Expand Up @@ -836,13 +836,13 @@ export class IntegerSchema extends Schema {
constructor(schemaParams?: SchemaParams);
}

// @public
// @beta
export const Language: {
UNSPECIFIED: string;
PYTHON: string;
};

// @public
// @beta
export type Language = (typeof Language)[keyof typeof Language];

// @beta
Expand Down Expand Up @@ -1058,17 +1058,20 @@ export interface OnDeviceParams {
promptOptions?: LanguageModelPromptOptions;
}

// @public
// @beta
export const Outcome: {
UNSPECIFIED: string;
OK: string;
FAILED: string;
DEADLINE_EXCEEDED: string;
};

// @public
// @beta
export type Outcome = (typeof Outcome)[keyof typeof Outcome];

// Warning: (ae-incompatible-release-tags) The symbol "Part" is marked as @public, but its signature references "ExecutableCodePart" which is marked as @beta
// Warning: (ae-incompatible-release-tags) The symbol "Part" is marked as @public, but its signature references "CodeExecutionResultPart" which is marked as @beta
//
// @public
export type Part = TextPart | InlineDataPart | FunctionCallPart | FunctionResponsePart | FileDataPart | ExecutableCodePart | CodeExecutionResultPart;

Expand Down Expand Up @@ -1304,6 +1307,8 @@ export interface ThinkingConfig {
thinkingBudget?: number;
}

// Warning: (ae-incompatible-release-tags) The symbol "Tool" is marked as @public, but its signature references "CodeExecutionTool" which is marked as @beta
//
// @public
export type Tool = FunctionDeclarationsTool | GoogleSearchTool | CodeExecutionTool;

Expand Down
13 changes: 11 additions & 2 deletions docs-devsite/ai.codeexecutionresult.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ https://github.com/firebase/firebase-js-sdk
{% endcomment %}

# CodeExecutionResult interface
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
The results of code execution run by the model.

<b>Signature:</b>
Expand All @@ -22,11 +25,14 @@ export interface CodeExecutionResult

| Property | Type | Description |
| --- | --- | --- |
| [outcome](./ai.codeexecutionresult.md#codeexecutionresultoutcome) | [Outcome](./ai.md#outcome) | The result of the code execution. |
| [output](./ai.codeexecutionresult.md#codeexecutionresultoutput) | string | The output from the code execution, or an error message if it failed. |
| [outcome](./ai.codeexecutionresult.md#codeexecutionresultoutcome) | [Outcome](./ai.md#outcome) | <b><i>(Public Preview)</i></b> The result of the code execution. |
| [output](./ai.codeexecutionresult.md#codeexecutionresultoutput) | string | <b><i>(Public Preview)</i></b> The output from the code execution, or an error message if it failed. |

## CodeExecutionResult.outcome

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

The result of the code execution.

<b>Signature:</b>
Expand All @@ -37,6 +43,9 @@ outcome?: Outcome;

## CodeExecutionResult.output

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

The output from the code execution, or an error message if it failed.

<b>Signature:</b>
Expand Down
43 changes: 35 additions & 8 deletions docs-devsite/ai.codeexecutionresultpart.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ https://github.com/firebase/firebase-js-sdk
{% endcomment %}

# CodeExecutionResultPart interface
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
Represents the code execution result from the model.

<b>Signature:</b>
Expand All @@ -22,17 +25,20 @@ export interface CodeExecutionResultPart

| Property | Type | Description |
| --- | --- | --- |
| [codeExecutionResult](./ai.codeexecutionresultpart.md#codeexecutionresultpartcodeexecutionresult) | [CodeExecutionResult](./ai.codeexecutionresult.md#codeexecutionresult_interface) | |
| [executableCode](./ai.codeexecutionresultpart.md#codeexecutionresultpartexecutablecode) | never | |
| [fileData](./ai.codeexecutionresultpart.md#codeexecutionresultpartfiledata) | never | |
| [functionCall](./ai.codeexecutionresultpart.md#codeexecutionresultpartfunctioncall) | never | |
| [functionResponse](./ai.codeexecutionresultpart.md#codeexecutionresultpartfunctionresponse) | never | |
| [inlineData](./ai.codeexecutionresultpart.md#codeexecutionresultpartinlinedata) | never | |
| [text](./ai.codeexecutionresultpart.md#codeexecutionresultparttext) | never | |
| [thought](./ai.codeexecutionresultpart.md#codeexecutionresultpartthought) | never | |
| [codeExecutionResult](./ai.codeexecutionresultpart.md#codeexecutionresultpartcodeexecutionresult) | [CodeExecutionResult](./ai.codeexecutionresult.md#codeexecutionresult_interface) | <b><i>(Public Preview)</i></b> |
| [executableCode](./ai.codeexecutionresultpart.md#codeexecutionresultpartexecutablecode) | never | <b><i>(Public Preview)</i></b> |
| [fileData](./ai.codeexecutionresultpart.md#codeexecutionresultpartfiledata) | never | <b><i>(Public Preview)</i></b> |
| [functionCall](./ai.codeexecutionresultpart.md#codeexecutionresultpartfunctioncall) | never | <b><i>(Public Preview)</i></b> |
| [functionResponse](./ai.codeexecutionresultpart.md#codeexecutionresultpartfunctionresponse) | never | <b><i>(Public Preview)</i></b> |
| [inlineData](./ai.codeexecutionresultpart.md#codeexecutionresultpartinlinedata) | never | <b><i>(Public Preview)</i></b> |
| [text](./ai.codeexecutionresultpart.md#codeexecutionresultparttext) | never | <b><i>(Public Preview)</i></b> |
| [thought](./ai.codeexecutionresultpart.md#codeexecutionresultpartthought) | never | <b><i>(Public Preview)</i></b> |

## CodeExecutionResultPart.codeExecutionResult

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

<b>Signature:</b>

```typescript
Expand All @@ -41,6 +47,9 @@ codeExecutionResult?: CodeExecutionResult;

## CodeExecutionResultPart.executableCode

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

<b>Signature:</b>

```typescript
Expand All @@ -49,6 +58,9 @@ executableCode?: never;

## CodeExecutionResultPart.fileData

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

<b>Signature:</b>

```typescript
Expand All @@ -57,6 +69,9 @@ fileData: never;

## CodeExecutionResultPart.functionCall

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

<b>Signature:</b>

```typescript
Expand All @@ -65,6 +80,9 @@ functionCall?: never;

## CodeExecutionResultPart.functionResponse

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

<b>Signature:</b>

```typescript
Expand All @@ -73,6 +91,9 @@ functionResponse?: never;

## CodeExecutionResultPart.inlineData

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

<b>Signature:</b>

```typescript
Expand All @@ -81,6 +102,9 @@ inlineData?: never;

## CodeExecutionResultPart.text

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

<b>Signature:</b>

```typescript
Expand All @@ -89,6 +113,9 @@ text?: never;

## CodeExecutionResultPart.thought

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

<b>Signature:</b>

```typescript
Expand Down
8 changes: 7 additions & 1 deletion docs-devsite/ai.codeexecutiontool.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ https://github.com/firebase/firebase-js-sdk
{% endcomment %}

# CodeExecutionTool interface
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

A tool that enables the model to use code execution.

<b>Signature:</b>
Expand All @@ -22,10 +25,13 @@ export interface CodeExecutionTool

| Property | Type | Description |
| --- | --- | --- |
| [codeExecution](./ai.codeexecutiontool.md#codeexecutiontoolcodeexecution) | {} | Specifies the Google Search configuration. Currently, this is an empty object, but it's reserved for future configuration options. |
| [codeExecution](./ai.codeexecutiontool.md#codeexecutiontoolcodeexecution) | {} | <b><i>(Public Preview)</i></b> Specifies the Google Search configuration. Currently, this is an empty object, but it's reserved for future configuration options. |

## CodeExecutionTool.codeExecution

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

Specifies the Google Search configuration. Currently, this is an empty object, but it's reserved for future configuration options.

<b>Signature:</b>
Expand Down
13 changes: 11 additions & 2 deletions docs-devsite/ai.executablecode.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ https://github.com/firebase/firebase-js-sdk
{% endcomment %}

# ExecutableCode interface
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>
An interface for executable code returned by the model.

<b>Signature:</b>
Expand All @@ -22,11 +25,14 @@ export interface ExecutableCode

| Property | Type | Description |
| --- | --- | --- |
| [code](./ai.executablecode.md#executablecodecode) | string | The source code to be executed. |
| [language](./ai.executablecode.md#executablecodelanguage) | [Language](./ai.md#language) | The programming language of the code. |
| [code](./ai.executablecode.md#executablecodecode) | string | <b><i>(Public Preview)</i></b> The source code to be executed. |
| [language](./ai.executablecode.md#executablecodelanguage) | [Language](./ai.md#language) | <b><i>(Public Preview)</i></b> The programming language of the code. |

## ExecutableCode.code

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

The source code to be executed.

<b>Signature:</b>
Expand All @@ -37,6 +43,9 @@ code?: string;

## ExecutableCode.language

> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
>

The programming language of the code.

<b>Signature:</b>
Expand Down
Loading
Loading