Clarifai / clarifai-javascript

Official Clarifai JavaScript client for browsers and node.js
https://docs.clarifai.com
Other
351 stars 81 forks source link

insert ID into inputs in predict method. #21

Closed yuntaek closed 7 years ago

yuntaek commented 7 years ago

Hi,

I tried to add own id into inputs in predict method but it seems that the sdk dose not support yet. However Jared mentions that REST API supports to insert id in prediction following below manner.
https://community.clarifai.com/t/is-there-any-way-to-insert-metadata-into-the-result-of-predtcion/776/4

{
  "inputs": [
    {
      "id": "unique id",
      "data": {
        "image": {
          "base64": "base64 string here"
                }
            }
        }
    ]
}

Can you add this feature, please? Regards,

eddiezane commented 7 years ago

@yuntaek I think I found a way to implement this without breaking anything. Stand by.

yuntaek commented 7 years ago

@eddiezane Did you find the way? If, can I know that, please?

eddiezane commented 7 years ago

@yuntaek we just shipped v2.4.0 that should have this fixed. Thanks for waiting!

You can reference https://github.com/Clarifai/clarifai-javascript/commit/f59e259baad3a22ec47ae9391ea1cc20a1e6f44a