Terry Zhuo
commited on
Commit
·
420fd88
1
Parent(s):
6a92f83
update
Browse files- azure_count_ip_data.py +5 -3
azure_count_ip_data.py
CHANGED
@@ -160,9 +160,11 @@ def get_file_data(content: str) -> Tuple[Optional[str], Optional[str], bool]:
|
|
160 |
"""Read file content and return IP, username, and vote condition status"""
|
161 |
try:
|
162 |
lines = [line.strip() for line in content.split('\n') if line.strip()]
|
163 |
-
|
164 |
-
|
165 |
-
|
|
|
|
|
166 |
if not lines:
|
167 |
return None, None, False, user_prompt
|
168 |
|
|
|
160 |
"""Read file content and return IP, username, and vote condition status"""
|
161 |
try:
|
162 |
lines = [line.strip() for line in content.split('\n') if line.strip()]
|
163 |
+
try:
|
164 |
+
user_prompt = json.loads(lines[0])["state"]["messages"][0][1]
|
165 |
+
except Exception as e:
|
166 |
+
log.error(json.loads(lines[0]))
|
167 |
+
user_prompt = ""
|
168 |
if not lines:
|
169 |
return None, None, False, user_prompt
|
170 |
|