Class protos.google.ai.generativelanguage.v1beta3.ModelService (2.6.0)

Represents a ModelService

Inheritance

$protobuf.rpc.Service > protos.google.ai.generativelanguage.v1beta3.ModelService

Package

@google-ai/generativelanguage

Constructors

(constructor)(rpcImpl, requestDelimited, responseDelimited)

constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);

Constructs a new ModelService service.

Parameters
Name Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Methods

create(rpcImpl, requestDelimited, responseDelimited)

public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ModelService;

Creates new ModelService service using the specified rpc implementation.

Parameters
Name Description
rpcImpl $protobuf.RPCImpl

RPC implementation

requestDelimited boolean

Whether requests are length-delimited

responseDelimited boolean

Whether responses are length-delimited

Returns
Type Description
ModelService

RPC service. Useful where requests and/or responses are streamed.

createTunedModel(request, callback)

public createTunedModel(request: google.ai.generativelanguage.v1beta3.ICreateTunedModelRequest, callback: google.ai.generativelanguage.v1beta3.ModelService.CreateTunedModelCallback): void;

Calls CreateTunedModel.

Parameters
Name Description
request ICreateTunedModelRequest

CreateTunedModelRequest message or plain object

callback CreateTunedModelCallback

Node-style callback called with the error, if any, and Operation

Returns
Type Description
void

createTunedModel(request)

public createTunedModel(request: google.ai.generativelanguage.v1beta3.ICreateTunedModelRequest): Promise<google.longrunning.Operation>;

Calls CreateTunedModel.

Parameter
Name Description
request ICreateTunedModelRequest

CreateTunedModelRequest message or plain object

Returns
Type Description
Promise<google.longrunning.Operation>

Promise

deleteTunedModel(request, callback)

public deleteTunedModel(request: google.ai.generativelanguage.v1beta3.IDeleteTunedModelRequest, callback: google.ai.generativelanguage.v1beta3.ModelService.DeleteTunedModelCallback): void;

Calls DeleteTunedModel.

Parameters
Name Description
request IDeleteTunedModelRequest

DeleteTunedModelRequest message or plain object

callback DeleteTunedModelCallback

Node-style callback called with the error, if any, and Empty

Returns
Type Description
void

deleteTunedModel(request)

public deleteTunedModel(request: google.ai.generativelanguage.v1beta3.IDeleteTunedModelRequest): Promise<google.protobuf.Empty>;

Calls DeleteTunedModel.

Parameter
Name Description
request IDeleteTunedModelRequest

DeleteTunedModelRequest message or plain object

Returns
Type Description
Promise<google.protobuf.Empty>

Promise

getModel(request, callback)

public getModel(request: google.ai.generativelanguage.v1beta3.IGetModelRequest, callback: google.ai.generativelanguage.v1beta3.ModelService.GetModelCallback): void;

Calls GetModel.

Parameters
Name Description
request IGetModelRequest

GetModelRequest message or plain object

callback GetModelCallback

Node-style callback called with the error, if any, and Model

Returns
Type Description
void

getModel(request)

public getModel(request: google.ai.generativelanguage.v1beta3.IGetModelRequest): Promise<google.ai.generativelanguage.v1beta3.Model>;

Calls GetModel.

Parameter
Name Description
request IGetModelRequest

GetModelRequest message or plain object

Returns
Type Description
Promise<google.ai.generativelanguage.v1beta3.Model>

Promise

getTunedModel(request, callback)

public getTunedModel(request: google.ai.generativelanguage.v1beta3.IGetTunedModelRequest, callback: google.ai.generativelanguage.v1beta3.ModelService.GetTunedModelCallback): void;

Calls GetTunedModel.

Parameters
Name Description
request IGetTunedModelRequest

GetTunedModelRequest message or plain object

callback GetTunedModelCallback

Node-style callback called with the error, if any, and TunedModel

Returns
Type Description
void

getTunedModel(request)

public getTunedModel(request: google.ai.generativelanguage.v1beta3.IGetTunedModelRequest): Promise<google.ai.generativelanguage.v1beta3.TunedModel>;

Calls GetTunedModel.

Parameter
Name Description
request IGetTunedModelRequest

GetTunedModelRequest message or plain object

Returns
Type Description
Promise<google.ai.generativelanguage.v1beta3.TunedModel>

Promise

listModels(request, callback)

public listModels(request: google.ai.generativelanguage.v1beta3.IListModelsRequest, callback: google.ai.generativelanguage.v1beta3.ModelService.ListModelsCallback): void;

Calls ListModels.

Parameters
Name Description
request IListModelsRequest

ListModelsRequest message or plain object

callback ListModelsCallback

Node-style callback called with the error, if any, and ListModelsResponse

Returns
Type Description
void

listModels(request)

public listModels(request: google.ai.generativelanguage.v1beta3.IListModelsRequest): Promise<google.ai.generativelanguage.v1beta3.ListModelsResponse>;

Calls ListModels.

Parameter
Name Description
request IListModelsRequest

ListModelsRequest message or plain object

Returns
Type Description
Promise<google.ai.generativelanguage.v1beta3.ListModelsResponse>

Promise

listTunedModels(request, callback)

public listTunedModels(request: google.ai.generativelanguage.v1beta3.IListTunedModelsRequest, callback: google.ai.generativelanguage.v1beta3.ModelService.ListTunedModelsCallback): void;

Calls ListTunedModels.

Parameters
Name Description
request IListTunedModelsRequest

ListTunedModelsRequest message or plain object

callback ListTunedModelsCallback

Node-style callback called with the error, if any, and ListTunedModelsResponse

Returns
Type Description
void

listTunedModels(request)

public listTunedModels(request: google.ai.generativelanguage.v1beta3.IListTunedModelsRequest): Promise<google.ai.generativelanguage.v1beta3.ListTunedModelsResponse>;

Calls ListTunedModels.

Parameter
Name Description
request IListTunedModelsRequest

ListTunedModelsRequest message or plain object

Returns
Type Description
Promise<google.ai.generativelanguage.v1beta3.ListTunedModelsResponse>

Promise

updateTunedModel(request, callback)

public updateTunedModel(request: google.ai.generativelanguage.v1beta3.IUpdateTunedModelRequest, callback: google.ai.generativelanguage.v1beta3.ModelService.UpdateTunedModelCallback): void;

Calls UpdateTunedModel.

Parameters
Name Description
request IUpdateTunedModelRequest

UpdateTunedModelRequest message or plain object

callback UpdateTunedModelCallback

Node-style callback called with the error, if any, and TunedModel

Returns
Type Description
void

updateTunedModel(request)

public updateTunedModel(request: google.ai.generativelanguage.v1beta3.IUpdateTunedModelRequest): Promise<google.ai.generativelanguage.v1beta3.TunedModel>;

Calls UpdateTunedModel.

Parameter
Name Description
request IUpdateTunedModelRequest

UpdateTunedModelRequest message or plain object

Returns
Type Description
Promise<google.ai.generativelanguage.v1beta3.TunedModel>

Promise