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