Skip to content

Commit d84ea80

Browse files
committed
snippetOllama
1 parent 7d35685 commit d84ea80

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/tasks/src/local-apps.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ const snippetLlamacpp = (model: ModelData, filepath?: string): LocalAppSnippet[]
126126
];
127127
};
128128

129+
const snippetOllama = (model: ModelData, ollamatag?: string): string => {
130+
return `ollama run hf.co/${model.id}${ollamatag ?? "{{OLLAMA_TAG}}"}`;
131+
};
132+
129133
const snippetLocalAI = (model: ModelData, filepath?: string): LocalAppSnippet[] => {
130134
const command = (binary: string) =>
131135
["# Load and run the model:", `${binary} huggingface://${model.id}/${filepath ?? "{{GGUF_FILE}}"}`].join("\n");
@@ -370,7 +374,7 @@ export const LOCAL_APPS = {
370374
docsUrl: "https://github.com/ollama/ollama/tree/main/docs",
371375
mainTask: "text-generation",
372376
displayOnModelPage: isLlamaCppGgufModel,
373-
deeplink: (model) => new URL(`https://ollama.com/library/{model.id}`),
377+
snippet: snippetOllama,
374378
},
375379
} satisfies Record<string, LocalApp>;
376380

0 commit comments

Comments
 (0)