Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions packages/tasks/src/local-apps.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,22 @@ curl -X POST "http://localhost:8000/v1/chat/completions" \\
expect(deeplink(model).href).toBe("atomic-chat://models/huggingface/bartowski/Llama-3.2-3B-Instruct-GGUF");
});

it("pocketpal deeplink", async () => {
const { displayOnModelPage, deeplink } = LOCAL_APPS.pocketpal;
const model: ModelData = {
id: "bartowski/Llama-3.2-3B-Instruct-GGUF",
tags: ["conversational"],
gguf: { total: 1, context_length: 4096 },
inference: "",
};

expect(displayOnModelPage(model)).toBe(true);
expect(deeplink(model).href).toBe("pocketpal://hub/run?repo_id=bartowski/Llama-3.2-3B-Instruct-GGUF&source=hf");
expect(deeplink(model, "Llama-3.2-3B-Instruct-Q4_K_M.gguf").href).toBe(
"pocketpal://hub/run?repo_id=bartowski/Llama-3.2-3B-Instruct-GGUF&filename=Llama-3.2-3B-Instruct-Q4_K_M.gguf&source=hf",
);
});

it("unsloth tagged model", async () => {
const { displayOnModelPage, snippet: snippetFunc } = LOCAL_APPS.unsloth;
const model: ModelData = {
Expand Down
8 changes: 8 additions & 0 deletions packages/tasks/src/local-apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,14 @@ export const LOCAL_APPS = {
displayOnModelPage: isLlamaCppGgufModel,
deeplink: (model) => new URL(`jan://models/huggingface/${model.id}`),
},
pocketpal: {
prettyLabel: "PocketPal",
docsUrl: "https://github.com/a-ghorbani/pocketpal-ai",
mainTask: "text-generation",
displayOnModelPage: isLlamaCppGgufModel,
deeplink: (model, filepath?) =>
new URL(`pocketpal://hub/run?repo_id=${model.id}${filepath ? `&filename=${filepath}` : ""}&source=hf`),
},
"atomic-chat": {
prettyLabel: "Atomic Chat",
docsUrl: "https://atomic.chat",
Expand Down