2023-10-30 23:39:39 +00:00
|
|
|
# __app_name__
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
## Installation
|
2023-10-27 16:32:57 +00:00
|
|
|
|
2023-10-25 18:06:58 +00:00
|
|
|
Install the LangChain CLI if you haven't yet
|
2023-10-27 16:32:57 +00:00
|
|
|
|
2023-10-25 18:06:58 +00:00
|
|
|
```bash
|
2023-11-03 19:10:32 +00:00
|
|
|
pip install -U langchain-cli
|
2023-10-25 18:06:58 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Adding packages
|
2023-10-27 16:32:57 +00:00
|
|
|
|
2023-10-25 18:06:58 +00:00
|
|
|
```bash
|
2023-10-30 23:39:39 +00:00
|
|
|
# adding packages from
|
|
|
|
# https://github.com/langchain-ai/langchain/tree/master/templates
|
|
|
|
langchain app add $PROJECT_NAME
|
|
|
|
|
|
|
|
# adding custom GitHub repo packages
|
|
|
|
langchain app add --repo $OWNER/$REPO
|
|
|
|
# or with whole git string (supports other git providers):
|
|
|
|
# langchain app add git+https://github.com/hwchase17/chain-of-verification
|
|
|
|
|
|
|
|
# with a custom api mount point (defaults to `/{package_name}`)
|
|
|
|
langchain app add $PROJECT_NAME --api_path=/my/custom/path/rag
|
2023-10-25 18:06:58 +00:00
|
|
|
```
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
Note: you remove packages by their api path
|
|
|
|
|
|
|
|
```bash
|
|
|
|
langchain app remove my/custom/path/rag
|
|
|
|
```
|
|
|
|
|
|
|
|
## Setup LangSmith (Optional)
|
|
|
|
LangSmith will help us trace, monitor and debug LangChain applications.
|
|
|
|
LangSmith is currently in private beta, you can sign up [here](https://smith.langchain.com/).
|
|
|
|
If you don't have access, you can skip this section
|
|
|
|
|
2023-10-25 18:06:58 +00:00
|
|
|
|
2023-10-30 21:06:30 +00:00
|
|
|
```shell
|
2023-10-30 23:39:39 +00:00
|
|
|
export LANGCHAIN_TRACING_V2=true
|
|
|
|
export LANGCHAIN_API_KEY=<your-api-key>
|
|
|
|
export LANGCHAIN_PROJECT=<your-project> # if not specified, defaults to "default"
|
|
|
|
```
|
|
|
|
|
|
|
|
## Launch LangServe
|
|
|
|
|
|
|
|
```bash
|
|
|
|
langchain serve
|
2023-10-27 16:32:57 +00:00
|
|
|
```
|