Spaces:
Sleeping
Sleeping
Geevarghese George commited on
Commit ·
47b9ec3
1
Parent(s): 77bc153
fix chat follow-up issue
Browse files
src/upgrade_advisor/chat/chat.py
CHANGED
|
@@ -182,8 +182,8 @@ async def summarize_chat_history(
|
|
| 182 |
if isinstance(content, list):
|
| 183 |
# content can be a list of type [{'text': ..., 'type':text}, ...]
|
| 184 |
# for each text chunk, take only word_cutoff
|
| 185 |
-
content = ' '.join([get_maybe_truncated(c['text']) for c in content])
|
| 186 |
-
content = get_maybe_truncated(content)
|
| 187 |
chat_history_text += f"{role.upper()}:\n{content}\n\n"
|
| 188 |
|
| 189 |
logger.info(
|
|
|
|
| 182 |
if isinstance(content, list):
|
| 183 |
# content can be a list of type [{'text': ..., 'type':text}, ...]
|
| 184 |
# for each text chunk, take only word_cutoff
|
| 185 |
+
content = ' '.join([get_maybe_truncated(c['text'], word_cutoff=word_cutoff) for c in content])
|
| 186 |
+
content = get_maybe_truncated(content, word_cutoff=word_cutoff)
|
| 187 |
chat_history_text += f"{role.upper()}:\n{content}\n\n"
|
| 188 |
|
| 189 |
logger.info(
|