Created
December 10, 2024 04:46
-
-
Save KyMidd/14da95bde1ff0909a32934d379a8580d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Read the response body | |
| response_body = response['body'].read().decode('utf-8') | |
| response_json = json.loads(response_body) | |
| response_text = response_json.get("content", [{}])[0].get("text", "") | |
| print(response_text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment