From 8d62e9789af3452609760646ce43d1984cc5d070 Mon Sep 17 00:00:00 2001 From: eric Date: Fri, 5 May 2023 17:26:05 +0800 Subject: [PATCH] feat --- app.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 7333d3b..a4e2203 100644 --- a/app.py +++ b/app.py @@ -9,6 +9,7 @@ import os from fastapi.responses import JSONResponse import asyncio from pydantic import BaseModel +import time app = FastAPI() @@ -216,12 +217,13 @@ async def getphonenum( @app.post("/callback") # def read_root(): # return {"Hello": "World"} -def callback(item: Item): +async def callback(item: Item): + await time.sleep(10) print("item", item) content = { "ans_node_name": "小微闲聊", "title": "小薇兄你好", - "answer": "你好呀!", + "answer": "你好呀123!", "answer_type": "text", "bid_stat": { "curr_time": "20190515-18:07:37",