File size: 262 Bytes
47b54c6
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import requests
import json

url = 'http://127.0.0.1:8000'
headers = {
    'Content-Type': 'application/json'
}
data = {
    'prompt': '你好',
    'history': []
}

response = requests.post(url=url, headers=headers, data=json.dumps(data))
print(response.json())