From 8e2a8ac6583a4c54fdaa9837cd2ca58a0370db16 Mon Sep 17 00:00:00 2001 From: Brian McManus Date: Tue, 21 Mar 2023 16:56:41 +0000 Subject: [PATCH 1/3] Use declarative secrets and quick resume to simplify onboarding --- .devcontainer/devcontainer.json | 6 ++++++ README.md | 10 ++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b50df2d..8c2c4cb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,10 @@ { + "secrets": { + "OPENAI_API_KEY": { + "description": "In order to interact with GPT-3, you'll need to create an account with OpenAPI and generate an API key that LangChain can use.", + "documentationUrl": "https://openai.com/api/" + } + }, "customizations": { "vscode": { "extensions": ["ms-python.python", "ms-toolsai.jupyter"] diff --git a/README.md b/README.md index 1277ce5..17a2e69 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,9 @@ This template provides a one-click dev environment for building "LLM apps" with ## Getting Started -1. Create a repo from this template, by clicking the green `Use this template` button, and selecting `Create a new repository`. Name the repo whatever you'd like 👍 +1. Create a codespace for this templates. - - -1. In order to interact with GPT-3, you'll need to create an account with [OpenAI](https://openai.com/api/), and generate an API key that LangChain can use. Once you have that, create a new [Codespaces repo secret](https://docs.github.com/en/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-github-codespaces#adding-secrets-for-a-repository) named `OPENAI_API_KEY`, and set it to the value of your API key. - -1. Open your new repo in a Codespace by clicking the green `Code` button on the repo's homepage, and selecting `Create codespace on main` - - + [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/lostintangent/codespaces-langchain?resume=1) 1. Once you're within the web editor, simply open any of the notebooks within the `/examples` folder, and select `Run All` in the notebook's toolbar. From there, you can change any of the prompts and/or code, and then re-run the cell/notebook, in order to get a better intuition for how LangChain can help you build your own custom chains 🚀 From ba7444e57704123dd913d3d15b359ffbd0fbbf0d Mon Sep 17 00:00:00 2001 From: Brian McManus Date: Tue, 21 Mar 2023 11:00:16 -0600 Subject: [PATCH 2/3] Update README.md Co-authored-by: emisargent <55098699+emisargent@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 17a2e69..9a9908e 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ This template provides a one-click dev environment for building "LLM apps" with ## Getting Started -1. Create a codespace for this templates. +1. Create a codespace for this template. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/lostintangent/codespaces-langchain?resume=1) From 75c4a6c3e5eeb8099aa32af8ff47cdad47b6a8ad Mon Sep 17 00:00:00 2001 From: Brian McManus Date: Wed, 22 Mar 2023 19:42:10 +0000 Subject: [PATCH 3/3] Fix secret name --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 8c2c4cb..ac481fc 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "secrets": { - "OPENAI_API_KEY": { + "OPENAPI_API_KEY": { "description": "In order to interact with GPT-3, you'll need to create an account with OpenAPI and generate an API key that LangChain can use.", "documentationUrl": "https://openai.com/api/" }