openai structlog retrying IPython Pillow tiktoken gradio cachetools