Spaces:
Sleeping
Sleeping
Update third.py
Browse files
third.py
CHANGED
|
@@ -73,16 +73,17 @@ async def main(editable_output2, keyword_id):
|
|
| 73 |
|
| 74 |
# 'action_input'を取得
|
| 75 |
response_content = agent_output['action']['action_input']
|
| 76 |
-
research_results.append(response_content)
|
| 77 |
except json.JSONDecodeError:
|
| 78 |
-
|
| 79 |
-
|
| 80 |
except Exception as e:
|
| 81 |
print(f"Error: {e}")
|
| 82 |
return
|
|
|
|
|
|
|
| 83 |
else:
|
| 84 |
response_content = "This instruction has already been executed."
|
| 85 |
-
|
| 86 |
# Prepare the system message
|
| 87 |
system_message = {
|
| 88 |
"role": "system",
|
|
|
|
| 73 |
|
| 74 |
# 'action_input'を取得
|
| 75 |
response_content = agent_output['action']['action_input']
|
|
|
|
| 76 |
except json.JSONDecodeError:
|
| 77 |
+
# JSON形式でない場合は、raw_outputを直接使用する
|
| 78 |
+
response_content = raw_output
|
| 79 |
except Exception as e:
|
| 80 |
print(f"Error: {e}")
|
| 81 |
return
|
| 82 |
+
|
| 83 |
+
research_results.append(response_content)
|
| 84 |
else:
|
| 85 |
response_content = "This instruction has already been executed."
|
| 86 |
+
|
| 87 |
# Prepare the system message
|
| 88 |
system_message = {
|
| 89 |
"role": "system",
|