Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 4 additions & 0 deletions extensions/engine-management-extension/engines.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import cohere from './resources/cohere.json' with { type: 'json' }
import openai from './resources/openai.json' with { type: 'json' }
import openrouter from './resources/openrouter.json' with { type: 'json' }
import groq from './resources/groq.json' with { type: 'json' }
import huggingface from './resources/huggingface.json' with { type: 'json' }
import martian from './resources/martian.json' with { type: 'json' }
import mistral from './resources/mistral.json' with { type: 'json' }
import nvidia from './resources/nvidia.json' with { type: 'json' }
Expand All @@ -14,6 +15,7 @@ import cohereModels from './models/cohere.json' with { type: 'json' }
import openaiModels from './models/openai.json' with { type: 'json' }
import openrouterModels from './models/openrouter.json' with { type: 'json' }
import groqModels from './models/groq.json' with { type: 'json' }
import huggingfaceModels from './models/huggingface.json' with { type: 'json' }
import martianModels from './models/martian.json' with { type: 'json' }
import mistralModels from './models/mistral.json' with { type: 'json' }
import nvidiaModels from './models/nvidia.json' with { type: 'json' }
Expand All @@ -26,6 +28,7 @@ const engines = [
cohere,
openrouter,
groq,
huggingface,
mistral,
martian,
nvidia,
Expand All @@ -38,6 +41,7 @@ const models = [
...cohereModels,
...openrouterModels,
...groqModels,
...huggingfaceModels,
...mistralModels,
...martianModels,
...nvidiaModels,
Expand Down
47 changes: 47 additions & 0 deletions extensions/engine-management-extension/models/huggingface.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[
{
"model": "moonshotai/Kimi-K2-Instruct:groq",
"object": "model",
"name": "Kimi-K2-Instruct",
"version": "1.0",
"description": "Moonshot's Kimi K2 model with 131k context and tool calling support",
"inference_params": {
"temperature": 0.6,
"top_p": 1.0,
"frequency_penalty": 0,
"presence_penalty": 0,
"stream": true
},
"engine": "huggingface"
},
{
"model": "deepseek-ai/DeepSeek-R1-0528",
"object": "model",
"name": "DeepSeek-R1-0528",
"version": "1.0",
"description": "DeepSeek's reasoning model with 163k context, tool calling support, and open weights",
"inference_params": {
"temperature": 0.6,
"top_p": 0.95,
"frequency_penalty": 0,
"presence_penalty": 0,
"stream": true
},
"engine": "huggingface"
},
{
"model": "deepseek-ai/DeepSeek-V3-0324",
"object": "model",
"name": "DeepSeek-V3-0324",
"version": "1.0",
"description": "DeepSeek V3 with 16k context, tool calling support, and open weights",
"inference_params": {
"temperature": 0.3,
"top_p": 0.95,
"frequency_penalty": 0,
"presence_penalty": 0,
"stream": true
},
"engine": "huggingface"
}
]
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://huggingface.co/settings/tokens",
"api_key": "",
"metadata": {
"get_models_url": "https://router.huggingface.co/v1/models",
"header_template": "Authorization: Bearer {{api_key}}",
"transform_req": {
"chat_completions": {
"url": "https://router.huggingface.co/v1/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://huggingface.co/models?pipeline_tag=text-generation&inference_provider=all"
}
}
29 changes: 29 additions & 0 deletions web-app/public/images/model-provider/huggingface.svg
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 web-app/src/lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export function getProviderLogo(provider: string) {
return '/images/model-provider/llamacpp.svg'
case 'anthropic':
return '/images/model-provider/anthropic.svg'
case 'huggingface':
return '/images/model-provider/huggingface.svg'
case 'mistral':
return '/images/model-provider/mistral.svg'
case 'martian':
Expand Down Expand Up @@ -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
60 changes: 60 additions & 0 deletions web-app/src/mock/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,64 @@ export const predefinedProviders = [
],
models: [],
},
{
active: true,
api_key: '',
base_url: 'https://router.huggingface.co/v1',
explore_models_url:
'https://huggingface.co/models?pipeline_tag=text-generation&inference_provider=all',
provider: 'huggingface',
settings: [
{
key: 'api-key',
title: 'API Key',
description:
"The Hugging Face API uses tokens for authentication. Visit your [Access Tokens](https://huggingface.co/settings/tokens) page to retrieve the token you'll use in your requests.",
controller_type: 'input',
controller_props: {
placeholder: 'Insert API Token',
value: '',
type: 'password',
input_actions: ['unobscure', 'copy'],
},
},
{
key: 'base-url',
title: 'Base URL',
description:
'The base endpoint to use. See the [Hugging Face Inference Providers documentation](https://huggingface.co/docs/inference-providers) for more information.',
controller_type: 'input',
controller_props: {
placeholder: 'https://router.huggingface.co/v1',
value: 'https://router.huggingface.co/v1',
},
},
],
models: [
{
id: 'moonshotai/Kimi-K2-Instruct:groq',
name: 'Kimi-K2-Instruct',
version: '1.0',
description:
'1T parameters Moonshot chat model tuned for tool-aware, nuanced responses.',
capabilities: ['completion', 'tools'],
},
{
id: 'deepseek-ai/DeepSeek-R1-0528',
name: 'DeepSeek-R1-0528',
version: '1.0',
description:
"DeepSeek's flagship reasoning engine with open weights and advanced tool control.",
capabilities: ['completion', 'tools'],
},
{
id: 'deepseek-ai/DeepSeek-V3-0324',
name: 'DeepSeek-V3-0324',
version: '1.0',
description:
'Streamlined DeepSeek model focused on fast, high-quality completions and tool use.',
capabilities: ['completion', 'tools'],
},
],
},
]