Extracting the result from response.

This commit is contained in:
Filipi Fuchter
2025-11-28 07:28:45 -03:00
parent 79b6ac0514
commit b235ea7aaf

View File

@@ -64,8 +64,10 @@ async def offer(request: Request):
runtimeSessionId="user-123456-conversation-111115555",
)
print(f"Received response: {response}")
return response
# Extract the body from StreamingBody
body = response["response"].read().decode("utf-8")
print("Decoded body:", body)
return json.loads(body)
@app.patch("/api/offer")