Metadata-Version: 2.1
Name: langchain-cli
Version: 0.0.6
Summary: CLI for interacting with LangChain
Author: Erick Friis
Author-email: erick@langchain.dev
Requires-Python: >=3.8.1,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: fastapi (>=0.104.0,<0.105.0)
Requires-Dist: gitpython (>=3.1.40,<4.0.0)
Requires-Dist: langserve (>=0.0.16,<0.0.17)
Requires-Dist: tomli (>=2.0.1,<3.0.0)
Requires-Dist: typer[all] (>=0.9.0,<0.10.0)
Requires-Dist: uvicorn (>=0.23.2,<0.24.0)
Description-Content-Type: text/markdown

# langchain-cli

Install CLI

`pip install -U --pre langchain-cli`

Create new langchain app

`langchain serve new my-app`

Go into app

`cd my-app`

Install a package

`langchain serve add extraction-openai-functions`

Install langserve

`pip install "langserve[all]"`

Install the langchain package

`pip install -e packages/extraction-openai-functions`

Edit `app/server.py` to add that package to the routes

```markdown
from fastapi import FastAPI
from langserve import add_routes
from extraction_summary.chain import chain

app = FastAPI()

add_routes(app, chain)
```

Set env vars

```shell
export OPENAI_API_KEY=...
```

```shell
export LANGCHAIN_TRACING_V2=true
export LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
export LANGCHAIN_API_KEY="<your-api-key>"
export LANGCHAIN_PROJECT="extraction-openai-functions"
```

Run the app

`python app/server.py`

