requestStreamingImpl
suspend fun <T> AIAgentGraphContextBase.requestStreamingImpl(message: String, structureDefinition: StructureDefinition?, transformStreamData: suspend (Flow<StreamFrame>) -> Flow<T>): Flow<T>(source)
InternalAgentsApi method. Performs LLM streaming and transforms the stream data.
Return
A flow of transformed data of type T, resulting from the processing of the streaming request.
Parameters
message
The message string representing user input or instructions to be used in the prompt.
structureDefinition
An optional structure definition that defines how the data should be structured during the language model request. Can be null if no specific structure is required.
transformStreamData
A suspending function that takes a flow of raw streaming data (StreamFrame) and returns a flow of the transformed data of type T.