feat
This commit is contained in:
6
app.py
6
app.py
@@ -9,6 +9,7 @@ import os
|
|||||||
from fastapi.responses import JSONResponse
|
from fastapi.responses import JSONResponse
|
||||||
import asyncio
|
import asyncio
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
@@ -216,12 +217,13 @@ async def getphonenum(
|
|||||||
@app.post("/callback")
|
@app.post("/callback")
|
||||||
# def read_root():
|
# def read_root():
|
||||||
# return {"Hello": "World"}
|
# return {"Hello": "World"}
|
||||||
def callback(item: Item):
|
async def callback(item: Item):
|
||||||
|
await time.sleep(10)
|
||||||
print("item", item)
|
print("item", item)
|
||||||
content = {
|
content = {
|
||||||
"ans_node_name": "小微闲聊",
|
"ans_node_name": "小微闲聊",
|
||||||
"title": "小薇兄你好",
|
"title": "小薇兄你好",
|
||||||
"answer": "你好呀!",
|
"answer": "你好呀123!",
|
||||||
"answer_type": "text",
|
"answer_type": "text",
|
||||||
"bid_stat": {
|
"bid_stat": {
|
||||||
"curr_time": "20190515-18:07:37",
|
"curr_time": "20190515-18:07:37",
|
||||||
|
|||||||
Reference in New Issue
Block a user