feat: новая функция

This commit is contained in:
2025-10-09 16:48:20 +03:00
parent dd2c9988a5
commit 13fb51e447
60 changed files with 7694 additions and 1157 deletions

View File

@@ -11,6 +11,9 @@
*/
const axios = require('axios');
const ollamaConfig = require('../services/ollamaConfig');
const TIMEOUTS = ollamaConfig.getTimeouts();
async function checkOllamaModels() {
try {
@@ -18,7 +21,7 @@ async function checkOllamaModels() {
const baseUrl = process.env.OLLAMA_BASE_URL || 'http://localhost:11434';
const response = await axios.get(`${baseUrl}/api/tags`, {
timeout: 5000, // 5 секунд таймаут
timeout: TIMEOUTS.ollamaTags, // Централизованный таймаут
});
if (response.status === 200 && response.data && response.data.models) {