Callback function to receive a streaming result.
Public Method Summary
| void |
onNewFunctionCall(FunctionCall functionCall)
Called when a new function call is available mid-stream.
|
| abstract void | |
| void |
Public Methods
public void onNewFunctionCall (FunctionCall functionCall)
Called when a new function call is available mid-stream.
When streaming is enabled with tools declared, complete predicted function calls are also conveyed in the terminal chunk upon turn completion. This callback allows receiving and executing tools incrementally as they are predicted.
Parameters
| functionCall | the predicted function call. |
|---|
public abstract void onNewText (String additionalText)
Called when a new text is available.
Parameters
| additionalText | the new text. |
|---|
public void onNewThought (String additionalThought)
Called when a new thought is available.
Parameters
| additionalThought | the new thought text. |
|---|