Commit ·
898d4db
1
Parent(s): 04fc9bc
Updated prompt in app.py
Browse files
app.py
CHANGED
|
@@ -33,10 +33,10 @@ def read_chat_file(chat_file):
|
|
| 33 |
raise
|
| 34 |
|
| 35 |
def sample_messages(lines):
|
| 36 |
-
"""Sample up to
|
| 37 |
-
if len(lines) >=
|
| 38 |
-
start_index = random.randint(0, len(lines) -
|
| 39 |
-
return lines[start_index:start_index +
|
| 40 |
return lines
|
| 41 |
|
| 42 |
def summarize_chat(messages_text, name):
|
|
|
|
| 33 |
raise
|
| 34 |
|
| 35 |
def sample_messages(lines):
|
| 36 |
+
"""Sample up to 100 random lines from the chat."""
|
| 37 |
+
if len(lines) >= 100:
|
| 38 |
+
start_index = random.randint(0, len(lines) - 100)
|
| 39 |
+
return lines[start_index:start_index + 100]
|
| 40 |
return lines
|
| 41 |
|
| 42 |
def summarize_chat(messages_text, name):
|