Skip to content

Generated

243 exports Source

Other

This resource represents a long-running operation that is the result of a network API call.

Signature

declare class AsyncBatchEmbedContentOperation extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Request for an AsyncBatchEmbedContent operation.

Signature

declare class AsyncBatchEmbedContentRequest extends ReadonlySide<
  {
    readonly batch: typeof EmbedContentBatch;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly batch: typeof EmbedContentBatch;
      }>,
      options?: MakeOptions,
    ]
  );
}

Response for a BatchGenerateContent operation.

Signature

declare class AsyncBatchEmbedContentResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Identifier for the source contributing to this attribution.

Signature

declare class AttributionSourceId extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Batch request to get embeddings from the model for a list of prompts.

Signature

declare class BatchEmbedContentsRequest extends ReadonlySide<
  {
    readonly requests: $Array<typeof EmbedContentRequest>;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly requests: $Array<typeof EmbedContentRequest>;
      }>,
      options?: MakeOptions,
    ]
  );
}

The response to a BatchEmbedContentsRequest.

Signature

declare class BatchEmbedContentsResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Batch request to get a text embedding from the model.

Signature

declare class BatchEmbedTextRequest extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The response to a EmbedTextRequest.

Signature

declare class BatchEmbedTextResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

This resource represents a long-running operation that is the result of a network API call.

Signature

declare class BatchGenerateContentOperation extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Request for a BatchGenerateContent operation.

Signature

declare class BatchGenerateContentRequest extends ReadonlySide<
  {
    readonly batch: typeof GenerateContentBatch;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly batch: typeof GenerateContentBatch;
      }>,
      options?: MakeOptions,
    ]
  );
}

Response for a BatchGenerateContent operation.

Signature

declare class BatchGenerateContentResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class BatchState extends any {
  constructor();
}

Stats about the batch.

Signature

declare class BatchStats extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Raw media bytes.

Text should not be sent as raw bytes, use the 'text' field.

Signature

declare class Blob extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Content that has been preprocessed and can be used in subsequent request to GenerativeService.

Cached content can be only used with model it was created for.

Signature

declare class CachedContent extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Metadata on the usage of the cached content.

Signature

declare class CachedContentUsageMetadata extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A response candidate generated from the model.

Signature

declare class Candidate extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Optional. Output only. The reason why the model stopped generating tokens.

If empty, the model has not stopped generating tokens.

Signature

declare class CandidateFinishReason extends any {
  constructor();
}

Parameters for telling the service how to chunk the file. inspired by google3/cloud/ai/platform/extension/lib/retrieval/config/chunker_config.proto

Signature

declare class ChunkingConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A collection of source attributions for a piece of content.

Signature

declare class CitationMetadata extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A citation to a source for a portion of a specific response.

Signature

declare class CitationSource extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

