Skip to content

Commit

Permalink
GRPC clients version 10.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
clarifai-prod committed Feb 15, 2024
1 parent 146d755 commit 33ca947
Show file tree
Hide file tree
Showing 7 changed files with 145 additions and 11 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.1.3
10.1.4
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.1.3",
"version": "10.1.4",
"description": "The official Clarifai Node.js gRPC client",
"main": "src/index.js",
"repository": "https://github.com/Clarifai/clarifai-javascript-grpc",
Expand Down
30 changes: 24 additions & 6 deletions proto/clarifai/api/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -478,11 +478,26 @@ message DetailConceptCount {
message ConceptQuery {
// The name of the concept to search.
string name = 1;
// (optional) The language of the concept name in a search. Defaults to English.
// The language of the concept name in a search. Defaults to English.
string language = 2;
// (optional) The id of workflow. If no id is provided, then application base workflow is used.
// The id of workflow. If no id is provided, then application base workflow is used.
string workflow_id = 3;
// The concepts must belong to workflow models with specified use cases.
// Multiple values are joined using an OR condition.
repeated WorkflowModelUseCase use_cases = 4;
}
enum WorkflowModelUseCase {
WORKFLOW_MODEL_USE_CASE_NOT_SET = 0;

// Classifier models without a detector parent (recursive check) in a workflow
// are used for classification.
CLASSIFICATION = 1;

// Detector models in a workflow are used for detection.
// Classifier models that run after a detector model are also used for detection.
DETECTION = 2;
}


// This represents a relation (i.e. edge) between the subject concept and the object concept
message ConceptRelation {
Expand Down Expand Up @@ -1501,18 +1516,18 @@ message OutputConfig {
google.protobuf.Struct model_metadata = 17 [deprecated = true];
}

// ModelType is a definition of a set of models that generally have the same input and output fields.
// ModelType is a definition of a set of models that generally have the same input and output fields.
// This is used to understand more about the possible models in our platform.
message ModelType {
reserved 7, 4, 13, 14, 15;

// A unique identifier for this model type.
string id = 1;
// A display title for this model.
string title = 2;
// Description of this model type.
string description = 3;

// For both input_fields and output_fields below, the following hold true:
// - They are both lists of strings that name the fields from the Data proto
// - Individual entries in the list can be comma-separated lists. Each element of it is expected to be present in an incoming data example.
Expand Down Expand Up @@ -2894,6 +2909,7 @@ message AppDuplication {
// - annotations
// - models
// - workflows
// - installed_module_versions
repeated AppCopyProgress progress = 9;
}

Expand All @@ -2915,6 +2931,8 @@ message AppDuplicationFilters {
bool copy_models = 4;
// Copy workflows. Requires that copy_models and copy_concepts are also set.
bool copy_workflows = 5;
// Copy installed module versions.
bool copy_installed_module_versions = 6;
}

// LabelOrder
Expand Down Expand Up @@ -3322,7 +3340,7 @@ message Collector {
// an example.
clarifai.api.status.Status status = 7;

// Whether to collect outputs or not. Default is false. If selected, outputs from the
// Whether to collect outputs or not. Default is false. If selected, outputs from the
// original model predict call will be posted as annotations along with the input with success status.
bool collect_outputs = 9;
}
Expand Down
14 changes: 14 additions & 0 deletions proto/clarifai/api/resources_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,10 @@ export class ConceptQuery extends jspb.Message {
setLanguage(value: string): ConceptQuery;
getWorkflowId(): string;
setWorkflowId(value: string): ConceptQuery;
clearUseCasesList(): void;
getUseCasesList(): Array<WorkflowModelUseCase>;
setUseCasesList(value: Array<WorkflowModelUseCase>): ConceptQuery;
addUseCases(value: WorkflowModelUseCase, index?: number): WorkflowModelUseCase;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): ConceptQuery.AsObject;
Expand All @@ -883,6 +887,7 @@ export namespace ConceptQuery {
name: string,
language: string,
workflowId: string,
useCasesList: Array<WorkflowModelUseCase>,
}
}

Expand Down Expand Up @@ -5340,6 +5345,8 @@ export class AppDuplicationFilters extends jspb.Message {
setCopyModels(value: boolean): AppDuplicationFilters;
getCopyWorkflows(): boolean;
setCopyWorkflows(value: boolean): AppDuplicationFilters;
getCopyInstalledModuleVersions(): boolean;
setCopyInstalledModuleVersions(value: boolean): AppDuplicationFilters;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): AppDuplicationFilters.AsObject;
Expand All @@ -5358,6 +5365,7 @@ export namespace AppDuplicationFilters {
copyAnnotations: boolean,
copyModels: boolean,
copyWorkflows: boolean,
copyInstalledModuleVersions: boolean,
}
}

Expand Down Expand Up @@ -7710,6 +7718,12 @@ export namespace Runner {
}
}

