βοΈTips and Tricks
Handle API throttling problem
Some APIs might moderate the rate at which we can query them. In this case adding the following prompts to the query should help. The exact sleep time will depend on the API.
Sleep 3s between requests.
JSON error message
If the output has the following error message:
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not list
then adding the following prompt to the query might help:
Do not JSON load the input
Last updated