interface Client {
  readonly AsyncBatchEmbedContent: (
    model: string,
    options: ReadonlySide<
      {
        readonly batch: typeof EmbedContentBatch;
      },
      "Encoded"
    >,
  ) => Effect<AsyncBatchEmbedContentOperation, any>;
  readonly AsyncBatchEmbedContentByTunedModel: (
    tunedModel: string,
    options: ReadonlySide<
      {
        readonly batch: typeof EmbedContentBatch;
      },
      "Encoded"
    >,
  ) => Effect<AsyncBatchEmbedContentOperation, any>;
  readonly BatchEmbedContents: (
    model: string,
    options: ReadonlySide<
      {
        readonly requests: $Array<typeof EmbedContentRequest>;
      },
      "Encoded"
    >,
  ) => Effect<BatchEmbedContentsResponse, any>;
  readonly BatchEmbedText: (
    model: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<BatchEmbedTextResponse, any>;
  readonly BatchGenerateContent: (
    model: string,
    options: ReadonlySide<
      {
        readonly batch: typeof GenerateContentBatch;
      },
      "Encoded"
    >,
  ) => Effect<BatchGenerateContentOperation, any>;
  readonly BatchGenerateContentByTunedModel: (
    tunedModel: string,
    options: ReadonlySide<
      {
        readonly batch: typeof GenerateContentBatch;
      },
      "Encoded"
    >,
  ) => Effect<BatchGenerateContentOperation, any>;
  readonly CancelOperation: (generateContentBatch: string) => Effect<any, any>;
  readonly CountMessageTokens: (
    model: string,
    options: ReadonlySide<
      {
        readonly prompt: typeof MessagePrompt;
      },
      "Encoded"
    >,
  ) => Effect<CountMessageTokensResponse, any>;
  readonly CountTextTokens: (
    model: string,
    options: ReadonlySide<
      {
        readonly prompt: typeof TextPrompt;
      },
      "Encoded"
    >,
  ) => Effect<CountTextTokensResponse, any>;
  readonly CountTokens: (
    model: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<CountTokensResponse, any>;
  readonly CreateCachedContent: (options: { [key: string]: any }) => Effect<CachedContent, any>;
  readonly CreateCorpus: (options: { [key: string]: any }) => Effect<Corpus, any>;
  readonly CreateFile: (options: { [key: string]: any }) => Effect<CreateFileResponse, any>;
  readonly CreateFileSearchStore: (options: { [key: string]: any }) => Effect<FileSearchStore, any>;
  readonly CreatePermission: (
    tunedModel: string,
    options: ReadonlySide<Fields, "Encoded">,
  ) => Effect<Permission, any>;
  readonly CreatePermissionByCorpus: (
    corpus: string,
    options: ReadonlySide<Fields, "Encoded">,
  ) => Effect<Permission, any>;
  readonly CreateTunedModel: (options: {
    readonly params?: any;
    readonly payload: {
      [key: string]: any;
    };
  }) => Effect<CreateTunedModelOperation, any>;
  readonly DeleteCachedContent: (id: string) => Effect<any, any>;
  readonly DeleteCorpus: (corpus: string, options?: any) => Effect<any, any>;
  readonly DeleteDocument: (
    fileSearchStore: string,
    document: string,
    options?: any,
  ) => Effect<any, any>;
  readonly DeleteFile: (file: string) => Effect<any, any>;
  readonly DeleteFileSearchStore: (fileSearchStore: string, options?: any) => Effect<any, any>;
  readonly DeleteOperation: (generateContentBatch: string) => Effect<any, any>;
  readonly DeletePermission: (tunedModel: string, permission: string) => Effect<any, any>;
  readonly DeletePermissionByCorpusAndPermission: (
    corpus: string,
    permission: string,
  ) => Effect<any, any>;
  readonly DeleteTunedModel: (tunedModel: string) => Effect<any, any>;
  readonly DownloadFile: (file: string) => Effect<any, any>;
  readonly EmbedContent: (
    model: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<EmbedContentResponse, any>;
  readonly EmbedText: (
    model: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<EmbedTextResponse, any>;
  readonly GenerateAnswer: (
    model: string,
    options: ReadonlySide<Fields, "Encoded">,
  ) => Effect<GenerateAnswerResponse, any>;
  readonly GenerateContent: (
    model: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<GenerateContentResponse, any>;
  readonly GenerateContentByDynamicId: (
    dynamicId: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<GenerateContentResponse, any>;
  readonly GenerateContentByTunedModel: (
    tunedModel: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<GenerateContentResponse, any>;
  readonly GenerateMessage: (
    model: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<GenerateMessageResponse, any>;
  readonly GenerateText: (
    model: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<GenerateTextResponse, any>;
  readonly GenerateTextByTunedModel: (
    tunedModel: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<GenerateTextResponse, any>;
  readonly GetCachedContent: (id: string) => Effect<CachedContent, any>;
  readonly GetCorpus: (corpus: string) => Effect<Corpus, any>;
  readonly GetDocument: (fileSearchStore: string, document: string) => Effect<Document, any>;
  readonly GetFile: (file: string) => Effect<File, any>;
  readonly GetFileSearchStore: (fileSearchStore: string) => Effect<FileSearchStore, any>;
  readonly GetGeneratedFile: (generatedFile: string) => Effect<GeneratedFile, any>;
  readonly GetModel: (model: string) => Effect<Model, any>;
  readonly GetOperation: (tunedModel: string, operation: string) => Effect<Operation, any>;
  readonly GetOperationByCorpusAndOperation: (
    corpus: string,
    operation: string,
  ) => Effect<Operation, any>;
  readonly GetOperationByFileSearchStoreAndOperation: (
    fileSearchStore: string,
    operation: string,
  ) => Effect<Operation, any>;
  readonly GetOperationByFileSearchStoresIdAndOperationsId: (
    fileSearchStoresId: string,
    operationsId: string,
  ) => Effect<Operation, any>;
  readonly GetOperationByGenerateContentBatch: (
    generateContentBatch: string,
  ) => Effect<Operation, any>;
  readonly GetOperationByGeneratedFileAndOperation: (
    generatedFile: string,
    operation: string,
  ) => Effect<Operation, any>;
  readonly GetOperationByModelAndOperation: (
    model: string,
    operation: string,
  ) => Effect<Operation, any>;
  readonly GetPermission: (tunedModel: string, permission: string) => Effect<Permission, any>;
  readonly GetPermissionByCorpusAndPermission: (
    corpus: string,
    permission: string,
  ) => Effect<Permission, any>;
  readonly GetTunedModel: (tunedModel: string) => Effect<TunedModel, any>;
  readonly httpClient: HttpClient;
  readonly ImportFile: (
    fileSearchStore: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<ImportFileOperation, any>;
  readonly ListCachedContents: (options?: any) => Effect<ListCachedContentsResponse, any>;
  readonly ListCorpora: (options?: any) => Effect<ListCorporaResponse, any>;
  readonly ListDocuments: (
    fileSearchStore: string,
    options?: any,
  ) => Effect<ListDocumentsResponse, any>;
  readonly ListFiles: (options?: any) => Effect<ListFilesResponse, any>;
  readonly ListFileSearchStores: (options?: any) => Effect<ListFileSearchStoresResponse, any>;
  readonly ListGeneratedFiles: (options?: any) => Effect<ListGeneratedFilesResponse, any>;
  readonly ListModels: (options?: any) => Effect<ListModelsResponse, any>;
  readonly ListOperations: (
    tunedModel: string,
    options?: any,
  ) => Effect<ListOperationsResponse, any>;
  readonly ListOperationsBy: (options?: any) => Effect<ListOperationsResponse, any>;
  readonly ListOperationsByModel: (
    model: string,
    options?: any,
  ) => Effect<ListOperationsResponse, any>;
  readonly ListPermissions: (
    tunedModel: string,
    options?: any,
  ) => Effect<ListPermissionsResponse, any>;
  readonly ListPermissionsByCorpus: (
    corpus: string,
    options?: any,
  ) => Effect<ListPermissionsResponse, any>;
  readonly ListTunedModels: (options?: any) => Effect<ListTunedModelsResponse, any>;
  readonly Predict: (
    model: string,
    options: ReadonlySide<{}, "Encoded">,
  ) => Effect<PredictResponse, any>;
  readonly PredictLongRunning: (
    model: string,
    options: ReadonlySide<{}, "Encoded">,
  ) => Effect<PredictLongRunningOperation, any>;
  readonly StreamGenerateContent: (
    model: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<GenerateContentResponse, any>;
  readonly StreamGenerateContentByDynamicId: (
    dynamicId: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<GenerateContentResponse, any>;
  readonly StreamGenerateContentByTunedModel: (
    tunedModel: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<GenerateContentResponse, any>;
  readonly TransferOwnership: (
    tunedModel: string,
    options: ReadonlySide<
      {
        readonly emailAddress: String;
      },
      "Encoded"
    >,
  ) => Effect<any, any>;
  readonly UpdateCachedContent: (
    id: string,
    options: {
      readonly params?: any;
      readonly payload: {
        [key: string]: any;
      };
    },
  ) => Effect<CachedContent, any>;
  readonly UpdateEmbedContentBatch: (
    generateContentBatch: string,
    options: {
      readonly params?: any;
      readonly payload: {
        [key: string]: any;
      };
    },
  ) => Effect<EmbedContentBatch, any>;
  readonly UpdateGenerateContentBatch: (
    generateContentBatch: string,
    options: {
      readonly params?: any;
      readonly payload: {
        [key: string]: any;
      };
    },
  ) => Effect<GenerateContentBatch, any>;
  readonly UpdatePermission: (
    tunedModel: string,
    permission: string,
    options: {
      readonly params: any;
      readonly payload: ReadonlySide<Fields, "Encoded">;
    },
  ) => Effect<Permission, any>;
  readonly UpdatePermissionByCorpusAndPermission: (
    corpus: string,
    permission: string,
    options: {
      readonly params: any;
      readonly payload: ReadonlySide<Fields, "Encoded">;
    },
  ) => Effect<Permission, any>;
  readonly UpdateTunedModel: (
    tunedModel: string,
    options: {
      readonly params?: any;
      readonly payload: {
        [key: string]: any;
      };
    },
  ) => Effect<TunedModel, any>;
  readonly UploadToFileSearchStore: (
    fileSearchStore: string,
    options: {
      [key: string]: any;
    },
  ) => Effect<UploadToFileSearchStoreOperation, any>;
}

Signature

declare const ClientError: <Tag extends string, E>(
  tag: Tag,
  cause: E,
  response: HttpClientResponse,
) => ClientError<Tag, E>;

Signature

interface ClientError<Tag extends string, E> {
  readonly _tag: Tag;
  readonly cause: E;
  readonly request: HttpClientRequest;
  readonly response: HttpClientResponse;
}

Tool that executes code generated by the model, and automatically returns the result to the model.

See also ExecutableCode and CodeExecutionResult which are only generated when using this tool.

Signature

declare class CodeExecution extends any {
  constructor();
}

Result of executing the ExecutableCode.

Only generated when using the CodeExecution, and always follows a part containing the ExecutableCode.

Signature

declare class CodeExecutionResult extends ReadonlySide<Fields, "Type"> {
  [key: string]: unknown;
  [key: number]: unknown;
  [key: symbol]: unknown;
  constructor(...args: [props?: ReadonlyMakeIn<Fields>, options?: MakeOptions]);
}

Required. Outcome of the code execution.

Signature

declare class CodeExecutionResultOutcome extends any {
  constructor();
}

Computer Use tool type.

Signature

declare class ComputerUse extends ReadonlySide<Fields, "Type"> {
  [key: string]: unknown;
  [key: number]: unknown;
  [key: symbol]: unknown;
  constructor(...args: [props?: ReadonlyMakeIn<Fields>, options?: MakeOptions]);
}

Required. The environment being operated.

Signature

declare class ComputerUseEnvironment extends any {
  constructor();
}

Filter condition applicable to a single key.

Signature

declare class Condition extends ReadonlySide<Fields, "Type"> {
  [key: string]: unknown;
  [key: number]: unknown;
  [key: symbol]: unknown;
  constructor(...args: [props?: ReadonlyMakeIn<Fields>, options?: MakeOptions]);
}

Required. Operator applied to the given key-value pair to trigger the condition.

Signature

declare class ConditionOperation extends any {
  constructor();
}

The base structured datatype containing multi-part content of a message.

A Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn.

Signature

declare class Content extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A list of floats representing an embedding.

Signature

declare class ContentEmbedding extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Content filtering metadata associated with processing a single request.

ContentFilter contains a reason and an optional supporting string. The reason may be unspecified.

Signature

declare class ContentFilter extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The reason content was blocked during request processing.

Signature

declare class ContentFilterReason extends any {
  constructor();
}

A Corpus is a collection of Documents. A project can create up to 10 corpora.

Signature

declare class Corpus extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Counts the number of tokens in the prompt sent to a model.

Models may tokenize text differently, so each model may return a different token_count.

Signature

declare class CountMessageTokensRequest extends ReadonlySide<
  {
    readonly prompt: typeof MessagePrompt;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly prompt: typeof MessagePrompt;
      }>,
      options?: MakeOptions,
    ]
  );
}

A response from CountMessageTokens.

It returns the model's token_count for the prompt.

Signature

declare class CountMessageTokensResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Counts the number of tokens in the prompt sent to a model.

Models may tokenize text differently, so each model may return a different token_count.

Signature

declare class CountTextTokensRequest extends ReadonlySide<
  {
    readonly prompt: typeof TextPrompt;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly prompt: typeof TextPrompt;
      }>,
      options?: MakeOptions,
    ]
  );
}

A response from CountTextTokens.

It returns the model's token_count for the prompt.

Signature

declare class CountTextTokensResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Counts the number of tokens in the prompt sent to a model.

Models may tokenize text differently, so each model may return a different token_count.

Signature

declare class CountTokensRequest extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A response from CountTokens.

It returns the model's token_count for the prompt.

Signature

declare class CountTokensResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Request for CreateFile.

Signature

declare class CreateFileRequest extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Response for CreateFile.

Signature

declare class CreateFileResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Metadata about the state and progress of creating a tuned model returned from the long-running operation

Signature

declare class CreateTunedModelMetadata extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

This resource represents a long-running operation that is the result of a network API call.

Signature

declare class CreateTunedModelOperation extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class CreateTunedModelParams extends any {
  constructor();
}

User provided metadata stored as key-value pairs.

Signature

declare class CustomMetadata extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Dataset for training or validation.

Signature

declare class Dataset extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class DeleteCorpusParams extends any {
  constructor();
}

Signature

declare class DeleteDocumentParams extends any {
  constructor();
}

Signature

declare class DeleteFileSearchStoreParams extends any {
  constructor();
}

A Document is a collection of Chunks.

Signature

declare class Document extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Output only. Current state of the Document.

Signature

declare class DocumentState extends any {
  constructor();
}

Response for DownloadFile.

Signature

declare class DownloadFileResponse extends any {
  constructor();
}

Describes the options to customize dynamic retrieval.

Signature

declare class DynamicRetrievalConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The mode of the predictor to be used in dynamic retrieval.

Signature

declare class DynamicRetrievalConfigMode extends any {
  constructor();
}

A resource representing a batch of EmbedContent requests.

Signature

declare class EmbedContentBatch extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The output of a batch request. This is returned in the AsyncBatchEmbedContentResponse or the EmbedContentBatch.output field.

Signature

declare class EmbedContentBatchOutput extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Stats about the batch.

Signature

declare class EmbedContentBatchStats extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Request containing the Content for the model to embed.

Signature

declare class EmbedContentRequest extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The response to an EmbedContentRequest.

Signature

declare class EmbedContentResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A list of floats representing the embedding.

Signature

declare class Embedding extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Request to get a text embedding from the model.

Signature

declare class EmbedTextRequest extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The response to a EmbedTextRequest.

Signature

declare class EmbedTextResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance:

service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }

Signature

declare class Empty extends any {
  constructor();
}

An input/output example used to instruct the Model.

It demonstrates how the model should respond or format its response.

Signature

declare class Example extends ReadonlySide<
  {
    readonly input: typeof Message;
    readonly output: typeof Message;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly input: typeof Message;
        readonly output: typeof Message;
      }>,
      options?: MakeOptions,
    ]
  );
}

Code generated by the model that is meant to be executed, and the result returned to the model.

Only generated when using the CodeExecution tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated.

Signature

declare class ExecutableCode extends ReadonlySide<Fields, "Type"> {
  [key: string]: unknown;
  [key: number]: unknown;
  [key: symbol]: unknown;
  constructor(...args: [props?: ReadonlyMakeIn<Fields>, options?: MakeOptions]);
}

Required. Programming language of the code.

Signature

declare class ExecutableCodeLanguage extends any {
  constructor();
}

A file uploaded to the API. Next ID: 15

Signature

declare class File extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

URI based data.

Signature

declare class FileData extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora. Files are imported to Semantic Retrieval corpora using the ImportFile API.

Signature

declare class FileSearch extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A FileSearchStore is a collection of Documents.

Signature

declare class FileSearchStore extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Source of the File.

Signature

declare class FileSource extends any {
  constructor();
}

Output only. Processing state of the File.

Signature

declare class FileState extends any {
  constructor();
}

A predicted FunctionCall returned from the model that contains a string representing the FunctionDeclaration.name with the arguments and their values.

Signature

declare class FunctionCall extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Configuration for specifying function calling behavior.

Signature

declare class FunctionCallingConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Optional. Specifies the mode in which function calling should execute. If unspecified, the default value will be set to AUTO.

Signature

declare class FunctionCallingConfigMode extends any {
  constructor();
}

Structured representation of a function declaration as defined by the [OpenAPI 3.03 specification](https://spec.openapis.org/oas/v3.0.3). Included in this declaration are the function name and parameters. This FunctionDeclaration is a representation of a block of code that can be used as a Tool by the model and executed by the client.

Signature

declare class FunctionDeclaration extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Optional. Specifies the function Behavior. Currently only supported by the BidiGenerateContent method.

Signature

declare class FunctionDeclarationBehavior extends any {
  constructor();
}

The result output from a FunctionCall that contains a string representing the FunctionDeclaration.name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of aFunctionCall made based on model prediction.

Signature

declare class FunctionResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Raw media bytes for function response.

Text should not be sent as raw bytes, use the 'FunctionResponse.response' field.

Signature

declare class FunctionResponseBlob extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A datatype containing media that is part of a FunctionResponse message.

A FunctionResponsePart consists of data which has an associated datatype. A FunctionResponsePart can only contain one of the accepted types in FunctionResponsePart.data.

A FunctionResponsePart must have a fixed IANA MIME type identifying the type and subtype of the media if the inline_data field is filled with raw bytes.

Signature

declare class FunctionResponsePart extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE.

Signature

declare class FunctionResponseScheduling extends any {
  constructor();
}

Request to generate a grounded answer from the Model.

Signature

declare class GenerateAnswerRequest extends ReadonlySide<Fields, "Type"> {
  [key: string]: unknown;
  [key: number]: unknown;
  [key: symbol]: unknown;
  constructor(...args: [props?: ReadonlyMakeIn<Fields>, options?: MakeOptions]);
}

Required. Style in which answers should be returned.

Signature

declare class GenerateAnswerRequestAnswerStyle extends any {
  constructor();
}

Response from the model for a grounded answer.

Signature

declare class GenerateAnswerResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A resource representing a batch of GenerateContent requests.

Signature

declare class GenerateContentBatch extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The output of a batch request. This is returned in the BatchGenerateContentResponse or the GenerateContentBatch.output field.

Signature

declare class GenerateContentBatchOutput extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Request to generate a completion from the model.

Signature

declare class GenerateContentRequest extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Response from the model supporting multiple candidate responses.

Safety ratings and content filtering are reported for both prompt in GenerateContentResponse.prompt_feedback and for each candidate in finish_reason and in safety_ratings. The API: - Returns either all requested candidates or none of them - Returns no candidates at all only if there was something wrong with the prompt (check prompt_feedback) - Reports feedback on each candidate in finish_reason and safety_ratings.

Signature

declare class GenerateContentResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A file generated on behalf of a user.

Signature

declare class GeneratedFile extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Output only. The state of the GeneratedFile.

Signature

declare class GeneratedFileState extends any {
  constructor();
}

Request to generate a message response from the model.

Signature

declare class GenerateMessageRequest extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The response from the model.

This includes candidate messages and conversation history in the form of chronologically-ordered messages.

Signature

declare class GenerateMessageResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Request to generate a text completion response from the model.

Signature

declare class GenerateTextRequest extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The response from the model, including candidate completions.

Signature

declare class GenerateTextResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Configuration options for model generation and outputs. Not all parameters are configurable for every model.

Signature

declare class GenerationConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Optional. If specified, the media resolution specified will be used.

Signature

declare class GenerationConfigMediaResolution extends any {
  constructor();
}

Signature

declare class GenerativeLanguageModality extends any {
  constructor();
}

Grounding support.

Signature

declare class GoogleAiGenerativelanguageV1BetaGroundingSupport extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Segment of the content.

Signature

declare class GoogleAiGenerativelanguageV1BetaSegment extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The GoogleMaps Tool that provides geospatial context for the user's query.

Signature

declare class GoogleMaps extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google.

Signature

declare class GoogleSearch extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Tool to retrieve public web data for grounding, powered by Google.

Signature

declare class GoogleSearchRetrieval extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Attribution for a source that contributed to an answer.

Signature

declare class GroundingAttribution extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Grounding chunk.

Signature

declare class GroundingChunk extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Metadata returned to client when grounding is enabled.

Signature

declare class GroundingMetadata extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Passage included inline with a grounding configuration.

Signature

declare class GroundingPassage extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Identifier for a part within a GroundingPassage.

Signature

declare class GroundingPassageId extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A repeated list of passages.

Signature

declare class GroundingPassages extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class HarmCategory extends any {
  constructor();
}

Hyperparameters controlling the tuning process. Read more at https://ai.google.dev/docs/model_tuning_guidance

Signature

declare class Hyperparameters extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Config for image generation features.

Signature

declare class ImageConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Metadata for LongRunning ImportFile Operations.

Signature

declare class ImportFileMetadata extends any {
  constructor();
}

This resource represents a long-running operation that is the result of a network API call.

Signature

declare class ImportFileOperation extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Request for ImportFile to import a File API file with a FileSearchStore. LINT.IfChange(ImportFileRequest)

Signature

declare class ImportFileRequest extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Response for ImportFile to import a File API file with a FileSearchStore.

Signature

declare class ImportFileResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The request to be processed in the batch.

Signature

declare class InlinedEmbedContentRequest extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The requests to be processed in the batch if provided as part of the batch creation request.

Signature

declare class InlinedEmbedContentRequests extends ReadonlySide<
  {
    readonly requests: $Array<typeof InlinedEmbedContentRequest>;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly requests: $Array<typeof InlinedEmbedContentRequest>;
      }>,
      options?: MakeOptions,
    ]
  );
}

The response to a single request in the batch.

Signature

declare class InlinedEmbedContentResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The responses to the requests in the batch.

Signature

declare class InlinedEmbedContentResponses extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The request to be processed in the batch.

Signature

declare class InlinedRequest extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The requests to be processed in the batch if provided as part of the batch creation request.

Signature

declare class InlinedRequests extends ReadonlySide<
  {
    readonly requests: $Array<typeof InlinedRequest>;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly requests: $Array<typeof InlinedRequest>;
      }>,
      options?: MakeOptions,
    ]
  );
}

