Files
NaliiaBot/src/naliiabotapi/api/dependencies.py
2026-02-09 15:59:54 -05:00

16 lines
406 B
Python

import os
from src.naliiabot.bot.agent.agent import Agent
from src.naliiabot.bot.factories.llm_factory import LLMFactory
MODEL_NAME = os.getenv("LLM_MODEL", "anthropic")
def get_agent():
"""
Dependency function to get an instance of the Agent class.
Returns:
Agent: An instance of the Agent class.
"""
model = LLMFactory(MODEL_NAME).get_model()
return Agent(model=model)