mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-03 03:59:42 +00:00
docs, cli[patch]: document loaders doc template (#22862)
From: https://github.com/langchain-ai/langchain/pull/22290 --------- Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
This commit is contained in:
@@ -153,7 +153,7 @@ def create_doc(
|
||||
component_type: Annotated[
|
||||
str,
|
||||
typer.Option(
|
||||
help=("The type of component. Currently only 'ChatModel' supported."),
|
||||
help=("The type of component. Currently only 'ChatModel', 'DocumentLoader' supported."),
|
||||
),
|
||||
] = "ChatModel",
|
||||
destination_dir: Annotated[
|
||||
@@ -196,7 +196,10 @@ def create_doc(
|
||||
)
|
||||
|
||||
# copy over template from ../integration_template
|
||||
docs_template = Path(__file__).parents[1] / "integration_template/docs/chat.ipynb"
|
||||
if component_type == "ChatModel":
|
||||
docs_template = Path(__file__).parents[1] / "integration_template/docs/chat.ipynb"
|
||||
elif component_type == "DocumentLoader":
|
||||
docs_template = Path(__file__).parents[1] / "integration_template/docs/document_loaders.ipynb"
|
||||
shutil.copy(docs_template, destination_path)
|
||||
|
||||
# replacements in file
|
||||
|
Reference in New Issue
Block a user