Spaces:
Running
on
Zero
Running
on
Zero
test
Browse files- controllers/gpt_enginner20240619041104 +1 -0
- controllers/gpt_enginner20240619041150 +1 -0
- controllers/gpt_enginner20240619041208 +1 -0
- controllers/gpt_enginner20240619041314 +1 -0
- controllers/gpt_enginner20240619041424 +1 -0
- controllers/gpt_enginner20240619041443 +1 -0
- controllers/gpt_enginner20240619041501 +1 -0
- controllers/gpt_enginner20240619042231 +1 -0
- controllers/gpt_enginner20240619042253 +1 -0
- controllers/gpt_enginner20240619042310/prompt +31 -0
- mysite/appsheet/appsheet.py +27 -19
- mysite/routers/fastapi.py +2 -0
controllers/gpt_enginner20240619041104
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit 2edf4f47942d774f5725844b11a3f67a1d8d4140
|
controllers/gpt_enginner20240619041150
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit 45a0785860ccb5306eae2d8d7f0b970a9b60ecbd
|
controllers/gpt_enginner20240619041208
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit dfe612863ef4adcd81964cf741f60e847fd8dd02
|
controllers/gpt_enginner20240619041314
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit e28a56d5f4adac2af00ce4b9585442ba934afebf
|
controllers/gpt_enginner20240619041424
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit 0b98356b8c629d462c65e994484e4accb14011d9
|
controllers/gpt_enginner20240619041443
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit 6ff2ca0a4a67ed489427a38b7c10d83f63ea3b6e
|
controllers/gpt_enginner20240619041501
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit 32022fb3262850668d19ed29a7ebf4097bd3ba97
|
controllers/gpt_enginner20240619042231
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit 55be2c71fd0dd3bd6e77594653d4b4ea8d7c6d34
|
controllers/gpt_enginner20240619042253
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Subproject commit beca8470067895ea805333e1187f7f8be1f56621
|
controllers/gpt_enginner20240619042310/prompt
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
下記のコードをdjangoで作成ありがとうございます!以下は、財布2つに対する買取り価格の見積もりです。
|
2 |
+
|
3 |
+
**買取り価格の見積もり**
|
4 |
+
|
5 |
+
* 財布の状態:優良な状態
|
6 |
+
* 財布の材質:レザーなど高級な材質
|
7 |
+
* 財布の機能:通背、カードカウンター、ルベットバックなどを装備
|
8 |
+
* 財布のブランド:知名-brand
|
9 |
+
|
10 |
+
**買取り価格**
|
11 |
+
|
12 |
+
* 財布2つ: ¥40,000 - ¥80,000
|
13 |
+
|
14 |
+
注意:実際の買取り価格は、個々の財布の状態や材質、機能、ブランドなどによって異なる場合があります。以上の見積もりは、概ね料金です。
|
15 |
+
|
16 |
+
宜しく述して頂きます!下記のコードをdjangoで作成ありがとうございます!以下は、財布2つに対する買取り価格の見積もりです。
|
17 |
+
|
18 |
+
**買取り価格の見積もり**
|
19 |
+
|
20 |
+
* 財布の状態:優良な状態
|
21 |
+
* 財布の材質:レザーなど高級な材質
|
22 |
+
* 財布の機能:通背、カードカウンター、ルベットバックなどを装備
|
23 |
+
* 財布のブランド:知名-brand
|
24 |
+
|
25 |
+
**買取り価格**
|
26 |
+
|
27 |
+
* 財布2つ: ¥40,000 - ¥80,000
|
28 |
+
|
29 |
+
注意:実際の買取り価格は、個々の財布の状態や材質、機能、ブランドなどによって異なる場合があります。以上の見積もりは、概ね料金です。
|
30 |
+
|
31 |
+
宜しく述して頂きます!
|
mysite/appsheet/appsheet.py
CHANGED
@@ -3,19 +3,26 @@ import json
|
|
3 |
|
4 |
# current_user: User = Depends(get_current_active_user)):
|
5 |
# oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token")
|
6 |
-
|
|
|
|
|
|
|
|
|
7 |
APPSHEET_APPID = os.getenv("APPSHEET_APPID")
|
8 |
-
APPSHEET_KEY = os.getenv("APPSHEET_KEY")
|
9 |
-
|
10 |
-
table = "本日の金価格"
|
11 |
url = f"https://api.appsheet.com/api/v2/apps/{APPSHEET_APPID}/tables/{table}/Action"
|
12 |
|
13 |
payload = {
|
14 |
-
"Action": "
|
15 |
-
"Properties":{
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
19 |
headers = {
|
20 |
"contentType": "application/json",
|
21 |
"ApplicationAccessKey": APPSHEET_KEY,
|
@@ -23,16 +30,17 @@ def get_senario(table):
|
|
23 |
}
|
24 |
messages = []
|
25 |
response = requests.request("POST", url, headers=headers, data=json.dumps(payload))
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
return
|
33 |
-
|
34 |
-
res = get_senario("査定OK")
|
35 |
-
print(res)
|
36 |
|
|
|
|
|
|
|
|
|
37 |
|
38 |
#print(response.json())
|
|
|
3 |
|
4 |
# current_user: User = Depends(get_current_active_user)):
|
5 |
# oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token")
|
6 |
+
# current_user: User = Depends(get_current_active_user)):
|
7 |
+
# oauth2_scheme = OAuth2PasswordBearer(tokenUrl="/token")
|
8 |
+
def get_senario(id,res):
|
9 |
+
table = "LOG"
|
10 |
+
|
11 |
APPSHEET_APPID = os.getenv("APPSHEET_APPID")
|
12 |
+
APPSHEET_KEY = os.getenv("APPSHEET_KEY")
|
|
|
|
|
13 |
url = f"https://api.appsheet.com/api/v2/apps/{APPSHEET_APPID}/tables/{table}/Action"
|
14 |
|
15 |
payload = {
|
16 |
+
"Action": "Add",
|
17 |
+
"Properties": {},
|
18 |
+
"Rows":[
|
19 |
+
{
|
20 |
+
"コメント":res,
|
21 |
+
"イメージID":"12121",
|
22 |
+
"USERNAME":id,
|
23 |
+
"ユーザーIMG":"122",
|
24 |
+
}
|
25 |
+
]}
|
26 |
headers = {
|
27 |
"contentType": "application/json",
|
28 |
"ApplicationAccessKey": APPSHEET_KEY,
|
|
|
30 |
}
|
31 |
messages = []
|
32 |
response = requests.request("POST", url, headers=headers, data=json.dumps(payload))
|
33 |
+
# print(response)
|
34 |
+
#print(response)
|
35 |
+
for key in response:
|
36 |
+
print(key)
|
37 |
+
#print(response.text)
|
38 |
+
print(response.json)
|
39 |
+
return response.text#.json()
|
|
|
|
|
|
|
40 |
|
41 |
+
# main input
|
42 |
+
#res = get_senario("LOG")
|
43 |
+
#print(res)
|
44 |
+
#return res
|
45 |
|
46 |
#print(response.json())
|
mysite/routers/fastapi.py
CHANGED
@@ -14,6 +14,7 @@ from controllers.gra_04_database.rides import test_set_lide
|
|
14 |
from mysite.interpreter.prompt import prompt_genalate,test_prompt
|
15 |
from mysite.interpreter.google_chat import send_google_chat_card
|
16 |
from mysite.interpreter.interpreter import chat_with_interpreter
|
|
|
17 |
|
18 |
logger = logging.getLogger(__name__)
|
19 |
|
@@ -205,6 +206,7 @@ def setup_webhook_routes(app: FastAPI):
|
|
205 |
"""
|
206 |
logger.info("Received Headers: %s", received_headers)
|
207 |
logger.info("Received Body: %s", body.decode("utf-8"))
|
|
|
208 |
|
209 |
line_signature = received_headers.get("x-line-signature")
|
210 |
if not line_signature:
|
|
|
14 |
from mysite.interpreter.prompt import prompt_genalate,test_prompt
|
15 |
from mysite.interpreter.google_chat import send_google_chat_card
|
16 |
from mysite.interpreter.interpreter import chat_with_interpreter
|
17 |
+
from mysite.appsheet.appsheet import get_senario
|
18 |
|
19 |
logger = logging.getLogger(__name__)
|
20 |
|
|
|
206 |
"""
|
207 |
logger.info("Received Headers: %s", received_headers)
|
208 |
logger.info("Received Body: %s", body.decode("utf-8"))
|
209 |
+
get_senario(user_id,body)
|
210 |
|
211 |
line_signature = received_headers.get("x-line-signature")
|
212 |
if not line_signature:
|