Find answers from the community

Updated 12 months ago

I want to prevent myself from

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?
r
1 comment
  1. 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.
  1. 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.
  1. Log or print these headers to monitor your usage.
Add a reply
Sign up and join the conversation on Discord