mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-13 14:50:00 +00:00
cli fix (#12380)
This commit is contained in:
parent
237026c060
commit
03e79e62c2
@ -3,7 +3,7 @@ Manage LangServe application projects.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import typer
|
import typer
|
||||||
from typing import Optional, List, Tuple, Dict
|
from typing import Optional, List
|
||||||
from typing_extensions import Annotated
|
from typing_extensions import Annotated
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import shutil
|
import shutil
|
||||||
@ -12,13 +12,11 @@ from langchain_cli.utils.git import (
|
|||||||
copy_repo,
|
copy_repo,
|
||||||
update_repo,
|
update_repo,
|
||||||
parse_dependency_string,
|
parse_dependency_string,
|
||||||
DependencySource,
|
|
||||||
)
|
)
|
||||||
from langchain_cli.utils.packages import get_package_root
|
from langchain_cli.utils.packages import get_package_root
|
||||||
from langchain_cli.utils.events import create_events
|
from langchain_cli.utils.events import create_events
|
||||||
from langserve.packages import list_packages, get_langserve_export
|
from langserve.packages import list_packages, get_langserve_export
|
||||||
import tomli
|
import tomli
|
||||||
from collections import defaultdict
|
|
||||||
|
|
||||||
REPO_DIR = Path(typer.get_app_dir("langchain")) / "git_repos"
|
REPO_DIR = Path(typer.get_app_dir("langchain")) / "git_repos"
|
||||||
|
|
||||||
@ -99,7 +97,6 @@ def add(
|
|||||||
if dependencies is None:
|
if dependencies is None:
|
||||||
dependencies = []
|
dependencies = []
|
||||||
|
|
||||||
method = ""
|
|
||||||
# cannot have both repo and dependencies
|
# cannot have both repo and dependencies
|
||||||
if len(repo) != 0:
|
if len(repo) != 0:
|
||||||
if len(dependencies) != 0:
|
if len(dependencies) != 0:
|
||||||
|
@ -69,7 +69,7 @@ def parse_dependency_string(package_string: str) -> DependencySource:
|
|||||||
# it's a default git repo dependency
|
# it's a default git repo dependency
|
||||||
subdirectory = str(Path(DEFAULT_GIT_SUBDIRECTORY) / package_string)
|
subdirectory = str(Path(DEFAULT_GIT_SUBDIRECTORY) / package_string)
|
||||||
return DependencySource(
|
return DependencySource(
|
||||||
git=gitstring, ref=DEFAULT_GIT_REF, subdirectory=subdirectory
|
git=DEFAULT_GIT_REPO, ref=DEFAULT_GIT_REF, subdirectory=subdirectory
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "langchain-cli"
|
name = "langchain-cli"
|
||||||
version = "0.0.4"
|
version = "0.0.5"
|
||||||
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"
|
||||||
@ -27,6 +27,7 @@ pytest-watch = "^4.2.0"
|
|||||||
[tool.poe.tasks]
|
[tool.poe.tasks]
|
||||||
test = "poetry run pytest"
|
test = "poetry run pytest"
|
||||||
watch = "poetry run ptw"
|
watch = "poetry run ptw"
|
||||||
|
lint = "poetry run ruff ."
|
||||||
|
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
|
Loading…
Reference in New Issue
Block a user