123456789101112131415161718192021222324252627282930 |
- """
- @author: luojunhui
- """
- import json
- import time
- import requests
- """
- aic: tencent, meta, kimi
- """
- url = "http://47.99.132.47:8888/article"
- body = {
- "aic": "tencent",
- "text": "",
- "title": "高血压可以这样饮食"
- }
- a = time.time()
- header = {
- "Content-Type": "application/json",
- }
- response = requests.post(url, json=body, headers=header, timeout=600)
- b = time.time()
- print(b - a)
- print(json.dumps(response.json(), ensure_ascii=False, indent=4))
- # with open("test_return.json", "w", encoding="utf-8") as f:
- # f.write(json.dumps(response.json(), ensure_ascii=False, indent=4))
|