ваше сообщение коммита

This commit is contained in:
2025-07-03 21:54:00 +03:00
parent 11cf0ea353
commit 972553dbb1
21 changed files with 1435 additions and 176 deletions

View File

@@ -138,6 +138,29 @@ class AIAssistant {
}
}
// Проверка здоровья AI сервиса
async checkHealth() {
try {
const response = await fetch(`${this.baseUrl}/api/tags`);
if (!response.ok) {
throw new Error(`Ollama API returned ${response.status}`);
}
const data = await response.json();
return {
status: 'ok',
models: data.models?.length || 0,
baseUrl: this.baseUrl
};
} catch (error) {
logger.error('AI health check failed:', error);
return {
status: 'error',
error: error.message,
baseUrl: this.baseUrl
};
}
}
// Добавляем методы из vectorStore.js
async initVectorStore() {
// ... код инициализации ...