mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-01 19:12:42 +00:00
cli[minor]: Add first version of migrate (#20902)
Adds a first version of the migrate script.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import importlib
|
||||
from typing import Optional
|
||||
|
||||
import typer
|
||||
@@ -22,6 +23,13 @@ app.add_typer(
|
||||
)
|
||||
|
||||
|
||||
# If libcst is installed, add the migrate namespace
|
||||
if importlib.util.find_spec("libcst"):
|
||||
from langchain_cli.namespaces.migrate import main as migrate_namespace
|
||||
|
||||
app.add_typer(migrate_namespace.app, name="migrate", help=migrate_namespace.__doc__)
|
||||
|
||||
|
||||
def version_callback(show_version: bool) -> None:
|
||||
if show_version:
|
||||
typer.echo(f"langchain-cli {__version__}")
|
||||
|
Reference in New Issue
Block a user