clarifai-nodejs-grpc icon indicating copy to clipboard operation
clarifai-nodejs-grpc copied to clipboard

Metadata does not upload

Open excaliburne opened this issue 3 years ago • 0 comments

Using a similar call:

// This will be used by every Clarifai endpoint call.
const metadata = new grpc.Metadata()

metadata.set('authorization', 'Key XXXXX')

stub.PostInputs(
    {
        inputs: [{data: {
            image: {url: "https://samples.clarifai.com/puppy.jpeg", allow_duplicate_url: true},
            metadata: {id: "id001", type: "animal", size: 100}
        }}]
    },
    metadata,
    (err, response) => {
        if (err) {
            throw new Error(err);
        }

        if (response.status.code !== 10000) {
            throw new Error("Post inputs failed, status: " + response.status.description);
        }
    }
);

Metadata is not attached to the input when you check via the Portal or any other method. This seems to happen only with this gRPC client.

excaliburne avatar Sep 28 '21 13:09 excaliburne