diff --git a/.gitignore b/.gitignore index f09d958d00..7bd63cadf9 100644 --- a/.gitignore +++ b/.gitignore @@ -49,4 +49,4 @@ src-tauri/resources/bin # Helper tools .opencode OpenCode.md -archive/ \ No newline at end of file +archive/flatpak/ diff --git a/docs/bun.lock b/docs/bun.lock index 4b22e90d7d..4b5096d202 100644 --- a/docs/bun.lock +++ b/docs/bun.lock @@ -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", @@ -1503,7 +1503,7 @@ "lru-cache": ["lru-cache@10.4.3", "", {}, "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": ["lz-string@1.5.0", "", { "bin": { "lz-string": "bin/bin.js" } }, "sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ=="], diff --git a/docs/src/pages/docs/_assets/hf_hub.png b/docs/src/pages/docs/_assets/hf_hub.png new file mode 100644 index 0000000000..ad059c49ab Binary files /dev/null and b/docs/src/pages/docs/_assets/hf_hub.png differ diff --git a/docs/src/pages/docs/_assets/hf_jan_nano.png b/docs/src/pages/docs/_assets/hf_jan_nano.png new file mode 100644 index 0000000000..147a5c70e9 Binary files /dev/null and b/docs/src/pages/docs/_assets/hf_jan_nano.png differ diff --git a/docs/src/pages/docs/_assets/hf_jan_nano_2.png b/docs/src/pages/docs/_assets/hf_jan_nano_2.png new file mode 100644 index 0000000000..10c4102408 Binary files /dev/null and b/docs/src/pages/docs/_assets/hf_jan_nano_2.png differ diff --git a/docs/src/pages/docs/_assets/hf_jan_nano_3.png b/docs/src/pages/docs/_assets/hf_jan_nano_3.png new file mode 100644 index 0000000000..dac240d292 Binary files /dev/null and b/docs/src/pages/docs/_assets/hf_jan_nano_3.png differ diff --git a/docs/src/pages/docs/_assets/hf_jan_nano_4.png b/docs/src/pages/docs/_assets/hf_jan_nano_4.png new file mode 100644 index 0000000000..552f07b061 Binary files /dev/null and b/docs/src/pages/docs/_assets/hf_jan_nano_4.png differ diff --git a/docs/src/pages/docs/_assets/hf_jan_nano_5.png b/docs/src/pages/docs/_assets/hf_jan_nano_5.png new file mode 100644 index 0000000000..b322f0f93b Binary files /dev/null and b/docs/src/pages/docs/_assets/hf_jan_nano_5.png differ diff --git a/docs/src/pages/docs/_assets/hf_jan_nano_6.png b/docs/src/pages/docs/_assets/hf_jan_nano_6.png new file mode 100644 index 0000000000..c8be2b7071 Binary files /dev/null and b/docs/src/pages/docs/_assets/hf_jan_nano_6.png differ diff --git a/docs/src/pages/docs/_assets/hf_jan_nano_7.png b/docs/src/pages/docs/_assets/hf_jan_nano_7.png new file mode 100644 index 0000000000..2a8ba8438d Binary files /dev/null and b/docs/src/pages/docs/_assets/hf_jan_nano_7.png differ diff --git a/docs/src/pages/docs/_assets/hf_jan_nano_8.png b/docs/src/pages/docs/_assets/hf_jan_nano_8.png new file mode 100644 index 0000000000..4e1885a8ee Binary files /dev/null and b/docs/src/pages/docs/_assets/hf_jan_nano_8.png differ diff --git a/docs/src/pages/docs/_assets/hf_jan_nano_9.png b/docs/src/pages/docs/_assets/hf_jan_nano_9.png new file mode 100644 index 0000000000..09575c541a Binary files /dev/null and b/docs/src/pages/docs/_assets/hf_jan_nano_9.png differ diff --git a/docs/src/pages/docs/remote-models/_meta.json b/docs/src/pages/docs/remote-models/_meta.json index 39660be88b..9ef524352d 100644 --- a/docs/src/pages/docs/remote-models/_meta.json +++ b/docs/src/pages/docs/remote-models/_meta.json @@ -26,5 +26,9 @@ "openrouter": { "title": "OpenRouter", "href": "/docs/remote-models/openrouter" + }, + "huggingface": { + "title": "Hugging Face", + "href": "/docs/remote-models/huggingface" } } diff --git a/docs/src/pages/docs/remote-models/huggingface.mdx b/docs/src/pages/docs/remote-models/huggingface.mdx new file mode 100644 index 0000000000..e6730718a7 --- /dev/null +++ b/docs/src/pages/docs/remote-models/huggingface.mdx @@ -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 + + + +### 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) +
+ +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**. + +![HuggingFace Deployment](../_assets/hf_jan_nano_2.png) +
+ +Once your endpoint is ready, test that it works on the **Test your endpoint** tab. + +![HuggingFace Deployment](../_assets/hf_jan_nano_3.png) +
+ +If you get a response, you can click on **Copy** to copy the endpoint URL and API key. + + + You will need to be logged into the HuggingFace Inference Endpoints and have a credit card on file to deploy a model. + + +### 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) +
+ +**3.2 HF Endpoint URL** +![Endpoint URL](../_assets/hf_jan_nano_4.png) +
+ +**3.3 Jan Settings** +![Jan Settings](../_assets/hf_jan_nano_6.png) + + +Make sure to add `/v1/` to the end of your endpoint URL. This is required by the OpenAI API. + + +**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). +
+ +
+ +## 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). diff --git a/extensions/engine-management-extension/engines.mjs b/extensions/engine-management-extension/engines.mjs index eafe8a09cf..ceac17cadc 100644 --- a/extensions/engine-management-extension/engines.mjs +++ b/extensions/engine-management-extension/engines.mjs @@ -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' } @@ -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, @@ -31,6 +33,7 @@ const engines = [ nvidia, deepseek, googleGemini, + huggingface, ] const models = [ ...anthropicModels, @@ -43,5 +46,6 @@ const models = [ ...nvidiaModels, ...deepseekModels, ...googleGeminiModels, + ...huggingfaceModels, ] export { engines, models } diff --git a/extensions/engine-management-extension/models/huggingface.json b/extensions/engine-management-extension/models/huggingface.json new file mode 100644 index 0000000000..fe51488c70 --- /dev/null +++ b/extensions/engine-management-extension/models/huggingface.json @@ -0,0 +1 @@ +[] diff --git a/extensions/engine-management-extension/resources/huggingface.json b/extensions/engine-management-extension/resources/huggingface.json new file mode 100644 index 0000000000..fc6ada313f --- /dev/null +++ b/extensions/engine-management-extension/resources/huggingface.json @@ -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" + } +} diff --git a/extensions/yarn.lock b/extensions/yarn.lock index 1a8e454972..df148fed57 100644 --- a/extensions/yarn.lock +++ b/extensions/yarn.lock @@ -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" @@ -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" @@ -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" @@ -6999,6 +7041,16 @@ __metadata: languageName: node linkType: hard +"typescript@patch:typescript@npm%3A5.8.3#optional!builtin": + version: 5.8.3 + resolution: "typescript@patch:typescript@npm%3A5.8.3#optional!builtin::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, typescript@patch:typescript@npm%3A^5.7.2#optional!builtin": version: 5.7.2 resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin::version=5.7.2&hash=5786d5" diff --git a/web-app/src/lib/utils.ts b/web-app/src/lib/utils.ts index b193257f24..2b00712698 100644 --- a/web-app/src/lib/utils.ts +++ b/web-app/src/lib/utils.ts @@ -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 } @@ -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) } diff --git a/web-app/src/mock/data.ts b/web-app/src/mock/data.ts index 128ec38dae..a0a412efd9 100644 --- a/web-app/src/mock/data.ts +++ b/web-app/src/mock/data.ts @@ -281,4 +281,38 @@ export const predefinedProviders = [ ], models: [], }, + { + active: true, + api_key: '', + base_url: 'https://your-endpoint.endpoints.huggingface.cloud/v1', + explore_models_url: 'https://endpoints.huggingface.co/catalog', + provider: 'huggingface', + settings: [ + { + key: 'api-key', + title: 'API Key', + description: + "Your Hugging Face token for authentication. Visit your [Access Tokens](https://huggingface.co/settings/tokens) page to retrieve the API key you'll use with your endpoints.", + controller_type: 'input', + controller_props: { + placeholder: 'hf_...', + value: '', + type: 'password', + input_actions: ['unobscure', 'copy'], + }, + }, + { + key: 'base-url', + title: 'Endpoint URL', + description: + 'Your dedicated Inference Endpoint URL ending with /v1. Create and manage endpoints at [Hugging Face Inference Endpoints](https://ui.endpoints.huggingface.co/). Example: https://abc123.us-east-1.aws.endpoints.huggingface.cloud/v1', + controller_type: 'input', + controller_props: { + placeholder: 'https://your-endpoint.endpoints.huggingface.cloud/v1', + value: 'https://your-endpoint.endpoints.huggingface.cloud/v1', + }, + }, + ], + models: [], + }, ]