Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli fix #12380

Merged
merged 3 commits into from
Oct 26, 2023
Merged

cli fix #12380

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions libs/cli/langchain_cli/namespaces/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

import typer
from typing import Optional, List, Tuple, Dict
from typing import Optional, List
from typing_extensions import Annotated
from pathlib import Path
import shutil
Expand All @@ -12,13 +12,11 @@
copy_repo,
update_repo,
parse_dependency_string,
DependencySource,
)
from langchain_cli.utils.packages import get_package_root
from langchain_cli.utils.events import create_events
from langserve.packages import list_packages, get_langserve_export
import tomli
from collections import defaultdict

REPO_DIR = Path(typer.get_app_dir("langchain")) / "git_repos"

Expand Down Expand Up @@ -99,7 +97,6 @@ def add(
if dependencies is None:
dependencies = []

method = ""
# cannot have both repo and dependencies
if len(repo) != 0:
if len(dependencies) != 0:
Expand Down
2 changes: 1 addition & 1 deletion libs/cli/langchain_cli/utils/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def parse_dependency_string(package_string: str) -> DependencySource:
# it's a default git repo dependency
subdirectory = str(Path(DEFAULT_GIT_SUBDIRECTORY) / package_string)
return DependencySource(
git=gitstring, ref=DEFAULT_GIT_REF, subdirectory=subdirectory
git=DEFAULT_GIT_REPO, ref=DEFAULT_GIT_REF, subdirectory=subdirectory
)


Expand Down
3 changes: 2 additions & 1 deletion libs/cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "langchain-cli"
version = "0.0.4"
version = "0.0.5"
description = "CLI for interacting with LangChain"
authors = ["Erick Friis <erick@langchain.dev>"]
readme = "README.md"
Expand All @@ -27,6 +27,7 @@ pytest-watch = "^4.2.0"
[tool.poe.tasks]
test = "poetry run pytest"
watch = "poetry run ptw"
lint = "poetry run ruff ."


[build-system]
Expand Down