The response to a single request in the batch.

Signature

declare class InlinedResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The responses to the requests in the batch.

Signature

declare class InlinedResponses extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Configures the input to the batch request.

Signature

declare class InputConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Configures the input to the batch request.

Signature

declare class InputEmbedContentConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Feedback related to the input data used to answer the question, as opposed to the model-generated response to the question.

Signature

declare class InputFeedback extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Optional. If set, the input was blocked and no candidates are returned. Rephrase the input.

Signature

declare class InputFeedbackBlockReason extends any {
  constructor();
}

Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive).

The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.

Signature

declare class Interval extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.

Signature

declare class LatLng extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class ListCachedContentsParams extends any {
  constructor();
}

Response with CachedContents list.

Signature

declare class ListCachedContentsResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class ListCorporaParams extends any {
  constructor();
}

Response from ListCorpora containing a paginated list of Corpora. The results are sorted by ascending corpus.create_time.

Signature

declare class ListCorporaResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class ListDocumentsParams extends any {
  constructor();
}

Response from ListDocuments containing a paginated list of Documents. The Documents are sorted by ascending document.create_time.

Signature

declare class ListDocumentsResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class ListFileSearchStoresParams extends any {
  constructor();
}

Response from ListFileSearchStores containing a paginated list of FileSearchStores. The results are sorted by ascending file_search_store.create_time.

