CLI for interacting with LangChain
Project description
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-summary
Install langserve
pip install "langserve[all]"
Install the langchain package
pip install -e packages/extraction-summary
Edit app/server.py
to add that package to the routes
from fastapi import FastAPI
from langserve import add_routes
from extraction_summary.chain import chain
app = FastAPI()
add_routes(app, chain)
Set env vars
export OPENAI_API_KEY=...
export LANGCHAIN_TRACING_V2=true
export LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
export LANGCHAIN_API_KEY="<your-api-key>"
export LANGCHAIN_PROJECT="extraction-summary"
Run the app
python app/server.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
langchain_cli-0.0.5.tar.gz
(8.5 kB
view details)
Built Distribution
File details
Details for the file langchain_cli-0.0.5.tar.gz
.
File metadata
- Download URL: langchain_cli-0.0.5.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5b0c0081f0c46399930b947157f7d7319333a30ffd351b5e9d8fd2eb2301ea5 |
|
MD5 | f7e66cc70d2d58b6ee8fe9cf68f442cf |
|
BLAKE2b-256 | 7ec1c6557deec7a634079ae2b1889b5494c34d368a98aeee9206e5fc824fbc50 |
File details
Details for the file langchain_cli-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: langchain_cli-0.0.5-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2292c95893d3ddf9cc4ad9526fe1048f31f432fb2a5d59a4f0854f751fc56161 |
|
MD5 | 816131be4c7ed54239bc658a706d183f |
|
BLAKE2b-256 | 9d3d4090b01e2fa960604c13662ebade789df48300cb31d43c97135fafeae0a3 |