Spaces:
Sleeping
Sleeping
Léo Bourrel
commited on
Commit
·
7f82f4e
1
Parent(s):
7be0e45
feat: update memory visualisation to improve debugging
Browse files- app.py +1 -1
- 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.
|
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})"
|