Signature

declare class ListFileSearchStoresResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class ListFilesParams extends any {
  constructor();
}

Response for ListFiles.

Signature

declare class ListFilesResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class ListGeneratedFilesParams extends any {
  constructor();
}

Response for ListGeneratedFiles.

Signature

declare class ListGeneratedFilesResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class ListModelsParams extends any {
  constructor();
}

Response from ListModel containing a paginated list of Models.

Signature

declare class ListModelsResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class ListOperationsByModelParams extends any {
  constructor();
}

Signature

declare class ListOperationsByParams extends any {
  constructor();
}

Signature

declare class ListOperationsParams extends any {
  constructor();
}

The response message for Operations.ListOperations.

Signature

declare class ListOperationsResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class ListPermissionsByCorpusParams extends any {
  constructor();
}

Signature

declare class ListPermissionsParams extends any {
  constructor();
}

Response from ListPermissions containing a paginated list of permissions.

Signature

declare class ListPermissionsResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class ListTunedModelsParams extends any {
  constructor();
}

Response from ListTunedModels containing a paginated list of Models.

Signature

declare class ListTunedModelsResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Logprobs Result

Signature

declare class LogprobsResult extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Candidate for the logprobs token and score.

Signature

declare class LogprobsResultCandidate extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare function make(
  httpClient: HttpClient,
  options: {
    readonly transformClient?: (client: HttpClient) => Effect<HttpClient>;
  },
): Client;

