Spaces:
Sleeping
Sleeping
added introductory prompt
Browse files- backend.py +6 -6
backend.py
CHANGED
@@ -101,12 +101,6 @@ def handle_query(query_str: str,
|
|
101 |
|
102 |
else:
|
103 |
# The index is already built, no need to rebuild it.
|
104 |
-
pass
|
105 |
-
|
106 |
-
try:
|
107 |
-
|
108 |
-
memory = ChatMemoryBuffer.from_defaults(token_limit=None)
|
109 |
-
|
110 |
conversation: List[ChatMessage] = []
|
111 |
for user, assistant in chat_history:
|
112 |
conversation.extend(
|
@@ -117,6 +111,12 @@ def handle_query(query_str: str,
|
|
117 |
]
|
118 |
)
|
119 |
#conversation.append( ChatMessage(role=MessageRole.USER, content=query_str))
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
chat_engine = index.as_chat_engine(
|
122 |
chat_mode="condense_plus_context",
|
|
|
101 |
|
102 |
else:
|
103 |
# The index is already built, no need to rebuild it.
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
conversation: List[ChatMessage] = []
|
105 |
for user, assistant in chat_history:
|
106 |
conversation.extend(
|
|
|
111 |
]
|
112 |
)
|
113 |
#conversation.append( ChatMessage(role=MessageRole.USER, content=query_str))
|
114 |
+
pass
|
115 |
+
|
116 |
+
try:
|
117 |
+
|
118 |
+
memory = ChatMemoryBuffer.from_defaults(token_limit=None)
|
119 |
+
|
120 |
|
121 |
chat_engine = index.as_chat_engine(
|
122 |
chat_mode="condense_plus_context",
|