Skip to content

Commit

Permalink
GRPC clients version 10.9.8
Browse files Browse the repository at this point in the history
  • Loading branch information
clarifai-prod committed Oct 23, 2024
1 parent c4ebf3d commit d7c4475
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.9.7
10.9.8
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": "10.9.7",
"version": "10.9.8",
"description": "The official Clarifai Node.js gRPC client",
"main": "src/index.js",
"repository": "https://github.com/Clarifai/clarifai-javascript-grpc",
Expand Down
22 changes: 16 additions & 6 deletions proto/clarifai/api/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3363,20 +3363,30 @@ message TaskReviewManualStrategyInfo {
// This field represents the percentage of inputs that will be reviewed by reviewers. It is a value between 0 and 1.
float sample_percentage = 1;

// The number of reviewers that need to agree in order to approve an input.
// Currently, the only allowed values are:
// 0 - when not set, it defaults to 1
// 1 - only a single reviewer needs to approve each labeled input
// -1 - an input will be approved when all reviewers approve it
// Deprecated: Use consensus_strategy_info.approval_threshold_reviewers.
int32 approval_threshold = 2;
}

// TaskReviewConsensusStrategyInfo
message TaskReviewConsensusStrategyInfo {
reserved 1;

// Deprecated: Use approval_threshold_labelers.
uint32 approval_threshold = 2 [deprecated = true];

// The number of labelers that need to agree in order to automatically approve an annotation.
uint32 approval_threshold = 2;
// When 0, labelers consensus is disabled.
// When 1, the labels are automatically approved once a single labeler labels the input.
// When greater than 1, the labels are automatically approved when the specified number of labelers agree.
// If the number of labelers that agree is less than the specified number, then the input will reviewed by reviewers.
uint32 approval_threshold_labelers = 3;

// The number of reviewers that need to agree in order to approve an input.
// Currently, the only allowed values are:
// 0 - when not set, it defaults to 1
// 1 - only a single reviewer needs to approve each labeled input
// -1 - an input will be approved when all reviewers approve it
int32 approval_threshold_reviewers = 4;
}

// TaskAIAssistant
Expand Down
6 changes: 6 additions & 0 deletions proto/clarifai/api/resources_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6003,6 +6003,10 @@ export namespace TaskReviewManualStrategyInfo {
export class TaskReviewConsensusStrategyInfo extends jspb.Message {
getApprovalThreshold(): number;
setApprovalThreshold(value: number): TaskReviewConsensusStrategyInfo;
getApprovalThresholdLabelers(): number;
setApprovalThresholdLabelers(value: number): TaskReviewConsensusStrategyInfo;
getApprovalThresholdReviewers(): number;
setApprovalThresholdReviewers(value: number): TaskReviewConsensusStrategyInfo;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): TaskReviewConsensusStrategyInfo.AsObject;
Expand All @@ -6017,6 +6021,8 @@ export class TaskReviewConsensusStrategyInfo extends jspb.Message {
export namespace TaskReviewConsensusStrategyInfo {
export type AsObject = {
approvalThreshold: number,
approvalThresholdLabelers: number,
approvalThresholdReviewers: number,
}
}

Expand Down
62 changes: 61 additions & 1 deletion proto/clarifai/api/resources_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -51540,7 +51540,9 @@ proto.clarifai.api.TaskReviewConsensusStrategyInfo.prototype.toObject = function
*/
proto.clarifai.api.TaskReviewConsensusStrategyInfo.toObject = function(includeInstance, msg) {
var f, obj = {
approvalThreshold: jspb.Message.getFieldWithDefault(msg, 2, 0)
approvalThreshold: jspb.Message.getFieldWithDefault(msg, 2, 0),
approvalThresholdLabelers: jspb.Message.getFieldWithDefault(msg, 3, 0),
approvalThresholdReviewers: jspb.Message.getFieldWithDefault(msg, 4, 0)
};

if (includeInstance) {
Expand Down Expand Up @@ -51581,6 +51583,14 @@ proto.clarifai.api.TaskReviewConsensusStrategyInfo.deserializeBinaryFromReader =
var value = /** @type {number} */ (reader.readUint32());
msg.setApprovalThreshold(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint32());
msg.setApprovalThresholdLabelers(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt32());
msg.setApprovalThresholdReviewers(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -51617,6 +51627,20 @@ proto.clarifai.api.TaskReviewConsensusStrategyInfo.serializeBinaryToWriter = fun
f
);
}
f = message.getApprovalThresholdLabelers();
if (f !== 0) {
writer.writeUint32(
3,
f
);
}
f = message.getApprovalThresholdReviewers();
if (f !== 0) {
writer.writeInt32(
4,
f
);
}
};


Expand All @@ -51638,6 +51662,42 @@ proto.clarifai.api.TaskReviewConsensusStrategyInfo.prototype.setApprovalThreshol
};


/**
* optional uint32 approval_threshold_labelers = 3;
* @return {number}
*/
proto.clarifai.api.TaskReviewConsensusStrategyInfo.prototype.getApprovalThresholdLabelers = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};


