Skip to content

resolve_view_policy

autogen.beta.network.client.handlers.resolve_view_policy #

resolve_view_policy(client, metadata)

Return the adapter's default view policy for this participant.

Resolves the adapter from the metadata in hand (no I/O) so the same path works whether the hub is in-process or remote.

Source code in autogen/beta/network/client/handlers.py
def resolve_view_policy(
    client: "AgentClient",
    metadata: ChannelMetadata,
) -> ViewPolicy:
    """Return the adapter's default view policy for this participant.

    Resolves the adapter from the metadata in hand (no I/O) so the same
    path works whether the hub is in-process or remote.
    """
    return client._hub_client.adapter_for_metadata(metadata).default_view_policy(metadata, client.agent_id)