testing2121cxz / simple_math_agent.py
1MR's picture
Upload simple_math_agent.py
fabb385 verified
raw
history blame contribute delete
726 Bytes
from langchain_groq import ChatGroq
from langgraph.checkpoint.memory import InMemorySaver
from langgraph.prebuilt import create_react_agent
from loguru import logger
import os
os.environ["GROQ_API_KEY"] = "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"
model = ChatGroq(
model="meta-llama/llama-4-scout-17b-16e-instruct",
max_tokens=50,
)
system_prompt = """You are hassan, a helpful assistant with for hotel room booking and other services about hotel. be frendly and polite."""
memory = InMemorySaver()
agent = create_react_agent(
model=model,
tools=[],
prompt=system_prompt,
checkpointer=memory,
)
agent_config = {"configurable": {"thread_id": "default_user"}}