Skip to main content
Glama
test-vector-rag-connection.js1.71 kB
#!/usr/bin/env node // Тест подключения VectorRAGService import dotenv from 'dotenv'; import { VectorRAGService } from '../dist/rag/vector-rag-service.js'; // Загружаем .env файл dotenv.config(); async function testVectorRAGConnection() { console.log('🧪 Тестирование подключения VectorRAGService...\n'); try { const vectorRAG = new VectorRAGService(); // Тест 1: Проверка подключения к OpenAI console.log('🔌 Тест 1: Проверка OpenAI API...'); const embeddingTest = await vectorRAG['embeddingService'].testConnection(); console.log('OpenAI API доступен:', embeddingTest); // Тест 2: Проверка подключения к базе данных console.log('\n🗄️ Тест 2: Проверка базы данных...'); const dbTest = await vectorRAG['sqliteClient'].isConnected(); console.log('База данных доступна:', dbTest); // Тест 3: Полная проверка подключения console.log('\n🔍 Тест 3: Полная проверка подключения...'); const fullTest = await vectorRAG.testConnection(); console.log('Полная проверка:', fullTest); // Тест 4: Health check console.log('\n🏥 Тест 4: Health check...'); const health = await vectorRAG.healthCheck(); console.log('Health check результат:', health); } catch (error) { console.error('❌ Ошибка в тесте VectorRAGService:', error.message); console.error('Детали:', error); } } testVectorRAGConnection().catch(console.error);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Galiusbro/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server