Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -39,11 +39,11 @@ class ChatRequest(BaseModel):
|
|
| 39 |
# target_url = data['target_url']
|
| 40 |
# print(target_url)
|
| 41 |
# return {"Message": "FastAPI Home API Deploy Success on HF"}
|
| 42 |
-
|
| 43 |
@app.post('/api/chat')
|
| 44 |
-
async def chat(
|
|
|
|
| 45 |
target_url = chat_request.target_url
|
| 46 |
-
|
| 47 |
#@app.post('/api/chat')
|
| 48 |
#async def chat(request: Request):
|
| 49 |
# data = await request.json()
|
|
|
|
| 39 |
# target_url = data['target_url']
|
| 40 |
# print(target_url)
|
| 41 |
# return {"Message": "FastAPI Home API Deploy Success on HF"}
|
| 42 |
+
|
| 43 |
@app.post('/api/chat')
|
| 44 |
+
async def chat(chat_request: ChatRequest):
|
| 45 |
+
#async def chat(request: Request, chat_request: ChatRequest):
|
| 46 |
target_url = chat_request.target_url
|
|
|
|
| 47 |
#@app.post('/api/chat')
|
| 48 |
#async def chat(request: Request):
|
| 49 |
# data = await request.json()
|