Return Types
Focus
Focus
Prisma AIRS

Return Types

Table of Contents

Return Types

The typed result objects your adapter functions must return. Only fields marked as required must be set.
Where Can I Use This?What Do I Need?
  • Prisma AIRS (AI Red Teaming)

PreProcessResult

Returned by pre_process().
PreProcessResult( url="https://api.example.com/chat", # required method="POST", # optional — HTTP method (default: "POST") headers={}, # optional — request headers json_body=None, # optional — JSON body (dict or list) data=None, # optional — form or raw body params=None, # optional — query-string parameters )
Set json_body or data, not both. If both are set, data takes precedence.

PostProcessResult

Returned by post_process().
PostProcessResult( output="the target's reply", # required — the reply text session_state=None, # optional — set only if session state changed this turn; # None keeps the existing session )

CallTargetResult

Returned by call_target().
CallTargetResult( output="the target's reply", # required — the reply text session_state=None, # optional — set only if session state changed this turn; # None keeps the existing session )

AuthResult

Returned by authenticate().
AuthResult( ttl=3600, # required — seconds to cache before re-authenticating data={"token": "..."}, # required — any dict; available as context.auth in other functions )

SessionPreProcessResult

SessionPreProcessResult( session_state={"session_id": "..."}, # required — any dict; available as context.session # in pre_process, post_process, and call_target )