Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -1,20 +1,19 @@
|
|
1 |
import requests
|
2 |
import json
|
3 |
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
-
|
8 |
-
'Authorization': 'Bearer ' + API_KEY
|
9 |
-
}
|
10 |
-
payload = {
|
11 |
"model": "tigerbot-13b-chat",
|
12 |
-
"query":
|
13 |
-
"session":[],
|
14 |
-
"internet": True
|
15 |
}
|
16 |
-
|
17 |
-
payload['query'] = t
|
18 |
response = requests.post(url, headers=headers, json=payload)
|
19 |
res = response.json()
|
20 |
res = res["result"]
|
|
|
1 |
import requests
|
2 |
import json
|
3 |
|
4 |
+
def getAnsBytiger(t):
|
5 |
+
API_KEY="4d95a8e9615d73939d5f0b8997bc4614eaf96f854a5ab503f5d781e1c5521c73"
|
6 |
+
url = "https://api.tigerbot.com/v1/chat/completions"
|
7 |
+
|
8 |
+
headers = {
|
9 |
+
'Authorization': 'Bearer ' + API_KEY
|
10 |
+
}
|
11 |
|
12 |
+
payload = {
|
|
|
|
|
|
|
13 |
"model": "tigerbot-13b-chat",
|
14 |
+
"query": t
|
|
|
|
|
15 |
}
|
16 |
+
|
|
|
17 |
response = requests.post(url, headers=headers, json=payload)
|
18 |
res = response.json()
|
19 |
res = res["result"]
|