addFlow

fun addFlow(context: Context)

Samples

import ai.flowstorm.common.monitoring.performance.PerformanceSpan
import ai.flowstorm.core.Context
import ai.flowstorm.core.Response
import ai.flowstorm.core.Scope
import ai.flowstorm.core.model.Turn
import ai.flowstorm.core.nlp.pipeline.PipelineComponent
import ai.flowstorm.core.nlp.pipeline.PipelineScope
import ai.flowstorm.core.type.DateTime
import ai.flowstorm.core.type.IntMutableList
fun main() { 
   //sampleStart 
   with(context) {
        if (session.turns.isNotEmpty()) {
            when(session.turns.last().flow.size) {
                0 -> logger.info("no info about the Flow")
                else -> {
                    scopeAttributes.completeFlow += flowToString(session.turns.last().flow)
                    scopeAttributes.lastTurnFlow = flowToString(session.turns.last().flow)
                }
            }
        }
    } 
   //sampleEnd
}