Skip to content

VectorStoreChatMemoryAdvisor not generating default client id #3041

Open
@saranshbansal

Description

@saranshbansal

Spring AI version: 1.0.0-M5

As per official docs:
https://docs.spring.io/spring-ai/reference/1.0/api/chatclient.html#_advisor_configuration_in_chatclient

VectorStoreChatMemoryAdvisor: Set a default conversation ID to be used if none is provided in the context.

However, when im trying to run the below code, it throws an error:
The conversationId must not be empty!

VectorStoreChatMemoryAdvisor vectorStoreAdvisor = new VectorStoreChatMemoryAdvisor(
				pgVectorStore,
				conversationId, // sending null from client
				chatRequestDto.chatHistoryWindowSize()
		);

Do we have to pass some random conversation id ourself for the first time? It contradicts with the official docs.

What is the right way to implement a conversational API as the conversation id is null for the first time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions