firts agent concept

This commit is contained in:
2026-02-03 21:20:00 -05:00
parent daa9893d2e
commit aff0a588c5
12 changed files with 2030 additions and 1 deletions

23
tests/test_factories.py Normal file
View File

@@ -0,0 +1,23 @@
import pytest
from src.naliiabot.bot.factories.llm_factory import LLMFactory
from src.naliiabot.bot.exceptions import NotFoundProviderError
from langchain_anthropic import ChatAnthropic
from langchain_deepseek import ChatDeepSeek
def test_llm_factory():
antrophicModel = LLMFactory("anthropic").get_model()
assert isinstance(antrophicModel, ChatAnthropic) is True
deepseekModel = LLMFactory("deepseek").get_model()
assert isinstance(deepseekModel, ChatDeepSeek)
def test_get_model_raises_exception_when_provider_not_found():
factory = LLMFactory(provider="openai")
with pytest.raises(NotFoundProviderError) as exc_info:
factory.get_model()
assert str(exc_info.value) == "OPENAI Not Provider Found"