A grounding chunk from Google Maps. A Maps chunk corresponds to a single place.

Signature

declare class Maps extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 5

Signature

declare class McpServer extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A proto encapsulate various type of media.

Signature

declare class Media extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Media resolution for the input media.

Signature

declare class MediaResolution extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class MediaResolutionLevel extends any {
  constructor();
}

The base unit of structured text.

A Message includes an author and the content of the Message.

The author is used to tag messages when they are fed to the model as text.

Signature

declare class Message extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

All of the structured input text passed to the model as a prompt.

A MessagePrompt contains a structured set of fields that provide context for the conversation, examples of user input/model output message pairs that prime the model to respond in different ways, and the conversation history or list of messages representing the alternating turns of the conversation between the user and the model.

Signature

declare class MessagePrompt extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

User provided filter to limit retrieval based on Chunk or Document level metadata values. Example (genre = drama OR genre = action): key = "document.custom_metadata.genre" conditions = [{string_value = "drama", operation = EQUAL}, {string_value = "action", operation = EQUAL}]

Signature

declare class MetadataFilter extends ReadonlySide<
  {
    readonly conditions: $Array<typeof Condition>;
    readonly key: String;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly conditions: $Array<typeof Condition>;
        readonly key: String;
      }>,
      options?: MakeOptions,
    ]
  );
}

