feat: implement mvp with email-first login flow and langgraph architecture

This commit is contained in:
Yunxiao Xu
2026-02-09 23:22:30 -08:00
parent af227d40e6
commit 5a943b902a
79 changed files with 8200 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
import pytest
from langchain_openai import ChatOpenAI
from ea_chatbot.config import LLMConfig
from ea_chatbot.utils.llm_factory import get_llm_model
from langchain_core.callbacks import BaseCallbackHandler
class MockHandler(BaseCallbackHandler):
pass
def test_get_llm_model_with_callbacks(monkeypatch):
"""Test that callbacks are passed to the model."""
monkeypatch.setenv("OPENAI_API_KEY", "dummy")
config = LLMConfig(provider="openai", model="gpt-4o")
handler = MockHandler()
model = get_llm_model(config, callbacks=[handler])
assert isinstance(model, ChatOpenAI)
assert handler in model.callbacks