Skip to content

Commit

Permalink
GRPC clients version 11.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
clarifai-prod committed Jan 30, 2025
1 parent 2348647 commit 916d1e4
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
11.0.4
11.0.5
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clarifai-nodejs-grpc",
"version": "11.0.4",
"version": "11.0.5",
"description": "The official Clarifai Node.js gRPC client",
"main": "src/index.js",
"repository": "https://github.com/Clarifai/clarifai-javascript-grpc",
Expand Down
1 change: 1 addition & 0 deletions proto/clarifai/api/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4606,6 +4606,7 @@ message InstanceType {
// Short description of instance type.
string description = 2;
ComputeInfo compute_info = 3;
string price = 4;
}

// CloudProvider represents the entity that provides the infrastructure where the Nodepools are deployed.
Expand Down
3 changes: 3 additions & 0 deletions proto/clarifai/api/resources_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8376,6 +8376,8 @@ export class InstanceType extends jspb.Message {
clearComputeInfo(): void;
getComputeInfo(): ComputeInfo | undefined;
setComputeInfo(value?: ComputeInfo): InstanceType;
getPrice(): string;
setPrice(value: string): InstanceType;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): InstanceType.AsObject;
Expand All @@ -8392,6 +8394,7 @@ export namespace InstanceType {
id: string,
description: string,
computeInfo?: ComputeInfo.AsObject,
price: string,
}
}

Expand Down
32 changes: 31 additions & 1 deletion proto/clarifai/api/resources_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -69162,7 +69162,8 @@ proto.clarifai.api.InstanceType.toObject = function(includeInstance, msg) {
var f, obj = {
id: jspb.Message.getFieldWithDefault(msg, 1, ""),
description: jspb.Message.getFieldWithDefault(msg, 2, ""),
computeInfo: (f = msg.getComputeInfo()) && proto.clarifai.api.ComputeInfo.toObject(includeInstance, f)
computeInfo: (f = msg.getComputeInfo()) && proto.clarifai.api.ComputeInfo.toObject(includeInstance, f),
price: jspb.Message.getFieldWithDefault(msg, 4, "")
};

if (includeInstance) {
Expand Down Expand Up @@ -69212,6 +69213,10 @@ proto.clarifai.api.InstanceType.deserializeBinaryFromReader = function(msg, read
reader.readMessage(value,proto.clarifai.api.ComputeInfo.deserializeBinaryFromReader);
msg.setComputeInfo(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setPrice(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -69263,6 +69268,13 @@ proto.clarifai.api.InstanceType.serializeBinaryToWriter = function(message, writ
proto.clarifai.api.ComputeInfo.serializeBinaryToWriter
);
}
f = message.getPrice();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
};


Expand Down Expand Up @@ -69339,6 +69351,24 @@ proto.clarifai.api.InstanceType.prototype.hasComputeInfo = function() {
};


/**
* optional string price = 4;
* @return {string}
*/
proto.clarifai.api.InstanceType.prototype.getPrice = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
* @param {string} value
* @return {!proto.clarifai.api.InstanceType} returns this
*/
proto.clarifai.api.InstanceType.prototype.setPrice = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};





Expand Down
3 changes: 3 additions & 0 deletions proto/clarifai/api/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5266,6 +5266,9 @@ message PostModelOutputsRequest {

// Allow filtering of prediction requests down to specific Nodepools, Deployments or Runners
RunnerSelector runner_selector = 6;

// Configure the prediction cache to avoid expensive compute for predict requests
bool use_predict_cache = 7;
}

// Listing the inputs that went into training this model.
Expand Down
3 changes: 3 additions & 0 deletions proto/clarifai/api/service_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3177,6 +3177,8 @@ export class PostModelOutputsRequest extends jspb.Message {
clearRunnerSelector(): void;
getRunnerSelector(): proto_clarifai_api_resources_pb.RunnerSelector | undefined;
setRunnerSelector(value?: proto_clarifai_api_resources_pb.RunnerSelector): PostModelOutputsRequest;
getUsePredictCache(): boolean;
setUsePredictCache(value: boolean): PostModelOutputsRequest;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): PostModelOutputsRequest.AsObject;
Expand All @@ -3196,6 +3198,7 @@ export namespace PostModelOutputsRequest {
inputsList: Array<proto_clarifai_api_resources_pb.Input.AsObject>,
model?: proto_clarifai_api_resources_pb.Model.AsObject,
runnerSelector?: proto_clarifai_api_resources_pb.RunnerSelector.AsObject,
usePredictCache: boolean,
}
}

Expand Down
32 changes: 31 additions & 1 deletion proto/clarifai/api/service_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -31746,7 +31746,8 @@ proto.clarifai.api.PostModelOutputsRequest.toObject = function(includeInstance,
inputsList: jspb.Message.toObjectList(msg.getInputsList(),
proto_clarifai_api_resources_pb.Input.toObject, includeInstance),
model: (f = msg.getModel()) && proto_clarifai_api_resources_pb.Model.toObject(includeInstance, f),
runnerSelector: (f = msg.getRunnerSelector()) && proto_clarifai_api_resources_pb.RunnerSelector.toObject(includeInstance, f)
runnerSelector: (f = msg.getRunnerSelector()) && proto_clarifai_api_resources_pb.RunnerSelector.toObject(includeInstance, f),
usePredictCache: jspb.Message.getBooleanFieldWithDefault(msg, 7, false)
};

if (includeInstance) {
Expand Down Expand Up @@ -31811,6 +31812,10 @@ proto.clarifai.api.PostModelOutputsRequest.deserializeBinaryFromReader = functio
reader.readMessage(value,proto_clarifai_api_resources_pb.RunnerSelector.deserializeBinaryFromReader);
msg.setRunnerSelector(value);
break;
case 7:
var value = /** @type {boolean} */ (reader.readBool());
msg.setUsePredictCache(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -31886,6 +31891,13 @@ proto.clarifai.api.PostModelOutputsRequest.serializeBinaryToWriter = function(me
proto_clarifai_api_resources_pb.RunnerSelector.serializeBinaryToWriter
);
}
f = message.getUsePredictCache();
if (f) {
writer.writeBool(
7,
f
);
}
};


Expand Down Expand Up @@ -32074,6 +32086,24 @@ proto.clarifai.api.PostModelOutputsRequest.prototype.hasRunnerSelector = functio
};


