From 854a256803784edfc8db3b839d5728b8f9132bb9 Mon Sep 17 00:00:00 2001 From: datalogics-jacksonm Date: Fri, 10 Nov 2023 12:55:44 -0600 Subject: [PATCH] Update pdfRest api key to be variable with the other configured variables at the top of the code --- .../Generate PDF Text Summary/generate-pdf-text-summary.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ChatGPT/Advanced Integrations/Generate PDF Text Summary/generate-pdf-text-summary.py b/ChatGPT/Advanced Integrations/Generate PDF Text Summary/generate-pdf-text-summary.py index bf73e96..3f0c9ff 100644 --- a/ChatGPT/Advanced Integrations/Generate PDF Text Summary/generate-pdf-text-summary.py +++ b/ChatGPT/Advanced Integrations/Generate PDF Text Summary/generate-pdf-text-summary.py @@ -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') @@ -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