Represents token counting info for a single modality.

Signature

declare class ModalityTokenCount extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Information about a Generative Language Model.

Signature

declare class Model extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The configuration for the multi-speaker setup.

Signature

declare class MultiSpeakerVoiceConfig extends ReadonlySide<
  {
    readonly speakerVoiceConfigs: $Array<typeof SpeakerVoiceConfig>;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly speakerVoiceConfigs: $Array<typeof SpeakerVoiceConfig>;
      }>,
      options?: MakeOptions,
    ]
  );
}

This resource represents a long-running operation that is the result of a network API call.

Signature

declare class Operation extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A datatype containing media that is part of a multi-part Content message.

A Part consists of data which has an associated datatype. A Part can only contain one of the accepted types in Part.data.

A Part must have a fixed IANA MIME type identifying the type and subtype of the media if the inline_data field is filled with raw bytes.

Signature

declare class Part extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Permission resource grants user, group or the rest of the world access to the PaLM API resource (e.g. a tuned model, corpus).

A role is a collection of permitted operations that allows users to perform specific actions on PaLM API resources. To make them available to users, groups, or service accounts, you assign roles. When you assign a role, you grant permissions that the role contains.

There are three concentric roles. Each role is a superset of the previous role's permitted operations:

- reader can use the resource (e.g. tuned model, corpus) for inference - writer has reader's permissions and additionally can edit and share - owner has writer's permissions and additionally can delete

