docs: poetry publish (#28275)

This commit is contained in:
Erick Friis
2024-11-21 19:10:03 -08:00
committed by GitHub
parent f173b72e35
commit 49254cde70
9 changed files with 438 additions and 22 deletions

View File

@@ -140,6 +140,8 @@ TEMPLATE_MAP: dict[str, str] = {
"Retriever": "retrievers.ipynb",
}
_component_types_str = ", ".join(f"`{k}`" for k in TEMPLATE_MAP.keys())
@integration_cli.command()
def create_doc(
@@ -170,8 +172,7 @@ def create_doc(
str,
typer.Option(
help=(
"The type of component. Currently only 'ChatModel', "
"'DocumentLoader', 'VectorStore' supported."
f"The type of component. Currently supported: {_component_types_str}."
),
),
] = "ChatModel",
@@ -220,8 +221,7 @@ def create_doc(
docs_template = template_dir / TEMPLATE_MAP[component_type]
else:
raise ValueError(
f"Unrecognized {component_type=}. Expected one of 'ChatModel', "
f"'DocumentLoader', 'Tool'."
f"Unrecognized {component_type=}. Expected one of {_component_types_str}."
)
shutil.copy(docs_template, destination_path)