mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-04 12:18:24 +00:00
Confirm sys.path includes current dir for app serve (#12851)
- Make sure sys.path is set properly for langchain app serve - bump
This commit is contained in:
parent
1bc35f61cb
commit
7db49d3842
@ -6,7 +6,7 @@ from typing_extensions import Annotated
|
|||||||
from langchain_cli.namespaces import app as app_namespace
|
from langchain_cli.namespaces import app as app_namespace
|
||||||
from langchain_cli.namespaces import template as template_namespace
|
from langchain_cli.namespaces import template as template_namespace
|
||||||
|
|
||||||
__version__ = "0.0.14"
|
__version__ = "0.0.15"
|
||||||
|
|
||||||
app = typer.Typer(no_args_is_help=True, add_completion=False)
|
app = typer.Typer(no_args_is_help=True, add_completion=False)
|
||||||
app.add_typer(
|
app.add_typer(
|
||||||
|
@ -4,6 +4,7 @@ Manage LangChain apps
|
|||||||
|
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Dict, List, Optional, Tuple
|
from typing import Dict, List, Optional, Tuple
|
||||||
|
|
||||||
@ -219,6 +220,9 @@ def serve(
|
|||||||
Starts the LangServe app.
|
Starts the LangServe app.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# add current dir as first entry of path
|
||||||
|
sys.path.append(str(Path.cwd()))
|
||||||
|
|
||||||
app_str = app if app is not None else "app.server:app"
|
app_str = app if app is not None else "app.server:app"
|
||||||
host_str = host if host is not None else "127.0.0.1"
|
host_str = host if host is not None else "127.0.0.1"
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "langchain-cli"
|
name = "langchain-cli"
|
||||||
version = "0.0.14"
|
version = "0.0.15"
|
||||||
description = "CLI for interacting with LangChain"
|
description = "CLI for interacting with LangChain"
|
||||||
authors = ["Erick Friis <erick@langchain.dev>"]
|
authors = ["Erick Friis <erick@langchain.dev>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
Loading…
Reference in New Issue
Block a user