79712081

Date: 2025-07-23 14:26:36
Score: 3.5
Natty:
Report link
from llama_index.core.callbacks import CallbackManager, LlamaDebugHandler
from llama_index.agent import FunctionAgent  # ✅ Make sure this is the correct import based on your LlamaIndex version

# Stub: Replace with actual tool and LLM
ferramenta = ...  # your tool, e.g. a function tool or ToolSpec
llm = ...         # your LLM instance, e.g. from OpenAI or HuggingFace

# Initialize debug handler
llama_debug = LlamaDebugHandler()
callback_manager = CallbackManager([llama_debug])

# Initialize the agent
agent = FunctionAgent(
    tools=[ferramenta],
    llm=llm,
    system_prompt=(
        "Você é um assistente muito prestativo que irá me ajudar a "
        "responder minhas questões sobre engajamento."
    ),
    callback_manager=callback_manager,
    allow_parallel_tool_calls=True,
)

Reasons:
  • Blacklisted phrase (3): Você
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: Yasir