You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This was broken before because one of the input parameters was
incorrectly being sent as part of the `parameters` object instead of the
`inputs`, this PR fixes that.
```js
import { InferenceClient } from "@huggingface/inference";
const client = new InferenceClient("hf_xxxxxxxxxxxxxxxxxxxxxxxx");
const output = await client.sentenceSimilarity({
model: "sentence-transformers/all-MiniLM-L6-v2",
inputs: {
"source_sentence": "That is a happy person",
"sentences": [
"That is a happy dog",
"That is a very happy person",
"Today is a sunny day"
]
},
provider: "hf-inference",
});
console.log(output);
```
0 commit comments