Spaces:
Running
on
Zero
Running
on
Zero
ds
Browse files- babyagi/babyagi.py +5 -4
babyagi/babyagi.py
CHANGED
@@ -806,6 +806,7 @@ def main():
|
|
806 |
result_all = ""
|
807 |
count = 0
|
808 |
while loop:
|
|
|
809 |
# As long as there are tasks in the storage...
|
810 |
if not tasks_storage.is_empty():
|
811 |
#OBJECTIVE = "ボットの性能をよくする方法 日本語で説明"
|
@@ -816,7 +817,7 @@ def main():
|
|
816 |
print(" • " + str(t))
|
817 |
#yield str(t)
|
818 |
result_all += str(t)+"\r\n"
|
819 |
-
send_google_chat_card(webhook_url,OBJECTIVE,OBJECTIVE+"\r\n"+result_all,"タスク定義","タスク定義")
|
820 |
|
821 |
# Step 1: Pull the first incomplete task
|
822 |
task = tasks_storage.popleft()
|
@@ -825,7 +826,7 @@ def main():
|
|
825 |
print(str(task["task_name"]))
|
826 |
#yield str(task["task_name"])
|
827 |
result_all += str(task["task_name"])+"\r\n"
|
828 |
-
send_google_chat_card(webhook_url,OBJECTIVE,OBJECTIVE+"\r\n"+result_all,"タスク定義","タスク定義")
|
829 |
|
830 |
|
831 |
# Send to execution function to complete the task based on the context
|
@@ -835,7 +836,7 @@ def main():
|
|
835 |
print(result)
|
836 |
#yield result
|
837 |
result_all += result+"\r\n"
|
838 |
-
send_google_chat_card(webhook_url,OBJECTIVE,OBJECTIVE+"\r\n"+result_all,"タスク定義","タスク定義")
|
839 |
|
840 |
#yield result_all
|
841 |
|
@@ -880,7 +881,7 @@ def main():
|
|
880 |
else:
|
881 |
print('Done.')
|
882 |
loop = False
|
883 |
-
|
884 |
|
885 |
if __name__ == "__main__":
|
886 |
main()
|
|
|
806 |
result_all = ""
|
807 |
count = 0
|
808 |
while loop:
|
809 |
+
result_all = ""
|
810 |
# As long as there are tasks in the storage...
|
811 |
if not tasks_storage.is_empty():
|
812 |
#OBJECTIVE = "ボットの性能をよくする方法 日本語で説明"
|
|
|
817 |
print(" • " + str(t))
|
818 |
#yield str(t)
|
819 |
result_all += str(t)+"\r\n"
|
820 |
+
#send_google_chat_card(webhook_url,OBJECTIVE,OBJECTIVE+"\r\n"+result_all,"タスク定義","タスク定義",thread_name)
|
821 |
|
822 |
# Step 1: Pull the first incomplete task
|
823 |
task = tasks_storage.popleft()
|
|
|
826 |
print(str(task["task_name"]))
|
827 |
#yield str(task["task_name"])
|
828 |
result_all += str(task["task_name"])+"\r\n"
|
829 |
+
#send_google_chat_card(webhook_url,OBJECTIVE,OBJECTIVE+"\r\n"+result_all,"タスク定義","タスク定義",thread_name)
|
830 |
|
831 |
|
832 |
# Send to execution function to complete the task based on the context
|
|
|
836 |
print(result)
|
837 |
#yield result
|
838 |
result_all += result+"\r\n"
|
839 |
+
#send_google_chat_card(webhook_url,OBJECTIVE,OBJECTIVE+"\r\n"+result_all,"タスク定義","タスク定義",thread_name)
|
840 |
|
841 |
#yield result_all
|
842 |
|
|
|
881 |
else:
|
882 |
print('Done.')
|
883 |
loop = False
|
884 |
+
return result_all
|
885 |
|
886 |
if __name__ == "__main__":
|
887 |
main()
|