export enum WorkflowModelUseCase {
WORKFLOW_MODEL_USE_CASE_NOT_SET = 0,
CLASSIFICATION = 1,
DETECTION = 2,
}

export enum DatasetVersionMetricsGroupType {
DATASET_VERSION_METRICS_GROUP_TYPE_NOT_SET = 0,
INPUT_TYPE = 2,
Expand Down
104 changes: 101 additions & 3 deletions proto/clarifai/api/resources_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ goog.exportSymbol('proto.clarifai.api.W3C', null, global);
goog.exportSymbol('proto.clarifai.api.Worker', null, global);
goog.exportSymbol('proto.clarifai.api.Worker.WorkerCase', null, global);
goog.exportSymbol('proto.clarifai.api.Workflow', null, global);
goog.exportSymbol('proto.clarifai.api.WorkflowModelUseCase', null, global);
goog.exportSymbol('proto.clarifai.api.WorkflowNode', null, global);
goog.exportSymbol('proto.clarifai.api.WorkflowResult', null, global);
goog.exportSymbol('proto.clarifai.api.WorkflowResultsSimilarity', null, global);
Expand Down Expand Up @@ -739,7 +740,7 @@ if (goog.DEBUG && !COMPILED) {
* @constructor
*/
proto.clarifai.api.ConceptQuery = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
jspb.Message.initialize(this, opt_data, 0, -1, proto.clarifai.api.ConceptQuery.repeatedFields_, null);
};
goog.inherits(proto.clarifai.api.ConceptQuery, jspb.Message);
if (goog.DEBUG && !COMPILED) {
Expand Down Expand Up @@ -10883,6 +10884,13 @@ proto.clarifai.api.DetailConceptCount.prototype.hasProcessing = function() {



/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.clarifai.api.ConceptQuery.repeatedFields_ = [4];



if (jspb.Message.GENERATE_TO_OBJECT) {
Expand Down Expand Up @@ -10916,7 +10924,8 @@ proto.clarifai.api.ConceptQuery.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
language: jspb.Message.getFieldWithDefault(msg, 2, ""),
workflowId: jspb.Message.getFieldWithDefault(msg, 3, "")
workflowId: jspb.Message.getFieldWithDefault(msg, 3, ""),
useCasesList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f
};

if (includeInstance) {
Expand Down Expand Up @@ -10965,6 +10974,12 @@ proto.clarifai.api.ConceptQuery.deserializeBinaryFromReader = function(msg, read
var value = /** @type {string} */ (reader.readString());
msg.setWorkflowId(value);
break;
case 4:
var values = /** @type {!Array<!proto.clarifai.api.WorkflowModelUseCase>} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]);
for (var i = 0; i < values.length; i++) {
msg.addUseCases(values[i]);
}
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -11015,6 +11030,13 @@ proto.clarifai.api.ConceptQuery.serializeBinaryToWriter = function(message, writ
f
);
}
f = message.getUseCasesList();
if (f.length > 0) {
writer.writePackedEnum(
4,
f
);
}
};


Expand Down Expand Up @@ -11072,6 +11094,43 @@ proto.clarifai.api.ConceptQuery.prototype.setWorkflowId = function(value) {
};


/**
* repeated WorkflowModelUseCase use_cases = 4;
* @return {!Array<!proto.clarifai.api.WorkflowModelUseCase>}
*/
proto.clarifai.api.ConceptQuery.prototype.getUseCasesList = function() {
return /** @type {!Array<!proto.clarifai.api.WorkflowModelUseCase>} */ (jspb.Message.getRepeatedField(this, 4));
};


/**
* @param {!Array<!proto.clarifai.api.WorkflowModelUseCase>} value
* @return {!proto.clarifai.api.ConceptQuery} returns this
*/
proto.clarifai.api.ConceptQuery.prototype.setUseCasesList = function(value) {
return jspb.Message.setField(this, 4, value || []);
};


/**
* @param {!proto.clarifai.api.WorkflowModelUseCase} value
* @param {number=} opt_index
* @return {!proto.clarifai.api.ConceptQuery} returns this
*/
proto.clarifai.api.ConceptQuery.prototype.addUseCases = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
};


/**
* Clears the list making it empty but non-null.
* @return {!proto.clarifai.api.ConceptQuery} returns this
*/
proto.clarifai.api.ConceptQuery.prototype.clearUseCasesList = function() {
return this.setUseCasesList([]);
};





Expand Down Expand Up @@ -46132,7 +46191,8 @@ proto.clarifai.api.AppDuplicationFilters.toObject = function(includeInstance, ms
copyConcepts: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
copyAnnotations: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
copyModels: jspb.Message.getBooleanFieldWithDefault(msg, 4, false),
copyWorkflows: jspb.Message.getBooleanFieldWithDefault(msg, 5, false)
copyWorkflows: jspb.Message.getBooleanFieldWithDefault(msg, 5, false),
copyInstalledModuleVersions: jspb.Message.getBooleanFieldWithDefault(msg, 6, false)
};

if (includeInstance) {
Expand Down Expand Up @@ -46189,6 +46249,10 @@ proto.clarifai.api.AppDuplicationFilters.deserializeBinaryFromReader = function(
var value = /** @type {boolean} */ (reader.readBool());
msg.setCopyWorkflows(value);
break;
case 6:
var value = /** @type {boolean} */ (reader.readBool());
msg.setCopyInstalledModuleVersions(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -46253,6 +46317,13 @@ proto.clarifai.api.AppDuplicationFilters.serializeBinaryToWriter = function(mess
f
);
}
f = message.getCopyInstalledModuleVersions();
if (f) {
writer.writeBool(
6,
f
);
}
};


Expand Down Expand Up @@ -46346,6 +46417,24 @@ proto.clarifai.api.AppDuplicationFilters.prototype.setCopyWorkflows = function(v
};


/**
* optional bool copy_installed_module_versions = 6;
* @return {boolean}
*/
proto.clarifai.api.AppDuplicationFilters.prototype.getCopyInstalledModuleVersions = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
};


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





Expand Down Expand Up @@ -63641,6 +63730,15 @@ proto.clarifai.api.Runner.prototype.clearLabelsList = function() {
};


/**
* @enum {number}
*/
proto.clarifai.api.WorkflowModelUseCase = {
WORKFLOW_MODEL_USE_CASE_NOT_SET: 0,
CLASSIFICATION: 1,
DETECTION: 2
};

/**
* @enum {number}
*/
Expand Down
2 changes: 2 additions & 0 deletions proto/clarifai/api/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2589,6 +2589,8 @@ service V2 {
option (clarifai.auth.util.cl_depending_scopes) = Inputs_Get;
option (clarifai.auth.util.cl_depending_scopes) = Annotations_Get;
option (clarifai.auth.util.cl_depending_scopes) = Workflows_Get;
option (clarifai.auth.util.cl_depending_scopes) = Modules_Get;
option (clarifai.auth.util.cl_depending_scopes) = InstalledModuleVersions_Get;
}

// ListAppDuplications lists all app duplication jobs created by the user.
Expand Down
2 changes: 2 additions & 0 deletions proto/clarifai/api/service_processed.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2589,6 +2589,8 @@ service V2 {
option (clarifai.auth.util.cl_depending_scopes) = Inputs_Get;
option (clarifai.auth.util.cl_depending_scopes) = Annotations_Get;
option (clarifai.auth.util.cl_depending_scopes) = Workflows_Get;
option (clarifai.auth.util.cl_depending_scopes) = Modules_Get;
option (clarifai.auth.util.cl_depending_scopes) = InstalledModuleVersions_Get;
}

// ListAppDuplications lists all app duplication jobs created by the user.
Expand Down

0 comments on commit 33ca947

Please sign in to comment.