chatglm-6b-int4 / api_use.py
NewBreaker's picture
first
47b54c6
raw
history blame
262 Bytes
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())