Skip to content
Snippets Groups Projects
Commit 4b09a065 authored by timothycarambat's avatar timothycarambat
Browse files

persist token window for NIM and not only on model change

parent b2dd35fe
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ class NvidiaNimLLM {
}
/**
* Set the model token limit `NVIDIA_NIM_LLM_TOKEN_LIMIT` for the given model ID
* Set the model token limit `NVIDIA_NIM_LLM_MODEL_TOKEN_LIMIT` for the given model ID
* @param {string} modelId
* @param {string} basePath
* @returns {Promise<void>}
......@@ -69,7 +69,7 @@ class NvidiaNimLLM {
if (!model.length) return;
const modelInfo = model.find((model) => model.id === modelId);
if (!modelInfo) return;
process.env.NVIDIA_NIM_LLM_TOKEN_LIMIT = Number(
process.env.NVIDIA_NIM_LLM_MODEL_TOKEN_LIMIT = Number(
modelInfo.max_model_len || 4096
);
}
......
......@@ -965,6 +965,9 @@ function dumpENV() {
"SIMPLE_SSO_ENABLED",
// Community Hub
"COMMUNITY_HUB_BUNDLE_DOWNLOADS_ENABLED",
// Nvidia NIM Keys that are automatically managed
"NVIDIA_NIM_LLM_MODEL_TOKEN_LIMIT",
];
// Simple sanitization of each value to prevent ENV injection via newline or quote escaping.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment