From aef6fd556d1725bffa0fb4785c5317cc93da9ae9 Mon Sep 17 00:00:00 2001 From: Christina Holland Date: Wed, 24 Sep 2025 09:54:47 -0700 Subject: [PATCH] Run docgen --- .changeset/tender-meals-clap.md | 5 +++ common/api-review/ai.api.md | 23 +++++++----- docs-devsite/ai.codeexecutionresult.md | 13 ++++++- docs-devsite/ai.codeexecutionresultpart.md | 43 ++++++++++++++++++---- docs-devsite/ai.codeexecutiontool.md | 8 +++- docs-devsite/ai.executablecode.md | 13 ++++++- docs-devsite/ai.executablecodepart.md | 43 ++++++++++++++++++---- docs-devsite/ai.md | 30 ++++++++++----- packages/ai/src/types/content.ts | 8 ++-- packages/ai/src/types/enums.ts | 8 ++-- packages/ai/src/types/requests.ts | 2 +- 11 files changed, 148 insertions(+), 48 deletions(-) create mode 100644 .changeset/tender-meals-clap.md diff --git a/.changeset/tender-meals-clap.md b/.changeset/tender-meals-clap.md new file mode 100644 index 00000000000..44509f4f489 --- /dev/null +++ b/.changeset/tender-meals-clap.md @@ -0,0 +1,5 @@ +--- +'@firebase/ai': patch +--- + +Tag code execution with beta tag (public preview). diff --git a/common/api-review/ai.api.md b/common/api-review/ai.api.md index d4c3c1ad507..23983000554 100644 --- a/common/api-review/ai.api.md +++ b/common/api-review/ai.api.md @@ -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; @@ -203,7 +203,7 @@ export interface CodeExecutionResultPart { thoughtSignature?: never; } -// @public +// @beta export interface CodeExecutionTool { codeExecution: {}; } @@ -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; @@ -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 @@ -1058,7 +1058,7 @@ export interface OnDeviceParams { promptOptions?: LanguageModelPromptOptions; } -// @public +// @beta export const Outcome: { UNSPECIFIED: string; OK: string; @@ -1066,9 +1066,12 @@ export const Outcome: { 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; @@ -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; diff --git a/docs-devsite/ai.codeexecutionresult.md b/docs-devsite/ai.codeexecutionresult.md index d0be155c4e6..d9d937ecad6 100644 --- a/docs-devsite/ai.codeexecutionresult.md +++ b/docs-devsite/ai.codeexecutionresult.md @@ -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. Signature: @@ -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) | (Public Preview) The result of the code execution. | +| [output](./ai.codeexecutionresult.md#codeexecutionresultoutput) | string | (Public Preview) 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. Signature: @@ -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. Signature: diff --git a/docs-devsite/ai.codeexecutionresultpart.md b/docs-devsite/ai.codeexecutionresultpart.md index 6142a3ec79f..19364c5a7b7 100644 --- a/docs-devsite/ai.codeexecutionresultpart.md +++ b/docs-devsite/ai.codeexecutionresultpart.md @@ -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. Signature: @@ -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) | (Public Preview) | +| [executableCode](./ai.codeexecutionresultpart.md#codeexecutionresultpartexecutablecode) | never | (Public Preview) | +| [fileData](./ai.codeexecutionresultpart.md#codeexecutionresultpartfiledata) | never | (Public Preview) | +| [functionCall](./ai.codeexecutionresultpart.md#codeexecutionresultpartfunctioncall) | never | (Public Preview) | +| [functionResponse](./ai.codeexecutionresultpart.md#codeexecutionresultpartfunctionresponse) | never | (Public Preview) | +| [inlineData](./ai.codeexecutionresultpart.md#codeexecutionresultpartinlinedata) | never | (Public Preview) | +| [text](./ai.codeexecutionresultpart.md#codeexecutionresultparttext) | never | (Public Preview) | +| [thought](./ai.codeexecutionresultpart.md#codeexecutionresultpartthought) | never | (Public Preview) | ## 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. +> + Signature: ```typescript @@ -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. +> + Signature: ```typescript @@ -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. +> + Signature: ```typescript @@ -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. +> + Signature: ```typescript @@ -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. +> + Signature: ```typescript @@ -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. +> + Signature: ```typescript @@ -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. +> + Signature: ```typescript @@ -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. +> + Signature: ```typescript diff --git a/docs-devsite/ai.codeexecutiontool.md b/docs-devsite/ai.codeexecutiontool.md index 34a4715ac63..68a1e133d7b 100644 --- a/docs-devsite/ai.codeexecutiontool.md +++ b/docs-devsite/ai.codeexecutiontool.md @@ -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. Signature: @@ -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) | {} | (Public Preview) 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. Signature: diff --git a/docs-devsite/ai.executablecode.md b/docs-devsite/ai.executablecode.md index bab79bacc50..c2dfa09cd77 100644 --- a/docs-devsite/ai.executablecode.md +++ b/docs-devsite/ai.executablecode.md @@ -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. Signature: @@ -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 | (Public Preview) The source code to be executed. | +| [language](./ai.executablecode.md#executablecodelanguage) | [Language](./ai.md#language) | (Public Preview) 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. Signature: @@ -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. Signature: diff --git a/docs-devsite/ai.executablecodepart.md b/docs-devsite/ai.executablecodepart.md index 99c6bf05987..cac32c132ed 100644 --- a/docs-devsite/ai.executablecodepart.md +++ b/docs-devsite/ai.executablecodepart.md @@ -10,6 +10,9 @@ https://github.com/firebase/firebase-js-sdk {% endcomment %} # ExecutableCodePart 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 that is executed by the model. Signature: @@ -22,17 +25,20 @@ export interface ExecutableCodePart | Property | Type | Description | | --- | --- | --- | -| [codeExecutionResult](./ai.executablecodepart.md#executablecodepartcodeexecutionresult) | never | | -| [executableCode](./ai.executablecodepart.md#executablecodepartexecutablecode) | [ExecutableCode](./ai.executablecode.md#executablecode_interface) | | -| [fileData](./ai.executablecodepart.md#executablecodepartfiledata) | never | | -| [functionCall](./ai.executablecodepart.md#executablecodepartfunctioncall) | never | | -| [functionResponse](./ai.executablecodepart.md#executablecodepartfunctionresponse) | never | | -| [inlineData](./ai.executablecodepart.md#executablecodepartinlinedata) | never | | -| [text](./ai.executablecodepart.md#executablecodeparttext) | never | | -| [thought](./ai.executablecodepart.md#executablecodepartthought) | never | | +| [codeExecutionResult](./ai.executablecodepart.md#executablecodepartcodeexecutionresult) | never | (Public Preview) | +| [executableCode](./ai.executablecodepart.md#executablecodepartexecutablecode) | [ExecutableCode](./ai.executablecode.md#executablecode_interface) | (Public Preview) | +| [fileData](./ai.executablecodepart.md#executablecodepartfiledata) | never | (Public Preview) | +| [functionCall](./ai.executablecodepart.md#executablecodepartfunctioncall) | never | (Public Preview) | +| [functionResponse](./ai.executablecodepart.md#executablecodepartfunctionresponse) | never | (Public Preview) | +| [inlineData](./ai.executablecodepart.md#executablecodepartinlinedata) | never | (Public Preview) | +| [text](./ai.executablecodepart.md#executablecodeparttext) | never | (Public Preview) | +| [thought](./ai.executablecodepart.md#executablecodepartthought) | never | (Public Preview) | ## ExecutableCodePart.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. +> + Signature: ```typescript @@ -41,6 +47,9 @@ codeExecutionResult?: never; ## ExecutableCodePart.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. +> + Signature: ```typescript @@ -49,6 +58,9 @@ executableCode?: ExecutableCode; ## ExecutableCodePart.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. +> + Signature: ```typescript @@ -57,6 +69,9 @@ fileData: never; ## ExecutableCodePart.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. +> + Signature: ```typescript @@ -65,6 +80,9 @@ functionCall?: never; ## ExecutableCodePart.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. +> + Signature: ```typescript @@ -73,6 +91,9 @@ functionResponse?: never; ## ExecutableCodePart.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. +> + Signature: ```typescript @@ -81,6 +102,9 @@ inlineData?: never; ## ExecutableCodePart.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. +> + Signature: ```typescript @@ -89,6 +113,9 @@ text?: never; ## ExecutableCodePart.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. +> + Signature: ```typescript diff --git a/docs-devsite/ai.md b/docs-devsite/ai.md index 78d82d23800..d377f934513 100644 --- a/docs-devsite/ai.md +++ b/docs-devsite/ai.md @@ -60,9 +60,9 @@ The Firebase AI Web SDK. | [ChromeAdapter](./ai.chromeadapter.md#chromeadapter_interface) | (Public Preview) Defines an inference "backend" that uses Chrome's on-device model, and encapsulates logic for detecting when on-device inference is possible.These methods should not be called directly by the user. | | [Citation](./ai.citation.md#citation_interface) | A single citation. | | [CitationMetadata](./ai.citationmetadata.md#citationmetadata_interface) | Citation metadata that may be found on a [GenerateContentCandidate](./ai.generatecontentcandidate.md#generatecontentcandidate_interface). | -| [CodeExecutionResult](./ai.codeexecutionresult.md#codeexecutionresult_interface) | The results of code execution run by the model. | -| [CodeExecutionResultPart](./ai.codeexecutionresultpart.md#codeexecutionresultpart_interface) | Represents the code execution result from the model. | -| [CodeExecutionTool](./ai.codeexecutiontool.md#codeexecutiontool_interface) | A tool that enables the model to use code execution. | +| [CodeExecutionResult](./ai.codeexecutionresult.md#codeexecutionresult_interface) | (Public Preview) The results of code execution run by the model. | +| [CodeExecutionResultPart](./ai.codeexecutionresultpart.md#codeexecutionresultpart_interface) | (Public Preview) Represents the code execution result from the model. | +| [CodeExecutionTool](./ai.codeexecutiontool.md#codeexecutiontool_interface) | (Public Preview) A tool that enables the model to use code execution. | | [Content](./ai.content.md#content_interface) | Content type for both prompts and response candidates. | | [CountTokensRequest](./ai.counttokensrequest.md#counttokensrequest_interface) | Params for calling [GenerativeModel.countTokens()](./ai.generativemodel.md#generativemodelcounttokens) | | [CountTokensResponse](./ai.counttokensresponse.md#counttokensresponse_interface) | Response from calling [GenerativeModel.countTokens()](./ai.generativemodel.md#generativemodelcounttokens). | @@ -70,8 +70,8 @@ The Firebase AI Web SDK. | [Date\_2](./ai.date_2.md#date_2_interface) | Protobuf google.type.Date | | [EnhancedGenerateContentResponse](./ai.enhancedgeneratecontentresponse.md#enhancedgeneratecontentresponse_interface) | Response object wrapped with helper methods. | | [ErrorDetails](./ai.errordetails.md#errordetails_interface) | Details object that may be included in an error response. | -| [ExecutableCode](./ai.executablecode.md#executablecode_interface) | An interface for executable code returned by the model. | -| [ExecutableCodePart](./ai.executablecodepart.md#executablecodepart_interface) | Represents the code that is executed by the model. | +| [ExecutableCode](./ai.executablecode.md#executablecode_interface) | (Public Preview) An interface for executable code returned by the model. | +| [ExecutableCodePart](./ai.executablecodepart.md#executablecodepart_interface) | (Public Preview) Represents the code that is executed by the model. | | [FileData](./ai.filedata.md#filedata_interface) | Data pointing to a file uploaded on Google Cloud Storage. | | [FileDataPart](./ai.filedatapart.md#filedatapart_interface) | Content part interface if the part represents [FileData](./ai.filedata.md#filedata_interface) | | [FunctionCall](./ai.functioncall.md#functioncall_interface) | A predicted [FunctionCall](./ai.functioncall.md#functioncall_interface) returned from the model that contains a string representing the [FunctionDeclaration.name](./ai.functiondeclaration.md#functiondeclarationname) and a structured JSON object containing the parameters and their values. | @@ -158,10 +158,10 @@ The Firebase AI Web SDK. | [ImagenPersonFilterLevel](./ai.md#imagenpersonfilterlevel) | (Public Preview) A filter level controlling whether generation of images containing people or faces is allowed.See the personGeneration documentation for more details. | | [ImagenSafetyFilterLevel](./ai.md#imagensafetyfilterlevel) | (Public Preview) A filter level controlling how aggressively to filter sensitive content.Text prompts provided as inputs and images (generated or uploaded) through Imagen on Vertex AI are assessed against a list of safety filters, which include 'harmful categories' (for example, violence, sexual, derogatory, and toxic). This filter level controls how aggressively to filter out potentially harmful content from responses. See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images) and the [Responsible AI and usage guidelines](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#safety-filters) for more details. | | [InferenceMode](./ai.md#inferencemode) | (Public Preview) Determines whether inference happens on-device or in-cloud. | -| [Language](./ai.md#language) | The programming language of the code. | +| [Language](./ai.md#language) | (Public Preview) The programming language of the code. | | [LiveResponseType](./ai.md#liveresponsetype) | (Public Preview) The types of responses that can be returned by [LiveSession.receive()](./ai.livesession.md#livesessionreceive). | | [Modality](./ai.md#modality) | Content part modality. | -| [Outcome](./ai.md#outcome) | Represents the result of the code execution. | +| [Outcome](./ai.md#outcome) | (Public Preview) Represents the result of the code execution. | | [POSSIBLE\_ROLES](./ai.md#possible_roles) | Possible roles. | | [ResponseModality](./ai.md#responsemodality) | (Public Preview) Generation modalities to be returned in generation responses. | | [SchemaType](./ai.md#schematype) | Contains the list of OpenAPI data types as defined by the [OpenAPI specification](https://swagger.io/docs/specification/data-models/data-types/) | @@ -184,13 +184,13 @@ The Firebase AI Web SDK. | [ImagenPersonFilterLevel](./ai.md#imagenpersonfilterlevel) | (Public Preview) A filter level controlling whether generation of images containing people or faces is allowed.See the personGeneration documentation for more details. | | [ImagenSafetyFilterLevel](./ai.md#imagensafetyfilterlevel) | (Public Preview) A filter level controlling how aggressively to filter sensitive content.Text prompts provided as inputs and images (generated or uploaded) through Imagen on Vertex AI are assessed against a list of safety filters, which include 'harmful categories' (for example, violence, sexual, derogatory, and toxic). This filter level controls how aggressively to filter out potentially harmful content from responses. See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images) and the [Responsible AI and usage guidelines](https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#safety-filters) for more details. | | [InferenceMode](./ai.md#inferencemode) | (Public Preview) Determines whether inference happens on-device or in-cloud. | -| [Language](./ai.md#language) | The programming language of the code. | +| [Language](./ai.md#language) | (Public Preview) The programming language of the code. | | [LanguageModelMessageContentValue](./ai.md#languagemodelmessagecontentvalue) | (Public Preview) Content formats that can be provided as on-device message content. | | [LanguageModelMessageRole](./ai.md#languagemodelmessagerole) | (Public Preview) Allowable roles for on-device language model usage. | | [LanguageModelMessageType](./ai.md#languagemodelmessagetype) | (Public Preview) Allowable types for on-device language model messages. | | [LiveResponseType](./ai.md#liveresponsetype) | (Public Preview) The types of responses that can be returned by [LiveSession.receive()](./ai.livesession.md#livesessionreceive). This is a property on all messages that can be used for type narrowing. This property is not returned by the server, it is assigned to a server message object once it's parsed. | | [Modality](./ai.md#modality) | Content part modality. | -| [Outcome](./ai.md#outcome) | Represents the result of the code execution. | +| [Outcome](./ai.md#outcome) | (Public Preview) Represents the result of the code execution. | | [Part](./ai.md#part) | Content part - includes text, image/video, or function call/response part types. | | [ResponseModality](./ai.md#responsemodality) | (Public Preview) Generation modalities to be returned in generation responses. | | [Role](./ai.md#role) | Role is the producer of the content. | @@ -651,6 +651,9 @@ InferenceMode: { ## 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. Signature: @@ -698,6 +701,9 @@ Modality: { ## 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. +> + Represents the result of the code execution. Signature: @@ -916,6 +922,9 @@ export type InferenceMode = (typeof InferenceMode)[keyof typeof InferenceMode]; ## 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. Signature: @@ -988,6 +997,9 @@ export type Modality = (typeof Modality)[keyof typeof Modality]; ## 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. +> + Represents the result of the code execution. Signature: diff --git a/packages/ai/src/types/content.ts b/packages/ai/src/types/content.ts index b51dcd9c69f..401a8cfb1a8 100644 --- a/packages/ai/src/types/content.ts +++ b/packages/ai/src/types/content.ts @@ -155,7 +155,7 @@ export interface FileDataPart { /** * Represents the code that is executed by the model. * - * @public + * @beta */ export interface ExecutableCodePart { text?: never; @@ -175,7 +175,7 @@ export interface ExecutableCodePart { /** * Represents the code execution result from the model. * - * @public + * @beta */ export interface CodeExecutionResultPart { text?: never; @@ -195,7 +195,7 @@ export interface CodeExecutionResultPart { /** * An interface for executable code returned by the model. * - * @public + * @beta */ export interface ExecutableCode { /** @@ -211,7 +211,7 @@ export interface ExecutableCode { /** * The results of code execution run by the model. * - * @public + * @beta */ export interface CodeExecutionResult { /** diff --git a/packages/ai/src/types/enums.ts b/packages/ai/src/types/enums.ts index 997df1265b0..cd7029df3b0 100644 --- a/packages/ai/src/types/enums.ts +++ b/packages/ai/src/types/enums.ts @@ -382,7 +382,7 @@ export type InferenceMode = (typeof InferenceMode)[keyof typeof InferenceMode]; /** * Represents the result of the code execution. * - * @public + * @beta */ export const Outcome = { UNSPECIFIED: 'OUTCOME_UNSPECIFIED', @@ -394,14 +394,14 @@ export const Outcome = { /** * Represents the result of the code execution. * - * @public + * @beta */ export type Outcome = (typeof Outcome)[keyof typeof Outcome]; /** * The programming language of the code. * - * @public + * @beta */ export const Language = { UNSPECIFIED: 'LANGUAGE_UNSPECIFIED', @@ -411,6 +411,6 @@ export const Language = { /** * The programming language of the code. * - * @public + * @beta */ export type Language = (typeof Language)[keyof typeof Language]; diff --git a/packages/ai/src/types/requests.ts b/packages/ai/src/types/requests.ts index eea03e55fe4..537750a573b 100644 --- a/packages/ai/src/types/requests.ts +++ b/packages/ai/src/types/requests.ts @@ -300,7 +300,7 @@ export interface GoogleSearchTool { /** * A tool that enables the model to use code execution. * - * @public + * @beta */ export interface CodeExecutionTool { /**