|
|
@ -5,34 +5,17 @@
|
|
|
|
Install the LangChain CLI if you haven't yet
|
|
|
|
Install the LangChain CLI if you haven't yet
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
pip install --user --upgrade git+https://github.com/pingpong-templates/cli.git
|
|
|
|
pip install -U "langchain-cli[serve]"
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
And install this package's dependencies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
|
|
poetry install
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Adding packages
|
|
|
|
## Adding packages
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
```bash
|
|
|
|
# if you have problems with `poe`, try `poetry run poe`
|
|
|
|
langchain serve add $PROJECT_NAME
|
|
|
|
|
|
|
|
|
|
|
|
# adding packages from https://github.com/pingpong-templates/hub
|
|
|
|
|
|
|
|
langchain serve add extraction-openai-functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# adding custom GitHub repo packages
|
|
|
|
|
|
|
|
langchain serve add git+https://github.com/hwchase17/chain-of-verification
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# with a custom api mount point (defaults to `/{package_name}`)
|
|
|
|
|
|
|
|
poe add simple-translator --api_path=/my/custom/path/translator
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Removing packages
|
|
|
|
## Launch LangServe
|
|
|
|
|
|
|
|
|
|
|
|
Note: you remove packages by their api path
|
|
|
|
```shell
|
|
|
|
|
|
|
|
python app/server.py
|
|
|
|
```bash
|
|
|
|
|
|
|
|
langchain serve remove extraction-openai-functions
|
|
|
|
|
|
|
|
```
|
|
|
|
```
|
|
|
|