@@ -12,9 +12,9 @@ describe("inference API snippets", () => {
1212 } ;
1313 const snippet = getJsInferenceSnippet ( model , "api_token" ) as InferenceSnippet [ ] ;
1414
15- expect ( snippet [ 0 ] . content ) . toEqual ( `import { HfInference } from "@huggingface/inference"
15+ expect ( snippet [ 0 ] . content ) . toEqual ( `import { HfInference } from "@huggingface/inference";
1616
17- const client = new HfInference("api_token")
17+ const client = new HfInference("api_token");
1818
1919let out = "";
2020
@@ -47,9 +47,9 @@ for await (const chunk of stream) {
4747 } ;
4848 const snippet = getJsInferenceSnippet ( model , "api_token" , { streaming : false } ) as InferenceSnippet [ ] ;
4949
50- expect ( snippet [ 0 ] . content ) . toEqual ( `import { HfInference } from "@huggingface/inference"
50+ expect ( snippet [ 0 ] . content ) . toEqual ( `import { HfInference } from "@huggingface/inference";
5151
52- const client = new HfInference("api_token")
52+ const client = new HfInference("api_token");
5353
5454const chatCompletion = await client.chatCompletion({
5555 model: "meta-llama/Llama-3.1-8B-Instruct",
@@ -74,9 +74,9 @@ console.log(chatCompletion.choices[0].message);`);
7474 } ;
7575 const snippet = getJsInferenceSnippet ( model , "api_token" ) as InferenceSnippet [ ] ;
7676
77- expect ( snippet [ 0 ] . content ) . toEqual ( `import { HfInference } from "@huggingface/inference"
77+ expect ( snippet [ 0 ] . content ) . toEqual ( `import { HfInference } from "@huggingface/inference";
7878
79- const client = new HfInference("api_token")
79+ const client = new HfInference("api_token");
8080
8181let out = "";
8282
@@ -120,9 +120,9 @@ for await (const chunk of stream) {
120120 } ;
121121 const snippet = getJsInferenceSnippet ( model , "api_token" ) as InferenceSnippet [ ] ;
122122
123- expect ( snippet [ 0 ] . content ) . toEqual ( `import { HfInference } from "@huggingface/inference"
123+ expect ( snippet [ 0 ] . content ) . toEqual ( `import { HfInference } from "@huggingface/inference";
124124
125- const client = new HfInference("api_token")
125+ const client = new HfInference("api_token");
126126
127127let out = "";
128128
0 commit comments