Skip to content

MessageChatMemoryAdvisor with conversationId supplier #4985

@infoShare

Description

@infoShare

Expected Behavior

It would be perfect to allow MessageChatMemoryAdvisor work based on the conversationId supplier instead of static value. User would not need to always remember about putting proper conversationId.

MessageChatMemoryAdvisor.builder(chatMemory).conversationIdSupplier(conversationIdHolder::get).build();

Current Behavior

We need to manually provide conversationId

.advisors(a -> a.param(ChatMemory.CONVERSATION_ID, conversationId))

if we dont want to use separate messages history/context.

Context

I would be happy to prepare Pull Request with example implementation and tests.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions