Clarifai / clarifai-nodejs-grpc

Clarifai gRPC NodeJS client
https://docs.clarifai.com
Other
46 stars 6 forks source link

Metadata does not upload #33

Open excaliburne opened 3 years ago

excaliburne commented 3 years ago

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.