Spaces:
Runtime error
Runtime error
Commit ·
4ee3c77
1
Parent(s): f2ef468
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,91 +1,91 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: Chatbot AI
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo: purple
|
| 6 |
-
sdk: docker
|
| 7 |
-
pinned: false
|
| 8 |
-
license: mit
|
| 9 |
-
app_port: 8080
|
| 10 |
-
---
|
| 11 |
-
|
| 12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
-
# app
|
| 14 |
-
|
| 15 |
-
## Installation
|
| 16 |
-
|
| 17 |
-
Install the LangChain CLI if you haven't yet
|
| 18 |
-
|
| 19 |
-
```bash
|
| 20 |
-
pip install -U langchain-cli
|
| 21 |
-
```
|
| 22 |
-
|
| 23 |
-
## Adding packages
|
| 24 |
-
|
| 25 |
-
```bash
|
| 26 |
-
# adding packages from
|
| 27 |
-
# https://github.com/langchain-ai/langchain/tree/master/templates
|
| 28 |
-
langchain app add $PROJECT_NAME
|
| 29 |
-
|
| 30 |
-
# adding custom GitHub repo packages
|
| 31 |
-
langchain app add --repo $OWNER/$REPO
|
| 32 |
-
# or with whole git string (supports other git providers):
|
| 33 |
-
# langchain app add git+https://github.com/hwchase17/chain-of-verification
|
| 34 |
-
|
| 35 |
-
# with a custom api mount point (defaults to `/{package_name}`)
|
| 36 |
-
langchain app add $PROJECT_NAME --api_path=/my/custom/path/rag
|
| 37 |
-
```
|
| 38 |
-
|
| 39 |
-
Note: you remove packages by their api path
|
| 40 |
-
|
| 41 |
-
```bash
|
| 42 |
-
langchain app remove my/custom/path/rag
|
| 43 |
-
```
|
| 44 |
-
|
| 45 |
-
## Setup LangSmith (Optional)
|
| 46 |
-
LangSmith will help us trace, monitor and debug LangChain applications.
|
| 47 |
-
LangSmith is currently in private beta, you can sign up [here](https://smith.langchain.com/).
|
| 48 |
-
If you don't have access, you can skip this section
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
```shell
|
| 52 |
-
export LANGCHAIN_TRACING_V2=true
|
| 53 |
-
export LANGCHAIN_API_KEY=<your-api-key>
|
| 54 |
-
export LANGCHAIN_PROJECT=<your-project> # if not specified, defaults to "default"
|
| 55 |
-
```
|
| 56 |
-
|
| 57 |
-
## Launch LangServe
|
| 58 |
-
|
| 59 |
-
```bash
|
| 60 |
-
langchain serve
|
| 61 |
-
```
|
| 62 |
-
|
| 63 |
-
## Running in Docker
|
| 64 |
-
|
| 65 |
-
This project folder includes a Dockerfile that allows you to easily build and host your LangServe app.
|
| 66 |
-
|
| 67 |
-
### Building the Image
|
| 68 |
-
|
| 69 |
-
To build the image, you simply:
|
| 70 |
-
|
| 71 |
-
```shell
|
| 72 |
-
docker build . -t my-langserve-app
|
| 73 |
-
```
|
| 74 |
-
|
| 75 |
-
If you tag your image with something other than `my-langserve-app`,
|
| 76 |
-
note it for use in the next step.
|
| 77 |
-
|
| 78 |
-
### Running the Image Locally
|
| 79 |
-
|
| 80 |
-
To run the image, you'll need to include any environment variables
|
| 81 |
-
necessary for your application.
|
| 82 |
-
|
| 83 |
-
In the below example, we inject the `OPENAI_API_KEY` environment
|
| 84 |
-
variable with the value set in my local environment
|
| 85 |
-
(`$OPENAI_API_KEY`)
|
| 86 |
-
|
| 87 |
-
We also expose port 8080 with the `-p 8080:8080` option.
|
| 88 |
-
|
| 89 |
-
```shell
|
| 90 |
-
docker run -e OPENAI_API_KEY=$OPENAI_API_KEY -p 8080:8080 my-langserve-app
|
| 91 |
-
```
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Chatbot AI
|
| 3 |
+
emoji: 💬
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: docker
|
| 7 |
+
pinned: false
|
| 8 |
+
license: mit
|
| 9 |
+
app_port: 8080
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
+
# app
|
| 14 |
+
|
| 15 |
+
## Installation
|
| 16 |
+
|
| 17 |
+
Install the LangChain CLI if you haven't yet
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
pip install -U langchain-cli
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
## Adding packages
|
| 24 |
+
|
| 25 |
+
```bash
|
| 26 |
+
# adding packages from
|
| 27 |
+
# https://github.com/langchain-ai/langchain/tree/master/templates
|
| 28 |
+
langchain app add $PROJECT_NAME
|
| 29 |
+
|
| 30 |
+
# adding custom GitHub repo packages
|
| 31 |
+
langchain app add --repo $OWNER/$REPO
|
| 32 |
+
# or with whole git string (supports other git providers):
|
| 33 |
+
# langchain app add git+https://github.com/hwchase17/chain-of-verification
|
| 34 |
+
|
| 35 |
+
# with a custom api mount point (defaults to `/{package_name}`)
|
| 36 |
+
langchain app add $PROJECT_NAME --api_path=/my/custom/path/rag
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
Note: you remove packages by their api path
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
langchain app remove my/custom/path/rag
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
## Setup LangSmith (Optional)
|
| 46 |
+
LangSmith will help us trace, monitor and debug LangChain applications.
|
| 47 |
+
LangSmith is currently in private beta, you can sign up [here](https://smith.langchain.com/).
|
| 48 |
+
If you don't have access, you can skip this section
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
```shell
|
| 52 |
+
export LANGCHAIN_TRACING_V2=true
|
| 53 |
+
export LANGCHAIN_API_KEY=<your-api-key>
|
| 54 |
+
export LANGCHAIN_PROJECT=<your-project> # if not specified, defaults to "default"
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
## Launch LangServe
|
| 58 |
+
|
| 59 |
+
```bash
|
| 60 |
+
langchain serve
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
## Running in Docker
|
| 64 |
+
|
| 65 |
+
This project folder includes a Dockerfile that allows you to easily build and host your LangServe app.
|
| 66 |
+
|
| 67 |
+
### Building the Image
|
| 68 |
+
|
| 69 |
+
To build the image, you simply:
|
| 70 |
+
|
| 71 |
+
```shell
|
| 72 |
+
docker build . -t my-langserve-app
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
If you tag your image with something other than `my-langserve-app`,
|
| 76 |
+
note it for use in the next step.
|
| 77 |
+
|
| 78 |
+
### Running the Image Locally
|
| 79 |
+
|
| 80 |
+
To run the image, you'll need to include any environment variables
|
| 81 |
+
necessary for your application.
|
| 82 |
+
|
| 83 |
+
In the below example, we inject the `OPENAI_API_KEY` environment
|
| 84 |
+
variable with the value set in my local environment
|
| 85 |
+
(`$OPENAI_API_KEY`)
|
| 86 |
+
|
| 87 |
+
We also expose port 8080 with the `-p 8080:8080` option.
|
| 88 |
+
|
| 89 |
+
```shell
|
| 90 |
+
docker run -e OPENAI_API_KEY=$OPENAI_API_KEY -p 8080:8080 my-langserve-app
|
| 91 |
+
```
|