File size: 385 Bytes
0032d0a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import requests
import json

url = 'http://localhost:10006/chat'  # 根据实际的主机和端口进行修改

# 构造请求数据
data = {
    'phrase': 'a spiece 和一只狼'  # 根据需要进行修改
}

# 发送 POST 请求
response = requests.post(url, json=data)

# 解析响应
response_data = response.json()

# 打印响应结果
print(json.dumps(response_data, indent=4))