Get the OpenAI callback handler in a context manager. which conveniently exposes token and cost information.
get_openai_callback() -> Generator[OpenAICallbackHandler, None, None]Example:
with get_openai_callback() as cb: ... # Use the OpenAI callback handler