mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-05 22:53:30 +00:00
CLI: Readme update (#11404)
Consolidating to a single README for now, will be easier to maintain we can differentiate between poetry and pip later. Does not seem critical. --------- Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
parent
fde19c8667
commit
70be04a816
@ -1,46 +0,0 @@
|
|||||||
# `____project_name`
|
|
||||||
|
|
||||||
<!--- This is a LangChain project bootstrapped by [LangChain CLI](https://github.com/langchain-ai/langchain). --->
|
|
||||||
|
|
||||||
## Customise
|
|
||||||
|
|
||||||
To customise this project, edit the following files:
|
|
||||||
|
|
||||||
- `____project_name_identifier/chain.py` contains an example chain, which you can edit to suit your needs.
|
|
||||||
- `____project_name_identifier/server.py` contains a FastAPI app that serves that chain using `langserve`. You can edit this to add more endpoints or customise your server.
|
|
||||||
- `tests/test_chain.py` contains tests for the chain. You can edit this to add more tests.
|
|
||||||
- `pyproject.toml` contains the project metadata, including the project name, version, and dependencies. You can edit this to add more dependencies or customise your project metadata.
|
|
||||||
|
|
||||||
## Install dependencies
|
|
||||||
|
|
||||||
```bash
|
|
||||||
poetry install
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
To run the project locally, run
|
|
||||||
|
|
||||||
```
|
|
||||||
make start
|
|
||||||
```
|
|
||||||
|
|
||||||
This will launch a webserver on port 8000.
|
|
||||||
|
|
||||||
## Deploy
|
|
||||||
|
|
||||||
To deploy the project, first build the docker image:
|
|
||||||
|
|
||||||
```
|
|
||||||
docker build . -t ____project_name_identifier:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
Then run the image:
|
|
||||||
|
|
||||||
```
|
|
||||||
docker run -p 8000:8000 ____project_name_identifier:latest
|
|
||||||
```
|
|
||||||
|
|
||||||
## Contributing
|
|
||||||
|
|
||||||
For information on how to set up your dev environment and contribute, see [here](.github/CONTRIBUTING.md).
|
|
@ -1,18 +1,56 @@
|
|||||||
# `____project_name`
|
# ____project_name
|
||||||
|
|
||||||
<!--- This is a LangChain project bootstrapped by [LangChain CLI](https://github.com/langchain-ai/langchain). --->
|
<!--- This is a LangChain project bootstrapped by [LangChain CLI](https://github.com/langchain-ai/langchain). --->
|
||||||
|
|
||||||
## Run locally
|
## Customise
|
||||||
|
|
||||||
To install run:
|
To customise this project, edit the following files:
|
||||||
|
|
||||||
|
- `____project_name_identifier/chain.py` contains an example chain, which you can edit to suit your needs.
|
||||||
|
- `____project_name_identifier/server.py` contains a FastAPI app that serves that chain using `langserve`. You can edit this to add more endpoints or customise your server.
|
||||||
|
- `tests/test_chain.py` contains tests for the chain. You can edit this to add more tests.
|
||||||
|
- `pyproject.toml` contains the project metadata, including the project name, version, and dependencies. You can edit this to add more dependencies or customise your project metadata.
|
||||||
|
|
||||||
|
## Install dependencies
|
||||||
|
|
||||||
|
If using poetry:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
poetry
|
poetry install
|
||||||
|
```
|
||||||
|
|
||||||
|
If using vanilla pip:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install .
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
<!--- Add detailed documentation on how to use this package. --->
|
To run the project locally, run
|
||||||
|
|
||||||
|
```
|
||||||
|
make start
|
||||||
|
```
|
||||||
|
|
||||||
|
This will launch a webserver on port 8001.
|
||||||
|
|
||||||
|
## Deploy
|
||||||
|
|
||||||
|
To deploy the project, first build the docker image:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker build . -t ____project_name_identifier:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
Then run the image:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -p 8001:8001 -e PORT=8001 ____project_name_identifier:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
Don't forget to add any needed environment variables!
|
||||||
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user