feat: Add NaliiaBot API

This commit is contained in:
2026-02-09 15:59:54 -05:00
parent 69b0dad14d
commit adda2a3e5e
11 changed files with 1087 additions and 182 deletions

27
tests/test_api.py Normal file
View File

@@ -0,0 +1,27 @@
import pytest
from fastapi.testclient import TestClient
from src.naliiabotapi.main import app
from langchain_core.messages import HumanMessage
@pytest.fixture
def client():
client = TestClient(app)
return client
def test_root(client):
response = client.get("/")
assert response.status_code == 200
def test_health(client):
response = client.get("/health")
assert response.status_code == 200
def test_chat(client):
response = client.post("/chat", json={"messages": "Hello, how are you?"})
assert response.status_code == 200
assert response.json() is not None