DB-GPT icon indicating copy to clipboard operation
DB-GPT copied to clipboard

[Feature Request] Add buffermemory

Open Ananderz opened this issue 2 years ago • 1 comments

I tried to have it elaborate on a previous question I asked and realized that it's missing a buffermemory. I am guessing it is using RetrieverQandA. I wonder if using ConversationalRetriverQandA with conversationalbuffermemory could be added to the solution or if there is a better way to add a memory of previous prompts and answers

Ananderz avatar Sep 03 '23 14:09 Ananderz

I guess that the issue you are experiencing is related to the number of turns in the conversation history. Currently, it is set to 0 by default in our code. If you want to keep more history, you can modify the source code. In subsequent versions, we will make this a configurable option.

chat_retention_rounds: int = 0 

Source Code

class BaseChat(ABC):
    """DB-GPT Chat Service Base Module
    Include:
    stream_call():scene + prompt -> stream response
    nostream_call():scene + prompt -> nostream response
    """
    chat_scene: str = None
    llm_model: Any = None
    # By default, keep the last two rounds of conversation records as the context
    chat_retention_rounds: int = 0 

    class Config:
        """Configuration for this pydantic object."""

        arbitrary_types_allowed = True

csunny avatar Dec 06 '23 10:12 csunny

This issue has been marked as stale, because it has been over 30 days without any activity.

github-actions[bot] avatar Jun 25 '24 21:06 github-actions[bot]

This issue bas been closed, because it has been marked as stale and there has been no activity for over 7 days.

github-actions[bot] avatar Jul 19 '24 21:07 github-actions[bot]