MCPcopy
hub / github.com/langchain-ai/langchain / get_langserve_export

Function get_langserve_export

libs/cli/langchain_cli/utils/packages.py:36–45  ·  view source on GitHub ↗
(filepath: Path)

Source from the content-addressed store, hash-verified

34
35
36def get_langserve_export(filepath: Path) -> LangServeExport:
37 with open(filepath) as f:
38 data: Dict[str, Any] = load(f)
39 try:
40 module = data["tool"]["langserve"]["export_module"]
41 attr = data["tool"]["langserve"]["export_attr"]
42 package_name = data["tool"]["poetry"]["name"]
43 except KeyError as e:
44 raise KeyError("Invalid LangServe PyProject.toml") from e
45 return LangServeExport(module=module, attr=attr, package_name=package_name)

Callers 5

serveFunction · 0.90
create_demo_serverFunction · 0.90
addFunction · 0.90
removeFunction · 0.90
serveFunction · 0.90

Calls 2

LangServeExportClass · 0.85
loadFunction · 0.50

Tested by

no test coverage detected