getHandoff
function getHandoff<TContext, TOutput>(agent): Handoff<TContext, TOutput>;
Returns a handoff for the given agent. If the agent is already wrapped into a handoff, it will be returned as is. Otherwise, a new handoff instance will be created.
Type Parameters
Section titled βType ParametersβType Parameter | Description |
---|---|
|
The context of the handoff |
|
The output type of the handoff |
Parameters
Section titled βParametersβParameter | Type |
---|---|
|
Returns
Section titled βReturnsβHandoff
<TContext
, TOutput
>