/**
* @param {number} value
* @return {!proto.clarifai.api.TaskReviewConsensusStrategyInfo} returns this
*/
proto.clarifai.api.TaskReviewConsensusStrategyInfo.prototype.setApprovalThresholdLabelers = function(value) {
return jspb.Message.setProto3IntField(this, 3, value);
};


/**
* optional int32 approval_threshold_reviewers = 4;
* @return {number}
*/
proto.clarifai.api.TaskReviewConsensusStrategyInfo.prototype.getApprovalThresholdReviewers = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};


/**
* @param {number} value
* @return {!proto.clarifai.api.TaskReviewConsensusStrategyInfo} returns this
*/
proto.clarifai.api.TaskReviewConsensusStrategyInfo.prototype.setApprovalThresholdReviewers = function(value) {
return jspb.Message.setProto3IntField(this, 4, value);
};





Expand Down
10 changes: 10 additions & 0 deletions proto/clarifai/api/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3819,6 +3819,12 @@ service V2 {
option (clarifai.auth.util.cl_depending_scopes) = Nodepools_Add;
option (clarifai.auth.util.cl_depending_scopes) = Nodepools_Delete;
option (clarifai.auth.util.cl_depending_scopes) = Keys_Get;
option (clarifai.auth.util.cl_depending_scopes) = Deployments_Get;
option (clarifai.auth.util.cl_depending_scopes) = Deployments_Add;
option (clarifai.auth.util.cl_depending_scopes) = Deployments_Delete;
option (clarifai.auth.util.cl_depending_scopes) = Runners_Get;
option (clarifai.auth.util.cl_depending_scopes) = Runners_Add;
option (clarifai.auth.util.cl_depending_scopes) = Runners_Delete;
}

// Nodepools CRUD
Expand Down Expand Up @@ -3878,6 +3884,10 @@ service V2 {
option (clarifai.auth.util.cl_depending_scopes) = Runners_Delete;
option (clarifai.auth.util.cl_depending_scopes) = Models_Get;
option (clarifai.auth.util.cl_depending_scopes) = Workflows_Get;
option (clarifai.auth.util.cl_depending_scopes) = Runners_Get;
option (clarifai.auth.util.cl_depending_scopes) = Deployments_Get;
option (clarifai.auth.util.cl_depending_scopes) = Deployments_Add;
option (clarifai.auth.util.cl_depending_scopes) = Deployments_Delete;
}

// Deployments CRUD
Expand Down
10 changes: 10 additions & 0 deletions proto/clarifai/api/service_processed.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3819,6 +3819,12 @@ service V2 {
option (clarifai.auth.util.cl_depending_scopes) = Nodepools_Add;
option (clarifai.auth.util.cl_depending_scopes) = Nodepools_Delete;
option (clarifai.auth.util.cl_depending_scopes) = Keys_Get;
option (clarifai.auth.util.cl_depending_scopes) = Deployments_Get;
option (clarifai.auth.util.cl_depending_scopes) = Deployments_Add;
option (clarifai.auth.util.cl_depending_scopes) = Deployments_Delete;
option (clarifai.auth.util.cl_depending_scopes) = Runners_Get;
option (clarifai.auth.util.cl_depending_scopes) = Runners_Add;
option (clarifai.auth.util.cl_depending_scopes) = Runners_Delete;
}

// Nodepools CRUD
Expand Down Expand Up @@ -3878,6 +3884,10 @@ service V2 {
option (clarifai.auth.util.cl_depending_scopes) = Runners_Delete;
option (clarifai.auth.util.cl_depending_scopes) = Models_Get;
option (clarifai.auth.util.cl_depending_scopes) = Workflows_Get;
option (clarifai.auth.util.cl_depending_scopes) = Runners_Get;
option (clarifai.auth.util.cl_depending_scopes) = Deployments_Get;
option (clarifai.auth.util.cl_depending_scopes) = Deployments_Add;
option (clarifai.auth.util.cl_depending_scopes) = Deployments_Delete;
}

// Deployments CRUD
Expand Down
2 changes: 2 additions & 0 deletions proto/clarifai/api/status/status_code.proto
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ enum StatusCode {
ANNOTATION_UNKNOWN_STATUS = 24154;
ANNOTATION_INVALID_ARGUMENT = 24155;
ANNOTATION_PERMISSION_DENIED = 24156;
// Annotation is awaiting review from task REVIEWERS.
ANNOTATION_AWAITING_REVIEW = 24157;
// Annotation is awaiting consensus review from task LABELERS.
ANNOTATION_AWAITING_CONSENSUS_REVIEW = 24159;
ANNOTATION_REVIEW_DENIED = 24158;

Expand Down

0 comments on commit d7c4475

Please sign in to comment.