File size: 750 Bytes
1f7ead8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | import os
import sys
# Add the parent directory to sys.path to ensure we can import 'app'
# Assuming this script is run from backend/scripts/ or backend/
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from app.config import config
from app.reasoning import reasoning_engine
def test_openrouter():
print(f"Testing OpenRouter with model: {config.LLM_MODEL}")
print(f"API Key present: {bool(config.OPENROUTER_API_KEY)}")
try:
response = reasoning_engine._chat([
{"role": "user", "content": "Hello, are you working?"}
])
print(f"Response: {response}")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
test_openrouter()
|