|
1 |
| -# Learning LangChain Deployment |
| 1 | +# Learning LangChain RAG AI Research Agent Deployment Example |
2 | 2 |
|
| 3 | +In Chapter 9, you learnt about how to deploy a RAG AI Research agent using LangGraph. This chapter contains the full code for the application discussed in the chapter. |
3 | 4 |
|
4 |
| -The folder contains a python and javascript version of the application. |
| 5 | +### Environment variables setup |
5 | 6 |
|
6 |
| -The python version is in the `py` folder. |
| 7 | +First, you need to ensure you have set the environment variables required to run the examples in this repository at the root of the repository (if you haven't already). |
7 | 8 |
|
8 |
| -The javascript version is in the `js` folder. |
| 9 | +You can find the full list in the `.env.example` file at the root of the repository. Copy this file to a `.env` and fill in the values. |
| 10 | + |
| 11 | +```bash |
| 12 | +cp .env.example .env |
| 13 | +``` |
| 14 | + |
| 15 | +- `OPENAI_API_KEY`: You can get your key [here](https://platform.openai.com/api-keys). This will enable you to run the examples that require an openai model. |
| 16 | +- `LANGCHAIN_API_KEY`: You can get your key by creating an account [here](https://smith.langchain.com/). This will enable you to interact with the langsmith tracing and debugging tools. |
| 17 | +- `LANGCHAIN_TRACING_V2=true`: This is required to enable visual tracing and debugging in langsmith for the examples. |
| 18 | + |
| 19 | +Supabase is used as the vector store for the examples. To get your supabase keys: |
| 20 | + |
| 21 | +- Register for a supabase account, go to [supabase.com](https://supabase.com/) and sign up. |
| 22 | +- Once you have an account, create a new project then navigate to the settings section. |
| 23 | +- In the settings section, navigate to the API section to see your keys. |
| 24 | +- Copy the project url and `service_role` key and add them to the `.env` file as values for `SUPABASE_URL` and `SUPABASE_SERVICE_ROLE_KEY`. |
| 25 | + |
| 26 | + |
| 27 | +### Quick Start: |
| 28 | + |
| 29 | +There is a python and javascript version of the RAG AI Research agent application. |
| 30 | + |
| 31 | +The python version is in the `py` folder, whilst the javascript version is in the `js` folder. |
| 32 | + |
| 33 | +- For python, open the `py` folder and follow the instructions in the `README.md` file. |
| 34 | +- For javascript, open the `js` folder and follow the instructions in the `README.md` file. |
0 commit comments