fix(docs): local API reference documentation build (#32271)

ensure all relevant packages are correctly processed - cli wasn't
included, also fix ValueError
This commit is contained in:
Mason Daugherty
2025-07-28 00:50:20 -04:00
committed by GitHub
parent ed682ae62d
commit 12c0e9b7d8
9 changed files with 19 additions and 37 deletions

View File

@@ -67,12 +67,11 @@ def serve(
] = None,
) -> None:
"""Start the LangServe app, whether it's a template or an app."""
# see if is a template
try:
project_dir = get_package_root()
pyproject = project_dir / "pyproject.toml"
get_langserve_export(pyproject)
except KeyError:
except (KeyError, FileNotFoundError):
# not a template
app_namespace.serve(port=port, host=host)
else: