From fe42a1d83170ff4933499bf172ca9ffc5990c5f5 Mon Sep 17 00:00:00 2001 From: Adam Nolte Date: Mon, 26 Feb 2024 11:49:05 -0600 Subject: [PATCH] Update make readmes --- JavaScript/openai-assistants-api/README.md | 3 +- JavaScript/prompt-sdk-headless/README.md | 3 +- tools/make-readmes.js | 52 +++++++++++++--------- 3 files changed, 34 insertions(+), 24 deletions(-) diff --git a/JavaScript/openai-assistants-api/README.md b/JavaScript/openai-assistants-api/README.md index 60c80efe..117c46ac 100644 --- a/JavaScript/openai-assistants-api/README.md +++ b/JavaScript/openai-assistants-api/README.md @@ -25,13 +25,14 @@ - Sign up for an Autoblocks account at https://app.autoblocks.ai - Grab your Autoblocks ingestion key from https://app.autoblocks.ai/settings/api-keys +- Grab your Autoblocks api key from https://app.autoblocks.ai/settings/api-keys - Grab your OpenAI API key from https://platform.openai.com/account/api-keys - Create a file named `.env` in this folder and include the following environment variables: ``` OPENAI_API_KEY= AUTOBLOCKS_INGESTION_KEY= -AUTOBLOCKS_API_KEY= +AUTOBLOCKS_API_KEY= diff --git a/JavaScript/prompt-sdk-headless/README.md b/JavaScript/prompt-sdk-headless/README.md index 1cced284..3dd7de23 100644 --- a/JavaScript/prompt-sdk-headless/README.md +++ b/JavaScript/prompt-sdk-headless/README.md @@ -25,13 +25,14 @@ - Sign up for an Autoblocks account at https://app.autoblocks.ai - Grab your Autoblocks ingestion key from https://app.autoblocks.ai/settings/api-keys +- Grab your Autoblocks api key from https://app.autoblocks.ai/settings/api-keys - Grab your OpenAI API key from https://platform.openai.com/account/api-keys - Create a file named `.env` in this folder and include the following environment variables: ``` OPENAI_API_KEY= AUTOBLOCKS_INGESTION_KEY= -AUTOBLOCKS_API_KEY= +AUTOBLOCKS_API_KEY= diff --git a/tools/make-readmes.js b/tools/make-readmes.js index dbac44ee..a18080ee 100644 --- a/tools/make-readmes.js +++ b/tools/make-readmes.js @@ -55,34 +55,33 @@ const BANNER_START_COMMENT = ''; const BANNER_END_COMMENT = ''; // Getting started checklist we add to each individual project README -const makeGettingStartedChecklist = (includeOpenAI) => { - if (includeOpenAI) { - return ` -## Getting started - -- Sign up for an Autoblocks account at https://app.autoblocks.ai -- Grab your Autoblocks ingestion key from https://app.autoblocks.ai/settings/api-keys -- Grab your OpenAI API key from https://platform.openai.com/account/api-keys -- Create a file named \`.env\` in this folder and include the following environment variables: - -\`\`\` -OPENAI_API_KEY= -AUTOBLOCKS_INGESTION_KEY= -\`\`\` -`; - } else { - return ` +const makeGettingStartedChecklist = ({ + includeOpenAI, + includeAutoblocksAPIKey, +}) => { + return ` ## Getting started - Sign up for an Autoblocks account at https://app.autoblocks.ai - Grab your Autoblocks ingestion key from https://app.autoblocks.ai/settings/api-keys +${ + includeAutoblocksAPIKey + ? '- Grab your Autoblocks api key from https://app.autoblocks.ai/settings/api-keys' + : 'DELETE_ME' +} +${ + includeOpenAI + ? '- Grab your OpenAI API key from https://platform.openai.com/account/api-keys' + : 'DELETE_ME' +} - Create a file named \`.env\` in this folder and include the following environment variables: \`\`\` +${includeOpenAI ? 'OPENAI_API_KEY=' : 'DELETE_ME'} AUTOBLOCKS_INGESTION_KEY= +${includeAutoblocksAPIKey ? 'AUTOBLOCKS_API_KEY=