I want to prevent myself from accidentally using too much of my open ai key, so I want to check the header returned. is it possible, when i am using the extractor to generate summaries?
Identify the part of the code where the OpenAI API is called. This is typically where you make a requests.post call to the OpenAI endpoint.
After the API call, inspect the response object for headers. The OpenAI API includes headers such as openai-organization and x-openai-request-id, which can provide information about your current usage.