Signature

declare class Permission extends ReadonlySide<Fields, "Type"> {
  [key: string]: unknown;
  [key: number]: unknown;
  [key: symbol]: unknown;
  constructor(...args: [props?: ReadonlyMakeIn<Fields>, options?: MakeOptions]);
}

Optional. Immutable. The type of the grantee.

Signature

declare class PermissionGranteeType extends any {
  constructor();
}

Required. The role granted by this permission.

Signature

declare class PermissionRole extends any {
  constructor();
}

Collection of sources that provide answers about the features of a given place in Google Maps. Each PlaceAnswerSources message corresponds to a specific place in Google Maps. The Google Maps tool used these sources in order to answer questions about features of the place (e.g: "does Bar Foo have Wifi" or "is Foo Bar wheelchair accessible?"). Currently we only support review snippets as sources.

Signature

declare class PlaceAnswerSources extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The configuration for the prebuilt speaker to use.

Signature

declare class PrebuiltVoiceConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Veo response.

Signature

declare class PredictLongRunningGeneratedVideoResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Metadata for PredictLongRunning long running operations.

Signature

declare class PredictLongRunningMetadata extends any {
  constructor();
}

This resource represents a long-running operation that is the result of a network API call.

Signature

declare class PredictLongRunningOperation extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Request message for [PredictionService.PredictLongRunning].

Signature

declare class PredictLongRunningRequest extends ReadonlySide<{}, "Type"> {
  constructor(...args: [props?: ReadonlyMakeIn<{}>, options?: MakeOptions]);
}

Response message for [PredictionService.PredictLongRunning]

Signature

declare class PredictLongRunningResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Request message for PredictionService.Predict.

Signature

declare class PredictRequest extends ReadonlySide<{}, "Type"> {
  constructor(...args: [props?: ReadonlyMakeIn<{}>, options?: MakeOptions]);
}

Response message for [PredictionService.Predict].

Signature

declare class PredictResponse extends ReadonlySide<{}, "Type"> {
  constructor(...args: [props?: ReadonlyMakeIn<{}>, options?: MakeOptions]);
}

A set of the feedback metadata the prompt specified in GenerateContentRequest.content.

Signature

declare class PromptFeedback extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Optional. If set, the prompt was blocked and no candidates are returned. Rephrase the prompt.

Signature

declare class PromptFeedbackBlockReason extends any {
  constructor();
}

Retrieval config.

Signature

declare class RetrievalConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Metadata related to retrieval in the grounding flow.

Signature

declare class RetrievalMetadata extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Chunk from context retrieved by the file search tool.

Signature

declare class RetrievedContext extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Signature

declare class ReviewSnippet extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Safety feedback for an entire request.

This field is populated if content in the input and/or response is blocked due to safety settings. SafetyFeedback may not exist for every HarmCategory. Each SafetyFeedback will return the safety settings used by the request as well as the lowest HarmProbability that should be allowed in order to return a result.

Signature

declare class SafetyFeedback extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Safety rating for a piece of content.

The safety rating contains the category of harm and the harm probability level in that category for a piece of content. Content is classified for safety across a number of harm categories and the probability of the harm classification is included here.

Signature

declare class SafetyRating extends ReadonlySide<Fields, "Type"> {
  [key: string]: unknown;
  [key: number]: unknown;
  [key: symbol]: unknown;
  constructor(...args: [props?: ReadonlyMakeIn<Fields>, options?: MakeOptions]);
}

Required. The probability of harm for this content.

Signature

declare class SafetyRatingProbability extends any {
  constructor();
}

Safety setting, affecting the safety-blocking behavior.

Passing a safety setting for a category changes the allowed probability that content is blocked.

Signature

declare class SafetySetting extends ReadonlySide<Fields, "Type"> {
  [key: string]: unknown;
  [key: number]: unknown;
  [key: symbol]: unknown;
  constructor(...args: [props?: ReadonlyMakeIn<Fields>, options?: MakeOptions]);
}

Required. Controls the probability threshold at which harm is blocked.

Signature

declare class SafetySettingThreshold extends any {
  constructor();
}

The Schema object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema).

Signature

declare class Schema extends ReadonlySide<Fields, "Type"> {
  [key: string]: unknown;
  [key: number]: unknown;
  [key: symbol]: unknown;
  constructor(...args: [props?: ReadonlyMakeIn<Fields>, options?: MakeOptions]);
}

The Schema object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema).

Signature

interface SchemaEncoded extends Encoded<typeof schemaFields> {
  [key: string]: any;
  readonly anyOf?: readonly Array<SchemaEncoded> | null;
  readonly items?: SchemaEncoded | null;
}

