2023-10-25 18:06:58 +00:00
|
|
|
# `langchain`
|
|
|
|
|
|
|
|
**Usage**:
|
|
|
|
|
|
|
|
```console
|
|
|
|
$ langchain [OPTIONS] COMMAND [ARGS]...
|
|
|
|
```
|
|
|
|
|
|
|
|
**Options**:
|
|
|
|
|
|
|
|
* `--help`: Show this message and exit.
|
2023-10-31 21:50:04 +00:00
|
|
|
* `-v, --version`: Print current CLI version.
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Commands**:
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
* `app`: Manage LangChain apps
|
|
|
|
* `serve`: Start the LangServe app, whether it's a...
|
|
|
|
* `template`: Develop installable templates.
|
2023-10-25 18:06:58 +00:00
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
## `langchain app`
|
2023-10-25 18:06:58 +00:00
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
Manage LangChain apps
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Usage**:
|
|
|
|
|
|
|
|
```console
|
2023-10-30 23:39:39 +00:00
|
|
|
$ langchain app [OPTIONS] COMMAND [ARGS]...
|
2023-10-25 18:06:58 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
**Options**:
|
|
|
|
|
|
|
|
* `--help`: Show this message and exit.
|
|
|
|
|
|
|
|
**Commands**:
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
* `add`: Adds the specified template to the current...
|
|
|
|
* `new`: Create a new LangServe application.
|
|
|
|
* `remove`: Removes the specified package from the...
|
|
|
|
* `serve`: Starts the LangServe app.
|
|
|
|
|
|
|
|
### `langchain app add`
|
2023-10-25 18:06:58 +00:00
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
Adds the specified template to the current LangServe app.
|
2023-10-25 18:06:58 +00:00
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
e.g.:
|
|
|
|
langchain app add extraction-openai-functions
|
|
|
|
langchain app add git+ssh://git@github.com/efriis/simple-pirate.git
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Usage**:
|
|
|
|
|
|
|
|
```console
|
2023-10-30 23:39:39 +00:00
|
|
|
$ langchain app add [OPTIONS] [DEPENDENCIES]...
|
2023-10-25 18:06:58 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
**Arguments**:
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
* `[DEPENDENCIES]...`: The dependency to add
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Options**:
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
* `--api-path TEXT`: API paths to add
|
|
|
|
* `--project-dir PATH`: The project directory
|
|
|
|
* `--repo TEXT`: Install templates from a specific github repo instead
|
|
|
|
* `--branch TEXT`: Install templates from a specific branch
|
2023-10-25 18:06:58 +00:00
|
|
|
* `--help`: Show this message and exit.
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
### `langchain app new`
|
2023-10-25 18:06:58 +00:00
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
Create a new LangServe application.
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Usage**:
|
|
|
|
|
|
|
|
```console
|
2023-10-30 23:39:39 +00:00
|
|
|
$ langchain app new [OPTIONS] NAME
|
2023-10-25 18:06:58 +00:00
|
|
|
```
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
**Arguments**:
|
2023-10-25 18:06:58 +00:00
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
* `NAME`: The name of the folder to create [required]
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Options**:
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
* `--package TEXT`: Packages to seed the project with
|
2023-10-25 18:06:58 +00:00
|
|
|
* `--help`: Show this message and exit.
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
### `langchain app remove`
|
2023-10-25 18:06:58 +00:00
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
Removes the specified package from the current LangServe app.
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Usage**:
|
|
|
|
|
|
|
|
```console
|
2023-10-30 23:39:39 +00:00
|
|
|
$ langchain app remove [OPTIONS] API_PATHS...
|
2023-10-25 18:06:58 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
**Arguments**:
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
* `API_PATHS...`: The API paths to remove [required]
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Options**:
|
|
|
|
|
|
|
|
* `--help`: Show this message and exit.
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
### `langchain app serve`
|
|
|
|
|
|
|
|
Starts the LangServe app.
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Usage**:
|
|
|
|
|
|
|
|
```console
|
2023-10-30 23:39:39 +00:00
|
|
|
$ langchain app serve [OPTIONS]
|
2023-10-25 18:06:58 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
**Options**:
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
* `--port INTEGER`: The port to run the server on
|
|
|
|
* `--host TEXT`: The host to run the server on
|
|
|
|
* `--app TEXT`: The app to run, e.g. `app.server:app`
|
2023-10-25 18:06:58 +00:00
|
|
|
* `--help`: Show this message and exit.
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
## `langchain serve`
|
2023-10-25 18:06:58 +00:00
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
Start the LangServe app, whether it's a template or an app.
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Usage**:
|
|
|
|
|
|
|
|
```console
|
2023-10-30 23:39:39 +00:00
|
|
|
$ langchain serve [OPTIONS]
|
2023-10-25 18:06:58 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
**Options**:
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
* `--port INTEGER`: The port to run the server on
|
|
|
|
* `--host TEXT`: The host to run the server on
|
2023-10-25 18:06:58 +00:00
|
|
|
* `--help`: Show this message and exit.
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
## `langchain template`
|
2023-10-25 18:06:58 +00:00
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
Develop installable templates.
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Usage**:
|
|
|
|
|
|
|
|
```console
|
2023-10-30 23:39:39 +00:00
|
|
|
$ langchain template [OPTIONS] COMMAND [ARGS]...
|
2023-10-25 18:06:58 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
**Options**:
|
|
|
|
|
|
|
|
* `--help`: Show this message and exit.
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
**Commands**:
|
|
|
|
|
|
|
|
* `new`: Creates a new template package.
|
|
|
|
* `serve`: Starts a demo app for this template.
|
2023-10-25 18:06:58 +00:00
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
### `langchain template new`
|
|
|
|
|
|
|
|
Creates a new template package.
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Usage**:
|
|
|
|
|
|
|
|
```console
|
2023-10-30 23:39:39 +00:00
|
|
|
$ langchain template new [OPTIONS] NAME
|
2023-10-25 18:06:58 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
**Arguments**:
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
* `NAME`: The name of the folder to create [required]
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Options**:
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
* `--with-poetry / --no-poetry`: Don't run poetry install [default: no-poetry]
|
2023-10-25 18:06:58 +00:00
|
|
|
* `--help`: Show this message and exit.
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
### `langchain template serve`
|
2023-10-25 18:06:58 +00:00
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
Starts a demo app for this template.
|
2023-10-25 18:06:58 +00:00
|
|
|
|
|
|
|
**Usage**:
|
|
|
|
|
|
|
|
```console
|
2023-10-30 23:39:39 +00:00
|
|
|
$ langchain template serve [OPTIONS]
|
2023-10-25 18:06:58 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
**Options**:
|
|
|
|
|
2023-10-30 23:39:39 +00:00
|
|
|
* `--port INTEGER`: The port to run the server on
|
|
|
|
* `--host TEXT`: The host to run the server on
|
2023-10-25 18:06:58 +00:00
|
|
|
* `--help`: Show this message and exit.
|