build: make langchain-serve optional

This commit is contained in:
Deepankar Mahapatro 2023-05-16 15:15:52 +05:30
commit 2eec5fb3a7
4 changed files with 4 additions and 4 deletions

2
poetry.lock generated
View file

@ -5769,7 +5769,7 @@ cffi = {version = ">=1.11", markers = "platform_python_implementation == \"PyPy\
cffi = ["cffi (>=1.11)"]
[extras]
production = []
production = ["langchain-serve"]
[metadata]
lock-version = "2.0"

View file

@ -51,7 +51,7 @@ websockets = "^11.0.2"
tiktoken = "^0.3.3"
wikipedia = "^1.4.0"
gptcache = "^0.1.23"
langchain-serve = {version = "^0.0.31", optional = true}
langchain-serve = { version = "^0.0.31", optional = true }
[tool.poetry.group.dev.dependencies]
black = "^23.1.0"

View file

@ -80,7 +80,7 @@ def jcloud():
import click
try:
from lcserve.__main__ import serve_on_jcloud
from lcserve.__main__ import serve_on_jcloud # type: ignore
except ImportError:
click.secho(
"🚨 Please install langchain-serve to deploy Langflow server on Jina AI Cloud using `pip install langchain-serve`",

View file

@ -11,4 +11,4 @@ app.mount(
"/",
StaticFiles(directory=static_files_dir, html=True),
name="static",
)
)