/**
* optional bool use_predict_cache = 7;
* @return {boolean}
*/
proto.clarifai.api.PostModelOutputsRequest.prototype.getUsePredictCache = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false));
};


/**
* @param {boolean} value
* @return {!proto.clarifai.api.PostModelOutputsRequest} returns this
*/
proto.clarifai.api.PostModelOutputsRequest.prototype.setUsePredictCache = function(value) {
return jspb.Message.setProto3BooleanField(this, 7, value);
};





Expand Down
3 changes: 3 additions & 0 deletions proto/clarifai/api/service_processed.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5266,6 +5266,9 @@ message PostModelOutputsRequest {

// Allow filtering of prediction requests down to specific Nodepools, Deployments or Runners
RunnerSelector runner_selector = 6;

// Configure the prediction cache to avoid expensive compute for predict requests
bool use_predict_cache = 7;
}

// Listing the inputs that went into training this model.
Expand Down
3 changes: 3 additions & 0 deletions proto/clarifai/api/status/status_code.proto
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ enum StatusCode {
INSTANCE_TYPE_INVALID_ARGUMENT = 26001;
INSTANCE_TYPE_INVALID_REQUEST = 26002;

// Compute plane related codes 261xx
COMPUTE_PLANE_METRICS_INVALID_REQUEST = 26100;

// Input:Image related 30xxx
INPUT_SUCCESS = 30000;
INPUT_PENDING = 30001; // when things are async, this is the default status.
Expand Down
1 change: 1 addition & 0 deletions proto/clarifai/api/status/status_code_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export enum StatusCode {
INSTANCE_TYPE_DOES_NOT_EXIST = 26000,
INSTANCE_TYPE_INVALID_ARGUMENT = 26001,
INSTANCE_TYPE_INVALID_REQUEST = 26002,
COMPUTE_PLANE_METRICS_INVALID_REQUEST = 26100,
INPUT_SUCCESS = 30000,
INPUT_PENDING = 30001,
INPUT_FAILED = 30002,
Expand Down
1 change: 1 addition & 0 deletions proto/clarifai/api/status/status_code_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ proto.clarifai.api.status.StatusCode = {
INSTANCE_TYPE_DOES_NOT_EXIST: 26000,
INSTANCE_TYPE_INVALID_ARGUMENT: 26001,
INSTANCE_TYPE_INVALID_REQUEST: 26002,
COMPUTE_PLANE_METRICS_INVALID_REQUEST: 26100,
INPUT_SUCCESS: 30000,
INPUT_PENDING: 30001,
INPUT_FAILED: 30002,
Expand Down

0 comments on commit 916d1e4

Please sign in to comment.