Google search entry point.

Signature

declare class SearchEntryPoint extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Identifier for a Chunk retrieved via Semantic Retriever specified in the GenerateAnswerRequest using SemanticRetrieverConfig.

Signature

declare class SemanticRetrieverChunk extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Configuration for retrieving grounding content from a Corpus or Document created using the Semantic Retriever API.

Signature

declare class SemanticRetrieverConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The configuration for a single speaker in a multi speaker setup.

Signature

declare class SpeakerVoiceConfig extends ReadonlySide<
  {
    readonly speaker: String;
    readonly voiceConfig: typeof VoiceConfig;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly speaker: String;
        readonly voiceConfig: typeof VoiceConfig;
      }>,
      options?: MakeOptions,
    ]
  );
}

The speech generation config.

Signature

declare class SpeechConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each Status message contains three pieces of data: error code, error message, and error details.

You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).

Signature

declare class Status extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A transport that can stream HTTP requests and responses. Next ID: 6

Signature

declare class StreamableHttpTransport extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

User provided string values assigned to a single metadata key.

Signature

declare class StringList extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class TaskType extends any {
  constructor();
}

Output text returned from a model.

Signature

declare class TextCompletion extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Text given to the model as a prompt.

The Model will use this TextPrompt to Generate a text completion.

Signature

declare class TextPrompt extends ReadonlySide<
  {
    readonly text: String;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly text: String;
      }>,
      options?: MakeOptions,
    ]
  );
}

Config for thinking features.

Signature

declare class ThinkingConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Optional. Controls the maximum depth of the model's internal reasoning process before it produces a response. If not specified, the default is HIGH. Recommended for Gemini 3 or later models. Use with earlier models results in an error.

Signature

declare class ThinkingConfigThinkingLevel extends any {
  constructor();
}

Tool details that the model may use to generate response.

A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model.

Next ID: 14

Signature

declare class Tool extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The Tool configuration containing parameters for specifying Tool use in the request.

Signature

declare class ToolConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Candidates with top log probabilities at each decoding step.

Signature

declare class TopCandidates extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Request to transfer the ownership of the tuned model.

Signature

declare class TransferOwnershipRequest extends ReadonlySide<
  {
    readonly emailAddress: String;
  },
  "Type"
> {
  constructor(
    ...args: [
      props: ReadonlyMakeIn<{
        readonly emailAddress: String;
      }>,
      options?: MakeOptions,
    ]
  );
}

Response from TransferOwnership.

Signature

declare class TransferOwnershipResponse extends any {
  constructor();
}

A fine-tuned model created using ModelService.CreateTunedModel.

Signature

declare class TunedModel extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Tuned model as a source for training a new model.

Signature

declare class TunedModelSource extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Output only. The state of the tuned model.

Signature

declare class TunedModelState extends any {
  constructor();
}

A single example for tuning.

Signature

declare class TuningExample extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

A set of tuning examples. Can be training or validation data.

Signature

declare class TuningExamples extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Record for a single tuning step.

Signature

declare class TuningSnapshot extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Tuning tasks that create tuned models.

Signature

declare class TuningTask extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Signature

declare class Type extends any {
  constructor();
}

Signature

declare class UpdateCachedContentParams extends any {
  constructor();
}

Signature

declare class UpdateEmbedContentBatchParams extends any {
  constructor();
}

Signature

declare class UpdateGenerateContentBatchParams extends any {
  constructor();
}

Signature

declare class UpdatePermissionByCorpusAndPermissionParams extends any {
  constructor();
}

Signature

declare class UpdatePermissionParams extends any {
  constructor();
}

Signature

declare class UpdateTunedModelParams extends any {
  constructor();
}

Metadata for LongRunning UploadToFileSearchStore Operations.

Signature

declare class UploadToFileSearchStoreMetadata extends any {
  constructor();
}

This resource represents a long-running operation that is the result of a network API call.

Signature

declare class UploadToFileSearchStoreOperation extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Request for UploadToFileSearchStore.

Signature

declare class UploadToFileSearchStoreRequest extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Response from UploadToFileSearchStore.

Signature

declare class UploadToFileSearchStoreResponse extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Tool to support URL context retrieval.

Signature

declare class UrlContext extends any {
  constructor();
}

Metadata related to url context retrieval tool.

Signature

declare class UrlContextMetadata extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Context of the a single url retrieval.

Signature

declare class UrlMetadata extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Status of the url retrieval.

Signature

declare class UrlMetadataUrlRetrievalStatus extends any {
  constructor();
}

Metadata on the generation request's token usage.

Signature

declare class UsageMetadata extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Representation of a video.

Signature

declare class Video extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Metadata for a video File.

Signature

declare class VideoFileMetadata extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Metadata describes the input video content.

Signature

declare class VideoMetadata extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

The configuration for the voice to use.

Signature

declare class VoiceConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Chunk from the web.

Signature

declare class Web extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}

Configuration for a white space chunking algorithm [white space delimited].

Signature

declare class WhiteSpaceConfig extends {
  [key: string]: any;
} {
  [key: string]: any;
  constructor(...args: [props?: {
    [key: string]: any;
  }, options?: MakeOptions]);
}