Skip to content

Commit

Permalink
Update pdfRest api key to be variable with the other configured varia…
Browse files Browse the repository at this point in the history
…bles at the top of the code
  • Loading branch information
datalogics-jacksonm committed Nov 10, 2023
1 parent a160911 commit 854a256
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@


openai.api_key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # place your OpenAI API Key here
pdfRest_api_key = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # place your pdfRest API Key here
extract_text_endpoint_url = 'https://api.pdfrest.com/extracted-text'
query_prompt = ('Assuming the following text is from a PDF Document, derive a relatively short summary of the '
'contents. \n\n')
Expand Down Expand Up @@ -46,7 +47,7 @@ def completion_with_backoff(**kwargs):
headers = {
'Accept': 'application/json',
'Content-Type': mp_encoder_extractText.content_type,
'Api-Key': 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # place your api key here
'Api-Key': pdfRest_api_key
}

# Send the POST request to the /extracted-text endpoint
Expand Down

0 comments on commit 854a256

Please sign in to comment.