agrag.eval.answer.final_answer
final_answer(result:AgentRunResult) -> str
Return the text of the last assistant message in an agent run.
Handles message dicts and LangChain message objects, and content that is a string or a list of blocks. Only text blocks count.
Parameters:
- result (
AgentRunResult) – The result ofagent.ainvoke.
Raises:
ValueError– The run holds no assistant message.