Skip to content

Commit f6d7ff8

Browse files
committed
javascript casing
1 parent 9cc3d86 commit f6d7ff8

File tree

1 file changed

+2
-2
lines changed
  • packages/tasks/src/snippets

1 file changed

+2
-2
lines changed

packages/tasks/src/snippets/js.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,15 @@ export const snippetImageTextToTextGeneration = (model: ModelDataMinimal, access
4848
return `import { HfInference } from "@huggingface/inference";
4949
5050
const inference = new HfInference("${accessToken || `{API_TOKEN}`}");
51-
const image_url = "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
51+
const imageUrl = "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
5252
5353
for await (const chunk of inference.chatCompletionStream({
5454
model: "${model.id}",
5555
messages: [
5656
{
5757
"role": "user",
5858
"content": [
59-
{"type": "image_url", "image_url": {"url": image_url}},
59+
{"type": "image_url", "image_url": {"url": imageUrl}},
6060
{"type": "text", "text": "Describe this image in one sentence."},
6161
],
6262
}

0 commit comments

Comments
 (0)