Spaces:
Running
on
Zero
Running
on
Zero
test
Browse files- babyagi/babyagi.py +2 -2
- mysite/routers/fastapi.py +10 -1
babyagi/babyagi.py
CHANGED
@@ -850,7 +850,7 @@ if __name__ == "__main__":
|
|
850 |
main()
|
851 |
|
852 |
|
853 |
-
async def completion(message: str, history, c=None, d=None, prompt="あなたは日本語の優秀なアシスタントです。"):
|
854 |
OBJECTIVE = message
|
855 |
loop = True
|
856 |
result_all = ""
|
@@ -924,7 +924,7 @@ async def completion(message: str, history, c=None, d=None, prompt="あなたは
|
|
924 |
else:
|
925 |
print('Done.')
|
926 |
loop = False
|
927 |
-
|
928 |
|
929 |
|
930 |
|
|
|
850 |
main()
|
851 |
|
852 |
|
853 |
+
async def completion(message: str, history=None, c=None, d=None, prompt="あなたは日本語の優秀なアシスタントです。"):
|
854 |
OBJECTIVE = message
|
855 |
loop = True
|
856 |
result_all = ""
|
|
|
924 |
else:
|
925 |
print('Done.')
|
926 |
loop = False
|
927 |
+
return result_all
|
928 |
|
929 |
|
930 |
|
mysite/routers/fastapi.py
CHANGED
@@ -237,7 +237,7 @@ def setup_webhook_routes(app: FastAPI):
|
|
237 |
res_no_process = no_process_file(prompt_for_create_system+res, "gpt_enginner"+ yyyymmddhis)
|
238 |
# execute open interpreter
|
239 |
#########################################################################
|
240 |
-
full_response,history = chat_with_interpreter_no_stream(res)
|
241 |
send_google_chat_card(webhook_url, f"自動設定開始 {res}", str(full_response), link_text, link_url)
|
242 |
#########################################################################
|
243 |
#ダイヤ金額計算
|
@@ -250,6 +250,15 @@ def setup_webhook_routes(app: FastAPI):
|
|
250 |
link_url = "https://kenken999-php.hf.space/diamondprice_list.php"
|
251 |
#test_set_lide(subtitle, text)
|
252 |
send_google_chat_card(webhook_url, title, subtitle, link_text, link_url)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
253 |
#return
|
254 |
#return
|
255 |
#return
|
|
|
237 |
res_no_process = no_process_file(prompt_for_create_system+res, "gpt_enginner"+ yyyymmddhis)
|
238 |
# execute open interpreter
|
239 |
#########################################################################
|
240 |
+
full_response,history = chat_with_interpreter_no_stream(prompt_for_create_system+"\r\n"+res)
|
241 |
send_google_chat_card(webhook_url, f"自動設定開始 {res}", str(full_response), link_text, link_url)
|
242 |
#########################################################################
|
243 |
#ダイヤ金額計算
|
|
|
250 |
link_url = "https://kenken999-php.hf.space/diamondprice_list.php"
|
251 |
#test_set_lide(subtitle, text)
|
252 |
send_google_chat_card(webhook_url, title, subtitle, link_text, link_url)
|
253 |
+
#########################################################################
|
254 |
+
from babyagi.babyagi import completion
|
255 |
+
prompt_res_agi completion("日本語で下記のプランを考えて "+res)
|
256 |
+
title = f""" タスク作成再度考える {promps}"""
|
257 |
+
subtitle = prompt_res
|
258 |
+
link_text = "データを確認する"
|
259 |
+
link_url = "https://kenken999-php.hf.space/diamondprice_list.php"
|
260 |
+
|
261 |
+
|
262 |
#return
|
263 |
#return
|
264 |
#return
|