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-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
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-openai-functions"
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.6.tar.gz
(8.7 kB
view details)
Built Distribution
File details
Details for the file langchain_cli-0.0.6.tar.gz
.
File metadata
- Download URL: langchain_cli-0.0.6.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b1c2a072da88b3cce934626318f73a88c9f089ee5f70eac65b0c452cc217504 |
|
MD5 | b556c5122c98520daa05078bd1f6192d |
|
BLAKE2b-256 | b7c009be7fee8e6bdfce15bed899bec56b81ed53fa0dc9e9298aaa227da9a8b0 |
File details
Details for the file langchain_cli-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: langchain_cli-0.0.6-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 | f41d0a6ebb40307aad0b9574da95e682fbd7c98547c38664485e2eaab95cfb45 |
|
MD5 | 388316588a063d540da497abd5921bce |
|
BLAKE2b-256 | 7bd2a4f64142e2bf683136973edea77422dc5fdc63775313d7783f80d2861f71 |