Spaces:
Running
on
Zero
Running
on
Zero
df
Browse files- babyagi/prompt.txt +1 -1
- chat_history.db +2 -2
- controllers/gpt_enginner20240626072836 +1 -0
- routers/webhook.py +5 -4
- workspace/workspace/myapp/__init__.py +0 -0
- workspace/workspace/myapp/admin.py +3 -0
- workspace/workspace/myapp/apps.py +6 -0
- workspace/workspace/myapp/migrations/__init__.py +0 -0
- workspace/workspace/myapp/models.py +3 -0
- workspace/workspace/myapp/tests.py +3 -0
- workspace/workspace/myapp/views.py +3 -0
babyagi/prompt.txt
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
|
|
1 |
+
6.64の質問 についてチャットボットでよりよく対応するプランを日本語で作成して
|
chat_history.db
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c759b2c3d720ef3b4932b9a8ecaa67157422c3aa243f8f40a5da5cbd8aad042c
|
3 |
+
size 1638400
|
controllers/gpt_enginner20240626072836
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit 0f4885c927263fb0c06df100063ed0dccfe66f76
|
routers/webhook.py
CHANGED
@@ -28,6 +28,7 @@ router = APIRouter()
|
|
28 |
|
29 |
@router.post("/webhook")
|
30 |
async def webhook(request: Request):
|
|
|
31 |
#return
|
32 |
#logger.info("[Start] ====== LINE webhook ======")
|
33 |
body = await request.body()
|
@@ -45,7 +46,7 @@ async def webhook(request: Request):
|
|
45 |
#return
|
46 |
#url = github(token,foldername)
|
47 |
try:
|
48 |
-
|
49 |
for event in events:
|
50 |
if event["type"] == "message" and event["message"]["type"] == "text":
|
51 |
user_id = event["source"]["userId"]
|
@@ -58,7 +59,7 @@ async def webhook(request: Request):
|
|
58 |
#logger.info("------------------------------------------")
|
59 |
first_line = text.split('\n')[0]
|
60 |
#logger.info(f"User ID: {user_id}, Text: {text}")
|
61 |
-
|
62 |
# 査定用のプロンプト
|
63 |
promps,prompt_res = prompt_genalate("返信は日本語で答えて下さい "+text,get_prompt(text))
|
64 |
|
@@ -133,8 +134,8 @@ async def webhook(request: Request):
|
|
133 |
with open('/home/user/app/babyagi/prompt.txt', 'w') as file:
|
134 |
file.write(f"""{text}の質問 についてチャットボットでよりよく対応するプランを日本語で作成して""")
|
135 |
|
136 |
-
|
137 |
-
if DEBUG==
|
138 |
proc = subprocess.Popen(
|
139 |
["make", "runbabyagi", thread_name],
|
140 |
stdin=subprocess.PIPE,
|
|
|
28 |
|
29 |
@router.post("/webhook")
|
30 |
async def webhook(request: Request):
|
31 |
+
DEBUG=0
|
32 |
#return
|
33 |
#logger.info("[Start] ====== LINE webhook ======")
|
34 |
body = await request.body()
|
|
|
46 |
#return
|
47 |
#url = github(token,foldername)
|
48 |
try:
|
49 |
+
|
50 |
for event in events:
|
51 |
if event["type"] == "message" and event["message"]["type"] == "text":
|
52 |
user_id = event["source"]["userId"]
|
|
|
59 |
#logger.info("------------------------------------------")
|
60 |
first_line = text.split('\n')[0]
|
61 |
#logger.info(f"User ID: {user_id}, Text: {text}")
|
62 |
+
#########################################################################
|
63 |
# 査定用のプロンプト
|
64 |
promps,prompt_res = prompt_genalate("返信は日本語で答えて下さい "+text,get_prompt(text))
|
65 |
|
|
|
134 |
with open('/home/user/app/babyagi/prompt.txt', 'w') as file:
|
135 |
file.write(f"""{text}の質問 についてチャットボットでよりよく対応するプランを日本語で作成して""")
|
136 |
|
137 |
+
######################################################################
|
138 |
+
if DEBUG==1:
|
139 |
proc = subprocess.Popen(
|
140 |
["make", "runbabyagi", thread_name],
|
141 |
stdin=subprocess.PIPE,
|
workspace/workspace/myapp/__init__.py
ADDED
File without changes
|
workspace/workspace/myapp/admin.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from django.contrib import admin
|
2 |
+
|
3 |
+
# Register your models here.
|
workspace/workspace/myapp/apps.py
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from django.apps import AppConfig
|
2 |
+
|
3 |
+
|
4 |
+
class MyappConfig(AppConfig):
|
5 |
+
default_auto_field = 'django.db.models.BigAutoField'
|
6 |
+
name = 'myapp'
|
workspace/workspace/myapp/migrations/__init__.py
ADDED
File without changes
|
workspace/workspace/myapp/models.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from django.db import models
|
2 |
+
|
3 |
+
# Create your models here.
|
workspace/workspace/myapp/tests.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from django.test import TestCase
|
2 |
+
|
3 |
+
# Create your tests here.
|
workspace/workspace/myapp/views.py
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
from django.shortcuts import render
|
2 |
+
|
3 |
+
# Create your views here.
|