File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/tasks/src/snippets Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -48,15 +48,15 @@ export const snippetImageTextToTextGeneration = (model: ModelDataMinimal, access
4848 return `import { HfInference } from "@huggingface/inference";
4949
5050const 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
5353for 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 }
You can’t perform that action at this time.
0 commit comments