Skip to content

How does InMemoryChatHistory works? #4

@sanjayojha

Description

@sanjayojha

How does one can pass previous user responses and assistant responses in chat? Consider I am creating a simple chatbot, and I want to send all previous responses from user and assistant ([["role" => "assistant", "content" => $aiResponse], ["role" => "user", "content" => $userResponse]]) during the chat session for the context. How can I do this?
I can see you have AssistantMessage.php and UserMessage.php but they are sending Single response, no preservation of old conversation.

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