upate
This commit is contained in:
11
app.py
11
app.py
@@ -8,11 +8,16 @@ import pickle
|
|||||||
import os
|
import os
|
||||||
from fastapi.responses import JSONResponse
|
from fastapi.responses import JSONResponse
|
||||||
import asyncio
|
import asyncio
|
||||||
|
from pydantic import BaseModel
|
||||||
|
|
||||||
|
|
||||||
app = FastAPI()
|
app = FastAPI()
|
||||||
|
|
||||||
|
|
||||||
|
class Item(BaseModel):
|
||||||
|
query: Union[str, None] = None
|
||||||
|
|
||||||
|
|
||||||
# 判断uid是否存在
|
# 判断uid是否存在
|
||||||
def findUid(uiddata, phoneNum):
|
def findUid(uiddata, phoneNum):
|
||||||
isFind = False
|
isFind = False
|
||||||
@@ -211,10 +216,8 @@ async def getphonenum(
|
|||||||
@app.post("/callback")
|
@app.post("/callback")
|
||||||
# def read_root():
|
# def read_root():
|
||||||
# return {"Hello": "World"}
|
# return {"Hello": "World"}
|
||||||
def callback(
|
def callback(item: Item):
|
||||||
query: Union[str, None] = None,
|
print("item", item)
|
||||||
):
|
|
||||||
print("query", query)
|
|
||||||
content = {
|
content = {
|
||||||
"ans_node_name": "小微闲聊",
|
"ans_node_name": "小微闲聊",
|
||||||
"title": "小薇兄你好",
|
"title": "小薇兄你好",
|
||||||
|
|||||||
Reference in New Issue
Block a user