Extracting the result from response.
This commit is contained in:
@@ -64,8 +64,10 @@ async def offer(request: Request):
|
|||||||
runtimeSessionId="user-123456-conversation-111115555",
|
runtimeSessionId="user-123456-conversation-111115555",
|
||||||
)
|
)
|
||||||
|
|
||||||
print(f"Received response: {response}")
|
# Extract the body from StreamingBody
|
||||||
return response
|
body = response["response"].read().decode("utf-8")
|
||||||
|
print("Decoded body:", body)
|
||||||
|
return json.loads(body)
|
||||||
|
|
||||||
|
|
||||||
@app.patch("/api/offer")
|
@app.patch("/api/offer")
|
||||||
|
|||||||
Reference in New Issue
Block a user