infomaniak-ai-provider
Version:
> the project is under active development, for now only text and embedding models are supported.
203 lines (201 loc) • 6.7 kB
JavaScript
// src/infomaniak-models.ts
function getModelsByType(models, type) {
return models.filter((model) => model.type === type);
}
function getTranscriptionModels(models) {
return getModelsByType(models, "stt");
}
function getChatModels(models) {
return getModelsByType(models, "llm");
}
function getImageModels(models) {
return getModelsByType(models, "image");
}
function getEmbeddingModels(models) {
return getModelsByType(models, "embedding");
}
// src/infomaniak-models-data.json
var infomaniak_models_data_default = [
{
id: 2,
name: "whisper",
type: "stt",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/audio/transcriptions",
description: "Whisper V3",
info_status: "ready",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/whisper.svg",
last_updated_at: "2024-07-01",
max_token_input: null,
version: "3.0"
},
{
id: 6,
name: "llama3",
type: "llm",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/chat/completions",
description: "Llama 3.3",
info_status: "ready",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/llama3.svg",
last_updated_at: "2024-07-01",
max_token_input: 1e5,
version: "0.1"
},
{
id: 8,
name: "photomaker",
type: "image",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/images/generations/photo_maker",
description: "Photomaker V2",
info_status: "coming_soon",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/photomaker.svg",
last_updated_at: "2024-07-15",
max_token_input: null,
version: "2.0"
},
{
id: 9,
name: "whisperV2",
type: "stt",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/audio/transcriptions",
description: "Whisper V2",
info_status: "coming_soon",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/whisper.svg",
last_updated_at: "2024-07-01",
max_token_input: null,
version: "2.0"
},
{
id: 10,
name: "flux",
type: "image",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/images/generations",
description: "Flux schnell",
info_status: "ready",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/flux.svg",
last_updated_at: "2024-10-01",
max_token_input: null,
version: "0.1"
},
{
id: 11,
name: "granite",
type: "llm",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/chat/completions",
description: "granite-3.1-8b",
info_status: "ready",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/granite.svg",
last_updated_at: "2024-12-04",
max_token_input: 128e3,
version: "3.1"
},
{
id: 12,
name: "bge_multilingual_gemma2",
type: "embedding",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/v1/embeddings",
description: "Bge Multilingual Gemma2",
info_status: "coming_soon",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/bge.svg",
last_updated_at: "2024-12-04",
max_token_input: 8e3,
version: "1.0"
},
{
id: 13,
name: "mini_lm_l12_v2",
type: "embedding",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/v1/embeddings",
description: "All MiniLM L12 v2",
info_status: "coming_soon",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/minilm.svg",
last_updated_at: "2024-12-04",
max_token_input: 128,
version: "2.0"
},
{
id: 14,
name: "reasoning",
type: "llm",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/chat/completions",
description: "DeepSeek-R1-distilled-qwen-32B",
info_status: "coming_soon",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/deepseek.svg",
last_updated_at: "2025-01-27",
max_token_input: 128e3,
version: "1.0"
},
{
id: 15,
name: "mistral24b",
type: "llm",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/chat/completions",
description: "Mistral-Small-24B-Instruct-2501",
info_status: "ready",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/mixtral.svg",
last_updated_at: "2025-03-11",
max_token_input: 32e3,
version: "1.0"
},
{
id: 16,
name: "mistral3",
type: "llm",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/chat/completions",
description: "Mistral-Small-3.2-24B-Instruct-2506",
info_status: "ready",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/mixtral.svg",
last_updated_at: "2025-07-03",
max_token_input: 128e3,
version: "3.2"
},
{
id: 17,
name: "qwen3",
type: "llm",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/chat/completions",
description: "Qwen3-235B-A22B-Instruct-2507",
info_status: "ready",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/qwen.svg",
last_updated_at: "2025-07-30",
max_token_input: 262144,
version: "3"
},
{
id: 18,
name: "gemma3n",
type: "llm",
documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/chat/completions",
description: "Gemma-3n-E4B-it",
info_status: "ready",
logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/gemma.svg",
last_updated_at: "2025-07-30",
max_token_input: 32e3,
version: "3"
}
];
// src/client/index.ts
var _models = infomaniak_models_data_default;
function useInfomaniakModels() {
function toClientModel(model) {
return {
name: model.description,
type: model.type,
id: model.name,
version: model.version,
maxTokenInput: model.max_token_input,
lastUpdatedAt: model.last_updated_at,
status: model.info_status
};
}
return {
chatModels: getChatModels(_models).map(toClientModel),
embeddingModels: getEmbeddingModels(_models).map(toClientModel),
imageModels: getImageModels(_models).map(toClientModel),
transcriptionModels: getTranscriptionModels(_models).map(toClientModel),
models: _models.map(toClientModel)
};
}
export {
useInfomaniakModels
};
//# sourceMappingURL=index.mjs.map