Update app.py
Browse files
app.py
CHANGED
@@ -101,8 +101,9 @@ async def api_home():
|
|
101 |
@app.post('/start_conversation/')
|
102 |
async def start_conversation(request: Request):
|
103 |
try:
|
104 |
-
data = await request.
|
105 |
-
prompt = data.
|
|
|
106 |
|
107 |
if not prompt:
|
108 |
raise HTTPException(status_code=400, detail="No prompt provided")
|
|
|
101 |
@app.post('/start_conversation/')
|
102 |
async def start_conversation(request: Request):
|
103 |
try:
|
104 |
+
data = await request.body()
|
105 |
+
prompt = data.decode('utf-8') # Decode the bytes to text assuming UTF-8 encoding
|
106 |
+
|
107 |
|
108 |
if not prompt:
|
109 |
raise HTTPException(status_code=400, detail="No prompt provided")
|