docs: standardize azure openai page (#23642)

part of #22296
This commit is contained in:
Bagatur
2024-06-28 15:15:41 -07:00
committed by GitHub
parent e8d77002ea
commit 381aedcc61
7 changed files with 230 additions and 91 deletions

View File

@@ -153,7 +153,9 @@ def create_doc(
component_type: Annotated[
str,
typer.Option(
help=("The type of component. Currently only 'ChatModel', 'DocumentLoader' supported."),
help=(
"The type of component. Currently only 'ChatModel', 'DocumentLoader' supported."
),
),
] = "ChatModel",
destination_dir: Annotated[
@@ -197,9 +199,14 @@ def create_doc(
# copy over template from ../integration_template
if component_type == "ChatModel":
docs_template = Path(__file__).parents[1] / "integration_template/docs/chat.ipynb"
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"
docs_template = (
Path(__file__).parents[1]
/ "integration_template/docs/document_loaders.ipynb"
)
shutil.copy(docs_template, destination_path)
# replacements in file