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))