diff --git a/website/mint.json b/website/mint.json index 542eba96f6..aef59ca8d3 100644 --- a/website/mint.json +++ b/website/mint.json @@ -246,9 +246,14 @@ "/notebooks/autogen_uniformed_api_calling", "/notebooks/gpt_assistant_agent_function_call", "/notebooks/lats_search", - "/docs/notebooks/tool-use", + "/docs/tutorial/tool-use", "/notebooks/JSON_mode_example", - "/notebooks/agentchat_RetrieveChat" + "/notebooks/agentchat_RetrieveChat", + "/docs/topics/non-openai-models/cloud-anthropic", + "/docs/topics/non-openai-models/cloud-bedrock", + "/docs/topics/prompting-and-reasoning/react", + "/docs/tutorial/human-in-the-loop", + "/docs/topics/task_decomposition" ] } ] diff --git a/website/process_notebooks.py b/website/process_notebooks.py index ba45051a1b..58a8c462d5 100755 --- a/website/process_notebooks.py +++ b/website/process_notebooks.py @@ -12,6 +12,7 @@ import concurrent.futures import json import os +import re import shutil import signal import subprocess @@ -368,6 +369,9 @@ def post_process_mdx(rendered_mdx: Path, source_notebooks: Path, front_matter: D front_matter = yaml.safe_load(content[4:front_matter_end]) content = content[front_matter_end + 3 :] + # Clean heading IDs using regex - matches from # to the end of ID block + content = re.sub(r"(#{1,6}[^{]+){#[^}]+}", r"\1", content) + # Each intermediate path needs to be resolved for this to work reliably repo_root = Path(__file__).parent.resolve().parent.resolve() repo_relative_notebook = source_notebooks.resolve().relative_to(repo_root) @@ -538,7 +542,16 @@ def update_navigation_with_notebooks(website_dir: Path) -> None: # Create notebooks entry notebooks_entry = { "group": "Notebooks", - "pages": ["/notebooks/Notebooks"] + [item["link"] for item in notebooks_metadata], + "pages": ["/notebooks/Notebooks"] + + [ + Path(item["source"]) + .resolve() + .with_suffix("") + .as_posix() + .replace("/website/", "/") + .replace("/notebook/", "/notebooks/") + for item in notebooks_metadata + ], } # Replace the pages list in Examples group with our standard pages plus notebooks diff --git a/website/snippets/data/NotebooksMetadata.mdx b/website/snippets/data/NotebooksMetadata.mdx index db614a1817..8ebf3b8576 100644 --- a/website/snippets/data/NotebooksMetadata.mdx +++ b/website/snippets/data/NotebooksMetadata.mdx @@ -897,5 +897,49 @@ export const notebooksMetadata = [ "RAG" ], "source": "/notebook/agentchat_RetrieveChat.ipynb" + }, + { + "title": "Anthropic Claude", + "link": "/notebooks/cloud-anthropic", + "description": "Define and load a custom model", + "image": null, + "tags": [ + "custom model" + ], + "source": "/website/docs/topics/non-openai-models/cloud-anthropic.ipynb" + }, + { + "title": "Amazon Bedrock", + "link": "/notebooks/cloud-bedrock", + "description": "Define and load a custom model", + "image": null, + "tags": [ + "custom model" + ], + "source": "/website/docs/topics/non-openai-models/cloud-bedrock.ipynb" + }, + { + "title": "ReAct", + "link": "/notebooks/react", + "description": "", + "image": null, + "tags": [], + "source": "/website/docs/topics/prompting-and-reasoning/react.ipynb" + }, + { + "title": "Allowing Human Feedback in Agents", + "link": "/notebooks/human-in-the-loop", + "description": "", + "image": null, + "tags": [], + "source": "/website/docs/tutorial/human-in-the-loop.ipynb" + }, + { + "title": "Task Decomposition", + "link": "/notebooks/task_decomposition", + "description": "", + "image": null, + "tags": [], + "source": "/website/docs/topics/task_decomposition.ipynb" } ];