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
)
PostProcessResult
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
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
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
)