Léo Bourrel commited on
Commit
7f82f4e
·
1 Parent(s): 7be0e45

feat: update memory visualisation to improve debugging

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. message.py +3 -0
app.py CHANGED
@@ -121,7 +121,7 @@ with chat_column:
121
  f"""
122
  Used {st.session_state.token_count} tokens \n
123
  Debug Langchain conversation:
124
- {st.session_state.conversation.memory.buffer}
125
  """
126
  )
127
 
 
121
  f"""
122
  Used {st.session_state.token_count} tokens \n
123
  Debug Langchain conversation:
124
+ {st.session_state.history}
125
  """
126
  )
127
 
message.py CHANGED
@@ -11,3 +11,6 @@ class Message:
11
  origin: Literal["human", "ai"]
12
  message: str
13
  documents: Optional[List[Document]] = None
 
 
 
 
11
  origin: Literal["human", "ai"]
12
  message: str
13
  documents: Optional[List[Document]] = None
14
+
15
+ def __repr__(self) -> str:
16
+ return f"Message(origin={self.origin}, message={self.message})"