chore: Change main to so print graph

This commit is contained in:
2026-03-04 19:00:44 -05:00
parent 75adb658e8
commit e440c97743

View File

@@ -1,24 +1,18 @@
import os
from naliiabot.bot.agent.agent import Agent, AgentConfig
from naliiabot.bot.factories.llm_factory import LLMFactory
from naliiabot.bot.tools.naliia_tools import NaliiaTools
from naliiabot.bot.prompts.load_prompt import get_prompt_template
from langchain_anthropic import ChatAnthropic
model_name = "claude-sonnet-4-5-20250929"
model = ChatAnthropic(
model=model_name
)
MODEL_NAME = os.getenv("LLM_MODEL", "anthropic")
NALIIA_PROMPT = get_prompt_template(
"NALIIA_PROMPT")
model_name = os.getenv("LLM_MODEL", "anthropic")
model = LLMFactory(model_name).get_model()
naliia_prompt = get_prompt_template("NALIIA_PROMPT")
naliia_tools = NaliiaTools().get_tools()
config = AgentConfig(system_prompt=NALIIA_PROMPT)
config = AgentConfig(system_prompt=naliia_prompt)
agent = Agent(model=model, config=config, tools=naliia_tools)
graph_image = agent._compiled_agent.get_graph().draw_mermaid_png()
with open("graph.png", "wb") as f: