before rbac and tool use

This commit is contained in:
2025-10-30 06:12:35 +01:00
parent df426f8dd5
commit e070c95190
22 changed files with 577 additions and 4246 deletions

View File

@@ -17,19 +17,17 @@ import os
import sys
from pathlib import Path
# Add both backend and modules directories to path
# Add backend directory to Python path for app package imports
backend_path = Path(__file__).parent.parent
sys.path.insert(0, str(backend_path))
sys.path.insert(0, str(backend_path / "modules"))
try:
from modules.rag.main import RAGModule
from modules.chatbot.main import ChatbotModule
from app.modules.rag.main import RAGModule
from app.modules.chatbot.main import ChatbotModule
from app.services.module_manager import ModuleManager, ModuleConfig
except ImportError as e:
print(f"Import error: {e}")
print("Available modules path:", backend_path / "modules")
# Create mock modules for testing if imports fail
class MockModule:
def __init__(self):
@@ -346,4 +344,4 @@ if __name__ == "__main__":
print("\nAll basic tests completed successfully! 🎉")
# Run the tests
asyncio.run(run_basic_tests())
asyncio.run(run_basic_tests())