Skip to content

Commit

Permalink
tweak history prompt; add code-block annotation to usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
Lincoln Stein committed Jun 14, 2024
1 parent 5ea1139 commit 6a3182c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
DEFAULT_HISTORY_TEMPLATE = """
Current date and time: {current_time}.
Potentially relevant excerpts of previous conversations (timestamped):
Potentially relevant timestamped excerpts of previous conversations (you
do not need to use these if irrelevant):
{previous_history}
(You do not need to use these pieces of information if not relevant.)
"""

TIMESTAMP_FORMAT = "%Y-%m-%d %H:%M:%S %Z"
Expand Down Expand Up @@ -61,6 +61,8 @@ class ConversationTokenBufferVectorStoreMemory(ConversationTokenBufferMemory):
Example using ChromaDB:
code-block:: python
from langchain.memory.token_buffer_vectorstore_memory import (
ConversationTokenBufferVectorStoreMemory
Expand Down Expand Up @@ -100,6 +102,7 @@ class ConversationTokenBufferVectorStoreMemory(ConversationTokenBufferMemory):
)
conversation_memory.load_memory_variables({"input": "What time is it?"})
::endcode-block
"""

retriever: VectorStoreRetriever = Field(exclude=True)
Expand Down

0 comments on commit 6a3182c

Please sign in to comment.