embabel-agent icon indicating copy to clipboard operation
embabel-agent copied to clipboard

Feature gap between StreamingChatClientOperations and AbstractLlmOperations

Open zhuyouxiang opened this issue 10 months ago • 5 comments

There is a noticeable discrepancy in capabilities between StreamingChatClientOperations and AbstractLlmOperations. Specifically, the streaming implementation has fallen behind in evolution, lacking support for ToolGroup processing and ToolDecorator support. Should we consider refactoring these components to ensure feature parity and consistent architectural evolution?


StreamingChatClientOperations
    override fun doTransformStream(
        messages: List<Message>,
        interaction: LlmInteraction,
        llmRequestEvent: LlmRequestEvent<String>?,
    ): Flux<String> {
        return chatClient
            .prompt(springAiPrompt)
            .toolCallbacks(interaction.tools.toSpringToolCallbacks())    -- tools only
            .options(chatOptions)
            .stream()
            .content()
    }

abstract class AbstractLlmOperations(
    protected val toolDecorator: ToolDecorator,                              -- toolDecorator support
        val (allTools, llmRequestEvent) = getToolsAndEvent(             -- all tools
            agentProcess = agentProcess,
            interaction = interaction,
            action = action,
            messages = messages,
            outputClass = outputClass,
        )

zhuyouxiang avatar Feb 02 '26 07:02 zhuyouxiang

acknoweledged

igordayen avatar Feb 03 '26 00:02 igordayen

@zhuyouxiang - Thank you for reporting! Could you please review and try to conduct more testing on PR: gh pr checkout 1375

Thank you, Igor

igordayen avatar Feb 04 '26 05:02 igordayen

@igordayen Tested and verified. Thanks for the quick fix!

zhuyouxiang avatar Feb 04 '26 07:02 zhuyouxiang

@igordayen Tested and verified. Thanks for the quick fix!

@zhuyouxiang - thank you very much!

igordayen avatar Feb 04 '26 15:02 igordayen

closing as completed.

igordayen avatar Feb 04 '26 15:02 igordayen