Skip to content

Python: Combining Output of previous to previous step in current step #1428

@monuminu

Description

@monuminu

Hi Team

Current i have a workflow where i have document analysis step which will extract the document and summarizes it. Output of this will be passed to Policy verifier step . After that the next step is Fraud Detection , in this step i need output of both Policy verification step and document analysis step. how can i achive this.

    WorkflowBuilder()
    .set_start_executor(document_analyzer)
    .add_edge(document_analyzer, policy_verifier)
    .add_edge(policy_verifier, fraud_detector)
    .add_edge(fraud_detector, decision_maker)
    .build()
@handler
    async def detect_fraud(
        self, 
        policy_verification: PolicyVerification, 
        ctx: WorkflowContext[FraudAssessment]
    ) -> None:
        """
        Assess fraud risk for the claim.
        
        Args:
            policy_verification: Policy verification from previous stage
            ctx: Workflow context for sending output
        """

Metadata

Metadata

Assignees

Labels

pythonworkflowsRelated to Workflows in agent-framework

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions