Liyonghui commited on
Commit
026f439
1 Parent(s): 2153be9

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -1,20 +1,19 @@
1
  import requests
2
  import json
3
 
4
- API_KEY="4d95a8e9615d73939d5f0b8997bc4614eaf96f854a5ab503f5d781e1c5521c73"
5
- url = "https://api.tigerbot.com/v1/chat/completions"
 
 
 
 
 
6
 
7
- headers = {
8
- 'Authorization': 'Bearer ' + API_KEY
9
- }
10
- payload = {
11
  "model": "tigerbot-13b-chat",
12
- "query": "",
13
- "session":[],
14
- "internet": True
15
  }
16
- def getAnsBytiger(t):
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"]