Skip to content

Enrichment

domain.entity.ports.enrichment

Summary

Entity enrichment port: expose the shared entity enrichment pipeline as an async callable.

Classes

EntityEnrichmentAdaptor

EntityEnrichmentAdaptor(**kwargs)

Adaptor exposing the entity enrichment pipeline as an async callable.

Initialize the adaptor with the shared entity pipeline.

Parameters:

Name Type Description Default
**kwargs dict

Ignored; kept for dependency-injection compatibility.

{}
Functions
__call__ async
__call__(payload: dict) -> dict

Run the entity enrichment pipeline on payload.

Parameters:

Name Type Description Default
payload dict

Enrichment input, e.g. payee text and hints.

required

Returns:

Name Type Description
dict dict

Enriched payload carrying the resolved entity information.

Functions

get_entity_enrichment_svc

1
2
3
get_entity_enrichment_svc(
    **kwargs,
) -> EntityEnrichmentAdaptor

Build an entity enrichment service adaptor.

Parameters:

Name Type Description Default
**kwargs dict

Passed through to the adaptor constructor.

{}

Returns:

Name Type Description
EntityEnrichmentAdaptor EntityEnrichmentAdaptor

Ready-to-use entity enrichment adaptor.