Update uncloseai.js
This commit is contained in:
parent
f143d4180c
commit
0414ed3ad8
1 changed files with 3 additions and 3 deletions
|
|
@ -48,8 +48,8 @@ const VLLM_ENDPOINTS = [
|
|||
// This registry maps a model's ID to the endpoint where it resides.
|
||||
const modelRegistry = {};
|
||||
|
||||
// Fetch models from each endpoint with caching (TTL: 1 hour)
|
||||
// Cache is busted if the endpoint array changes.
|
||||
// Fetch models from each endpoint with caching.
|
||||
// Cache is busted if the endpoint array changes or TTL.
|
||||
async function fetchModelsFromEndpoints() {
|
||||
const cacheKey = 'modelRegistryCache';
|
||||
const endpointsKey = 'vllmEndpointsHash';
|
||||
|
|
@ -57,7 +57,7 @@ async function fetchModelsFromEndpoints() {
|
|||
const cachedEndpoints = localStorage.getItem(endpointsKey);
|
||||
const cacheItem = localStorage.getItem(cacheKey);
|
||||
const now = Date.now();
|
||||
const TTL = 3600000; // 1 hour in milliseconds
|
||||
const TTL = 300000; // 5 minutes in milliseconds
|
||||
|
||||
if (cacheItem && cachedEndpoints === endpointsString) {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue