Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ src-tauri/resources/bin
# Helper tools
.opencode
OpenCode.md
archive/
archive/flatpak/
4 changes: 2 additions & 2 deletions docs/bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"embla-carousel-react": "^8.0.0",
"fs": "^0.0.1-security",
"gray-matter": "^4.0.3",
"lucide-react": "^0.372.0",
"lucide-react": "^0.522.0",
"next": "^14.1.4",
"next-seo": "^6.5.0",
"next-sitemap": "^4.2.3",
Expand Down Expand Up @@ -1503,7 +1503,7 @@

"lru-cache": ["[email protected]", "", {}, "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="],

"lucide-react": ["lucide-react@0.372.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0" } }, "sha512-0cKdqmilHXWUwWAWnf6CrrjHD8YaqPMtLrmEHXolZusNTr9epULCsiJwIOHk2q1yFxdEwd96D4zShlAj67UJdA=="],
"lucide-react": ["lucide-react@0.522.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-jnJbw974yZ7rQHHEFKJOlWAefG3ATSCZHANZxIdx8Rk/16siuwjgA4fBULpXEAWx/RlTs3FzmKW/udWUuO0aRw=="],

"lz-string": ["[email protected]", "", { "bin": { "lz-string": "bin/bin.js" } }, "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ=="],

Expand Down
Binary file added docs/src/pages/docs/_assets/hf_hub.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/pages/docs/_assets/hf_jan_nano.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/pages/docs/_assets/hf_jan_nano_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/pages/docs/_assets/hf_jan_nano_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/pages/docs/_assets/hf_jan_nano_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/pages/docs/_assets/hf_jan_nano_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/pages/docs/_assets/hf_jan_nano_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/pages/docs/_assets/hf_jan_nano_7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/pages/docs/_assets/hf_jan_nano_8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/src/pages/docs/_assets/hf_jan_nano_9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/src/pages/docs/remote-models/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@
"openrouter": {
"title": "OpenRouter",
"href": "/docs/remote-models/openrouter"
},
"huggingface": {
"title": "Hugging Face",
"href": "/docs/remote-models/huggingface"
}
}
123 changes: 123 additions & 0 deletions docs/src/pages/docs/remote-models/huggingface.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
title: Hugging Face
description: Learn how to integrate Hugging Face Inference Endpoints with Jan for enhanced functionality.
keywords:
[
Hugging Face,
Jan,
Jan AI,
Hugging Face Inference Endpoints,
Hugging Face API,
Hugging Face Integration,
Hugging Face API Integration
]
---

import { Callout, Steps } from 'nextra/components'
import { Settings, Plus } from 'lucide-react'

# Hugging Face

Jan supports lots of models hosted on [Hugging Face](https://huggingface.co/). The main thing to keep
in mind is that **the method you use to deploy the model via huggingface has to be compatible with the
OpenAI API**.

## Integrate Hugging Face API with Jan

<Steps>

### Step 1: Navigate to the HuggingFace Model Hub

Visit the [HuggingFace Model Hub](https://huggingface.co/models) (make sure you are logged in) and
pick the model you want to use

![HuggingFace Model Hub](../_assets/hf_hub.png)

### Step 2: Configure HF Inference Endpoint and Deploy

After you have selected the model you want to use, click on the **Deploy** button and select a
deployment method. We will select HF Inference Endpoints for this one.

![HuggingFace Deployment](../_assets/hf_jan_nano.png)
<br/>

This will take you to the deployment set up page. For this example, we will leave the default settings
as they are under the GPU tab and cick on **Create Endpoint**.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo alert: 'cick' should be 'click'.

Suggested change
as they are under the GPU tab and cick on **Create Endpoint**.
as they are under the GPU tab and click on **Create Endpoint**.


![HuggingFace Deployment](../_assets/hf_jan_nano_2.png)
<br/>

Once your endpoint is ready, test that it works on the **Test your endpoint** tab.

![HuggingFace Deployment](../_assets/hf_jan_nano_3.png)
<br/>

If you get a response, you can click on **Copy** to copy the endpoint URL and API key.

<Callout type='info'>
You will need to be logged into the HuggingFace Inference Endpoints and have a credit card on file to deploy a model.
</Callout>

### Step 3: Configure Jan

If you do not have an API key you can create one under **Settings** > **Access Tokens** [here](https://huggingface.co/settings/tokens). Once
you finish, copy the token and add it to Jan alongside you endpoint URL at **Settings** > **Model Providers** > **HuggingFace**.

**3.1 HF Token**
![Get Token](../_assets/hf_jan_nano_5.png)
<br/>

**3.2 HF Endpoint URL**
![Endpoint URL](../_assets/hf_jan_nano_4.png)
<br/>

**3.3 Jan Settings**
![Jan Settings](../_assets/hf_jan_nano_6.png)

<Callout type='warning'>
Make sure to add `/v1/` to the end of your endpoint URL. This is required by the OpenAI API.
</Callout>

**3.4 Add Model Details**
![Add Model Details](../_assets/hf_jan_nano_7.png)

### Step 4: Configure Jan

Now you can start using the model in any chat.

![Start Using the Model](../_assets/hf_jan_nano_8.png)

If you want to learn how to use Jan Nano with MCP, check out [the guide here](../jan-models/jan-nano-32).
<br/>

</Steps>

## Available Hugging Face Models

You can follow the steps above with a large amount of models on Hugging Face and bring them to Jan. Check
out other models in the [Hugging Face Model Hub](https://huggingface.co/models).


## Troubleshooting

Common issues and solutions:

**1. Started a chat but the model is not responding**
- Verify your API_KEY/HF_TOKEN is correct and not expired
- Ensure the model you're trying to use is running again since, after a while, they go
idle so that you don't get charged when you are not using it

![Model Running](../_assets/hf_jan_nano_9.png)

**2. Connection Problems**
- Check your internet connection
- Verify Hugging Face's system status
- Look for error messages in [Jan's logs](/docs/troubleshooting#how-to-get-error-logs)

**3. Model Unavailable**
- Confirm your API key has access to the model
- Check if you're using the correct model ID
- Verify your Hugging Face account has the necessary permissions

Need more help? Join our [Discord community](https://discord.gg/FTk2MvZwJH) or check the
[Hugging Face's documentation](https://docs.huggingface.co/en/inference-endpoints/index).
4 changes: 4 additions & 0 deletions extensions/engine-management-extension/engines.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import mistral from './resources/mistral.json' with { type: 'json' }
import nvidia from './resources/nvidia.json' with { type: 'json' }
import deepseek from './resources/deepseek.json' with { type: 'json' }
import googleGemini from './resources/google_gemini.json' with { type: 'json' }
import huggingface from './resources/huggingface.json' with { type: 'json' }

import anthropicModels from './models/anthropic.json' with { type: 'json' }
import cohereModels from './models/cohere.json' with { type: 'json' }
Expand All @@ -19,6 +20,7 @@ import mistralModels from './models/mistral.json' with { type: 'json' }
import nvidiaModels from './models/nvidia.json' with { type: 'json' }
import deepseekModels from './models/deepseek.json' with { type: 'json' }
import googleGeminiModels from './models/google_gemini.json' with { type: 'json' }
import huggingfaceModels from './models/huggingface.json' with { type: 'json' }

const engines = [
anthropic,
Expand All @@ -31,6 +33,7 @@ const engines = [
nvidia,
deepseek,
googleGemini,
huggingface,
]
const models = [
...anthropicModels,
Expand All @@ -43,5 +46,6 @@ const models = [
...nvidiaModels,
...deepseekModels,
...googleGeminiModels,
...huggingfaceModels,
]
export { engines, models }
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
23 changes: 23 additions & 0 deletions extensions/engine-management-extension/resources/huggingface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"id": "huggingface",
"type": "remote",
"engine": "huggingface",
"url": "https://endpoints.huggingface.co/",
"api_key": "",
"metadata": {
"get_models_url": "{{base_url}}/models",
"header_template": "Authorization: Bearer {{api_key}}",
"transform_req": {
"chat_completions": {
"url": "{{base_url}}/chat/completions",
"template": "{ {% set first = true %} {% for key, value in input_request %} {% if key == \"messages\" or key == \"model\" or key == \"temperature\" or key == \"store\" or key == \"max_tokens\" or key == \"stream\" or key == \"presence_penalty\" or key == \"metadata\" or key == \"frequency_penalty\" or key == \"tools\" or key == \"tool_choice\" or key == \"logprobs\" or key == \"top_logprobs\" or key == \"logit_bias\" or key == \"n\" or key == \"modalities\" or key == \"prediction\" or key == \"response_format\" or key == \"service_tier\" or key == \"seed\" or key == \"stop\" or key == \"stream_options\" or key == \"top_p\" or key == \"parallel_tool_calls\" or key == \"user\" %} {% if not first %},{% endif %} \"{{ key }}\": {{ tojson(value) }} {% set first = false %} {% endif %} {% endfor %} }"
}
},
"transform_resp": {
"chat_completions": {
"template": "{{tojson(input_request)}}"
}
},
"explore_models_url": "https://endpoints.huggingface.co/catalog"
}
}
76 changes: 64 additions & 12 deletions extensions/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -659,64 +659,89 @@ __metadata:

"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Fassistant-extension%40workspace%3Aassistant-extension":
version: 0.1.10
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5531aa&locator=%40janhq%2Fassistant-extension%40workspace%3Aassistant-extension"
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5ea857&locator=%40janhq%2Fassistant-extension%40workspace%3Aassistant-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
checksum: 10c0/ee7fe21267cf795dba890781d1e7807a6cb3ecb915ce9ecbd3a8386a2ebc916a8b70a775ce5d9d9f74d2ec29e20b65cea4ef6cdd0ea250a8ff2d5e6bd2237b1e
checksum: 10c0/a528493357eb030270765b8df165a9d4d9ad736e61f0066d5888a7efe5a9f9cc2ed10aac02c485b93f5e70d2469718f69c68b5d030d0b0555ffeadaab0240e13
languageName: node
linkType: hard

"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Fconversational-extension%40workspace%3Aconversational-extension":
version: 0.1.10
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5531aa&locator=%40janhq%2Fconversational-extension%40workspace%3Aconversational-extension"
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5ea857&locator=%40janhq%2Fconversational-extension%40workspace%3Aconversational-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
checksum: 10c0/ee7fe21267cf795dba890781d1e7807a6cb3ecb915ce9ecbd3a8386a2ebc916a8b70a775ce5d9d9f74d2ec29e20b65cea4ef6cdd0ea250a8ff2d5e6bd2237b1e
checksum: 10c0/a528493357eb030270765b8df165a9d4d9ad736e61f0066d5888a7efe5a9f9cc2ed10aac02c485b93f5e70d2469718f69c68b5d030d0b0555ffeadaab0240e13
languageName: node
linkType: hard

"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Fdownload-extension%40workspace%3Adownload-extension":
version: 0.1.10
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5ea857&locator=%40janhq%2Fdownload-extension%40workspace%3Adownload-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
checksum: 10c0/a528493357eb030270765b8df165a9d4d9ad736e61f0066d5888a7efe5a9f9cc2ed10aac02c485b93f5e70d2469718f69c68b5d030d0b0555ffeadaab0240e13
languageName: node
linkType: hard

"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Fengine-management-extension%40workspace%3Aengine-management-extension":
version: 0.1.10
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5531aa&locator=%40janhq%2Fengine-management-extension%40workspace%3Aengine-management-extension"
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5ea857&locator=%40janhq%2Fengine-management-extension%40workspace%3Aengine-management-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
checksum: 10c0/ee7fe21267cf795dba890781d1e7807a6cb3ecb915ce9ecbd3a8386a2ebc916a8b70a775ce5d9d9f74d2ec29e20b65cea4ef6cdd0ea250a8ff2d5e6bd2237b1e
checksum: 10c0/a528493357eb030270765b8df165a9d4d9ad736e61f0066d5888a7efe5a9f9cc2ed10aac02c485b93f5e70d2469718f69c68b5d030d0b0555ffeadaab0240e13
languageName: node
linkType: hard

"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Fhardware-management-extension%40workspace%3Ahardware-management-extension":
version: 0.1.10
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5531aa&locator=%40janhq%2Fhardware-management-extension%40workspace%3Ahardware-management-extension"
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5ea857&locator=%40janhq%2Fhardware-management-extension%40workspace%3Ahardware-management-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
checksum: 10c0/ee7fe21267cf795dba890781d1e7807a6cb3ecb915ce9ecbd3a8386a2ebc916a8b70a775ce5d9d9f74d2ec29e20b65cea4ef6cdd0ea250a8ff2d5e6bd2237b1e
checksum: 10c0/a528493357eb030270765b8df165a9d4d9ad736e61f0066d5888a7efe5a9f9cc2ed10aac02c485b93f5e70d2469718f69c68b5d030d0b0555ffeadaab0240e13
languageName: node
linkType: hard

"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Finference-cortex-extension%40workspace%3Ainference-cortex-extension":
version: 0.1.10
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5531aa&locator=%40janhq%2Finference-cortex-extension%40workspace%3Ainference-cortex-extension"
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5ea857&locator=%40janhq%2Finference-cortex-extension%40workspace%3Ainference-cortex-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
checksum: 10c0/ee7fe21267cf795dba890781d1e7807a6cb3ecb915ce9ecbd3a8386a2ebc916a8b70a775ce5d9d9f74d2ec29e20b65cea4ef6cdd0ea250a8ff2d5e6bd2237b1e
checksum: 10c0/a528493357eb030270765b8df165a9d4d9ad736e61f0066d5888a7efe5a9f9cc2ed10aac02c485b93f5e70d2469718f69c68b5d030d0b0555ffeadaab0240e13
languageName: node
linkType: hard

"@janhq/core@file:../../core/package.tgz::locator=%40janhq%2Fmodel-extension%40workspace%3Amodel-extension":
version: 0.1.10
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5531aa&locator=%40janhq%2Fmodel-extension%40workspace%3Amodel-extension"
resolution: "@janhq/core@file:../../core/package.tgz#../../core/package.tgz::hash=5ea857&locator=%40janhq%2Fmodel-extension%40workspace%3Amodel-extension"
dependencies:
rxjs: "npm:^7.8.1"
ulidx: "npm:^2.3.0"
checksum: 10c0/ee7fe21267cf795dba890781d1e7807a6cb3ecb915ce9ecbd3a8386a2ebc916a8b70a775ce5d9d9f74d2ec29e20b65cea4ef6cdd0ea250a8ff2d5e6bd2237b1e
checksum: 10c0/a528493357eb030270765b8df165a9d4d9ad736e61f0066d5888a7efe5a9f9cc2ed10aac02c485b93f5e70d2469718f69c68b5d030d0b0555ffeadaab0240e13
languageName: node
linkType: hard

"@janhq/download-extension@workspace:download-extension":
version: 0.0.0-use.local
resolution: "@janhq/download-extension@workspace:download-extension"
dependencies:
"@janhq/core": ../../core/package.tgz
"@tauri-apps/api": "npm:^2.5.0"
cpx: "npm:^1.5.0"
rimraf: "npm:^3.0.2"
rolldown: "npm:1.0.0-beta.1"
run-script-os: "npm:^1.1.6"
typescript: "npm:5.8.3"
vitest: "npm:^3.0.6"
languageName: unknown
linkType: soft

"@janhq/engine-management-extension@workspace:engine-management-extension":
version: 0.0.0-use.local
resolution: "@janhq/engine-management-extension@workspace:engine-management-extension"
Expand Down Expand Up @@ -1436,6 +1461,13 @@ __metadata:
languageName: node
linkType: hard

"@tauri-apps/api@npm:^2.5.0":
version: 2.6.0
resolution: "@tauri-apps/api@npm:2.6.0"
checksum: 10c0/211353d951c7e3e5298f074ec762b5853ff0cdee261478c27db1e450fcf3d6f2c03a616483abbf9dfc79f13c6dfcfa7db0b790c1384c113951c0d694809f05ef
languageName: node
linkType: hard

"@tybys/wasm-util@npm:^0.9.0":
version: 0.9.0
resolution: "@tybys/wasm-util@npm:0.9.0"
Expand Down Expand Up @@ -6979,6 +7011,16 @@ __metadata:
languageName: node
linkType: hard

"typescript@npm:5.8.3":
version: 5.8.3
resolution: "typescript@npm:5.8.3"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/5f8bb01196e542e64d44db3d16ee0e4063ce4f3e3966df6005f2588e86d91c03e1fb131c2581baf0fb65ee79669eea6e161cd448178986587e9f6844446dbb48
languageName: node
linkType: hard

"typescript@npm:^5.3.3, typescript@npm:^5.7.2":
version: 5.7.2
resolution: "typescript@npm:5.7.2"
Expand All @@ -6999,6 +7041,16 @@ __metadata:
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A5.8.3#optional!builtin<compat/typescript>":
version: 5.8.3
resolution: "typescript@patch:typescript@npm%3A5.8.3#optional!builtin<compat/typescript>::version=5.8.3&hash=5786d5"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: 10c0/39117e346ff8ebd87ae1510b3a77d5d92dae5a89bde588c747d25da5c146603a99c8ee588c7ef80faaf123d89ed46f6dbd918d534d641083177d5fac38b8a1cb
languageName: node
linkType: hard

"typescript@patch:typescript@npm%3A^5.3.3#optional!builtin<compat/typescript>, typescript@patch:typescript@npm%3A^5.7.2#optional!builtin<compat/typescript>":
version: 5.7.2
resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin<compat/typescript>::version=5.7.2&hash=5786d5"
Expand Down
4 changes: 4 additions & 0 deletions web-app/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ export function getProviderLogo(provider: string) {
return '/images/model-provider/deepseek.svg'
case 'openai':
return '/images/model-provider/openai.svg'
case 'huggingface':
return '/images/model-provider/hugging-face.svg'
default:
return undefined
}
Expand All @@ -46,6 +48,8 @@ export const getProviderTitle = (provider: string) => {
return 'OpenRouter'
case 'gemini':
return 'Gemini'
case 'huggingface':
return 'Hugging Face'
default:
return provider.charAt(0).toUpperCase() + provider.slice(1)
}
Expand Down
Loading
Loading