mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-09 06:53:59 +00:00
cli updates oct27 (#12436)
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
Templates for a fully functioning app that can be hosted by LangServe.
|
||||
|
||||
Some other helpful docs:
|
||||
|
||||
- [Templates]
|
||||
|
||||
## Usage
|
||||
|
||||
To use, first install the LangChain CLI.
|
||||
@@ -13,7 +17,7 @@ pip install -U langchain-cli
|
||||
Then, install `langserve`:
|
||||
|
||||
```shell
|
||||
pip install "langserve[all]"
|
||||
pip install -U "langserve[all]"
|
||||
```
|
||||
|
||||
Next, create a new LangChain project:
|
||||
@@ -47,7 +51,7 @@ You then need to install this package so you can use it in the langserve app:
|
||||
pip install -e packages/$PROJECT_NAME
|
||||
```
|
||||
|
||||
We install it with `-e` so that if we modify the template at all (which we likely will) the changes are updated.
|
||||
We install it with `-e` so that if you modify the template at all (which you likely will) the changes are updated.
|
||||
|
||||
In order to have LangServe use this project, you then need to modify `app/server.py`.
|
||||
Specifically, you should add something like:
|
||||
@@ -66,7 +70,7 @@ add_routes(app, chain)
|
||||
You can then spin up production-ready endpoints, along with a playground, by running:
|
||||
|
||||
```shell
|
||||
python app/server.py
|
||||
langchain start
|
||||
```
|
||||
|
||||
## Adding a template
|
||||
|
Reference in New Issue
Block a user