Hey guys. I seem to have broken one of my nodes wh...
# koog-agentic-framework
f
Hey guys. I seem to have broken one of my nodes when migrating to a newer version of koog. For some reason the llm is not called from this write session. The println "SUMMARIZER ENTERED" is printed but none of the logs in the when block are printed. Anyone have any ideas where the bug is in my code? Thanks in advance for any help!
Copy code
fun AIAgentSubgraphBuilderBase<*, *>.summarizer(
    conversationManager: ConversationManager
) = node<String, String>("summarizer") {
    println("SUMMARIZER ENTERED")
    llm.writeSession {
        updatePrompt {
            user("Given all of the above information please provide a response to the user")
        }
        var isInitial = true
        var finalMessage = ""
        requestLLMStreaming().collect { chunk ->
            when (chunk) {
                is StreamFrame.Append -> {
                    println("APPEND: ${chunk.text}")
                    if (isInitial) {
                        conversationManager.sendInitialMessage {
                            assistant {
                                content(chunk.text)
                                status = MessageStatus.InProgress
                            }
                        }
                        isInitial = false
                    } else {
                        conversationManager.appendText(chunk.text)
                    }
                    finalMessage += chunk.text
                }

                is StreamFrame.ToolCall -> error { "Tool Calling isn't supported in Summarizer" }
                is StreamFrame.End -> {
                    println("END: ${chunk.finishReason}")
                    conversationManager.sendFinished()
                }
            }
        }
        finalMessage
    }
}
r
"Thinking" response type was added. Maybe this should be handled.