Skip to main content

portia.execution_agents.utils.final_output_summarizer

Utility class for final output summarizer.

FinalOutputSummarizer Objects

class FinalOutputSummarizer()

Utility class responsible for summarizing the run outputs for final output's summary.

Attributes:

  • config Config - The configuration for the llm.

__init__

def __init__(config: Config) -> None

Initialize the summarizer agent.

Arguments:

  • config Config - The configuration for the llm.

create_summary

def create_summary(plan: Plan, plan_run: PlanRun) -> str | None

Execute the summarizer llm and return the summary as a string.

Arguments:

  • plan Plan - The plan containing the steps.
  • plan_run PlanRun - The run to summarize.

Returns:

str | None: The generated summary or None if generation fails.