From 3d70bff700753a49ba25f088167c773174924ded Mon Sep 17 00:00:00 2001 From: koch3092 Date: Wed, 15 Jan 2025 19:50:08 +0800 Subject: [PATCH 1/2] fix: fix document link mapping issue to maintain access to old links --- docs/conf.py | 29 +++++++++++++++++++++++++++++ poetry.lock | 25 ++++++++++++++++++++++++- pyproject.toml | 1 + 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index d36abe6ea7..f523970de2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,6 +44,7 @@ 'sphinx.ext.napoleon', 'myst_parser', 'nbsphinx', + 'sphinxext.rediraffe', ] templates_path = ['_templates'] @@ -88,3 +89,31 @@ } """ + +rediraffe_redirects = { + "cookbooks/create_your_first_agent": "cookbooks/basic_concepts/create_your_first_agent", + "cookbooks/create_your_first_agents_society": "cookbooks/basic_concepts/create_your_first_agents_society", + "cookbooks/embodied_agents": "cookbooks/advanced_features/embodied_agents", + "cookbooks/critic_agents_and_tree_search": "cookbooks/advanced_features/critic_agents_and_tree_search", + "cookbooks/agents_society": "cookbooks/basic_concepts/create_your_first_agents_society", + "cookbooks/model_speed_comparison": "cookbooks/model_training/model_speed_comparison", + "cookbooks/agents_message": "cookbooks/basic_concepts/agents_message", + "cookbooks/agents_with_tools": "cookbooks/advanced_features/agents_with_tools", + "cookbooks/agents_with_memory": "cookbooks/advanced_features/agents_with_memory", + "cookbooks/agents_with_rag": "cookbooks/advanced_features/agents_with_rag", + "cookbooks/agents_prompting": "cookbooks/basic_concepts/agents_prompting", + "cookbooks/task_generation": "cookbooks/model_training/task_generation", + "cookbooks/knowledge_graph": "cookbooks/advanced_features/agents_with_graph_rag", + "cookbooks/roleplaying_scraper": "cookbooks/applications/roleplaying_scraper", + "cookbooks/video_analysis": "cookbooks/data_processing/video_analysis", + "cookbooks/agents_tracking": "cookbooks/advanced_features/agents_tracking", + "cookbooks/workforce_judge_committee": "cookbooks/multi_agent_society/workforce_judge_committee", + "cookbooks/ingest_data_from_websites_with_Firecrawl": "cookbooks/data_processing/ingest_data_from_websites_with_Firecrawl", + "cookbooks/sft_data_generation_and_unsloth_finetuning": "cookbooks/model_training/sft_data_generation_and_unsloth_finetuning_Qwen2_5_7B", + "cookbooks/customer_service_Discord_bot_with_agentic_RAG": "cookbooks/applications/customer_service_Discord_bot_using_SambaNova_with_agentic_RAG", + "cookbooks/agent_with_chunkr_for_pdf_parsing": "cookbooks/data_processing/agent_with_chunkr_for_pdf_parsing", + "cookbooks/data_gen_with_real_function_calls_and_hermes_format": "cookbooks/model_training/data_gen_with_real_function_calls_and_hermes_format", + "cookbooks/cot_data_gen_upload_to_huggingface": "cookbooks/model_training/cot_data_gen_upload_to_huggingface", + "cookbooks/cot_data_gen_sft_qwen_unsolth_upload_huggingface": "cookbooks/model_training/cot_data_gen_sft_qwen_unsolth_upload_huggingface", + "cookbooks/customer_service_Discord_bot_using_local_model_with_agentic_RAG": "cookbooks/applications/customer_service_Discord_bot_using_local_model_with_agentic_RAG", +} \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index ec56ebc0e1..d41fdb0975 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4722,6 +4722,7 @@ python-versions = ">=3.7" files = [ {file = "milvus_lite-2.4.11-py3-none-macosx_10_9_x86_64.whl", hash = "sha256:9e563ae0dca1b41bfd76b90f06b2bcc474460fe4eba142c9bab18d2747ff843b"}, {file = "milvus_lite-2.4.11-py3-none-macosx_11_0_arm64.whl", hash = "sha256:d21472bd24eb327542817829ce7cb51878318e6173c4d62353c77421aecf98d6"}, + {file = "milvus_lite-2.4.11-py3-none-manylinux2014_aarch64.whl", hash = "sha256:8e6ef27f7f84976f9fd0047b675ede746db2e0cc581c44a916ac9e71e0cef05d"}, {file = "milvus_lite-2.4.11-py3-none-manylinux2014_x86_64.whl", hash = "sha256:551f56b49fcfbb330b658b4a3c56ed29ba9b692ec201edd1f2dade7f5e39957d"}, ] @@ -7650,6 +7651,7 @@ description = "Pure-Python implementation of ASN.1 types and DER/BER/CER codecs optional = true python-versions = ">=3.8" files = [ + {file = "pyasn1-0.6.1-py3-none-any.whl", hash = "sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629"}, {file = "pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034"}, ] @@ -7660,6 +7662,7 @@ description = "A collection of ASN.1-based protocols modules" optional = true python-versions = ">=3.8" files = [ + {file = "pyasn1_modules-0.4.1-py3-none-any.whl", hash = "sha256:49bfa96b45a292b711e986f222502c1c9a5e1f4e568fc30e2574a6c7d07838fd"}, {file = "pyasn1_modules-0.4.1.tar.gz", hash = "sha256:c28e2dbf9c06ad61c71a075c7e0f9fd0f1b0bb2d2ad4377f240d33ac2ab60a7c"}, ] @@ -8037,6 +8040,7 @@ python-versions = ">=3.9" files = [ {file = "pymupdf-1.25.1-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:793f9f6d51029e97851c711b3f6d9fe912313d95a306fbe8b1866f301d0e2bd3"}, {file = "pymupdf-1.25.1-cp39-abi3-macosx_11_0_arm64.whl", hash = "sha256:15e6f4013ad0a029a2221920f9d2081f56dc43259dabfdf5cad7fbf1cee4b5a7"}, + {file = "pymupdf-1.25.1-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:a39afbd80381f43e30d6eb2ec4613f465f507ac2b76070abdd2da8724f32ef36"}, {file = "pymupdf-1.25.1-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b63f8e9e65b0bda48f9217efd4d2a8c6d7a739dd28baf460c1ae78439b9af489"}, {file = "pymupdf-1.25.1-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:a687bd387589e30abd810a78a23341f57f43fa16a4d8d8c0b870bb6d89607343"}, {file = "pymupdf-1.25.1-cp39-abi3-win32.whl", hash = "sha256:fc7dbc1aa9e298a4c81084e389c9623c26fcaa232c71efaa073af150069e2221"}, @@ -9260,6 +9264,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f66efbc1caa63c088dead1c4170d148eabc9b80d95fb75b6c92ac0aad2437d76"}, {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:22353049ba4181685023b25b5b51a574bce33e7f51c759371a7422dcae5402a6"}, {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:932205970b9f9991b34f55136be327501903f7c66830e9760a8ffb15b07f05cd"}, + {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:a52d48f4e7bf9005e8f0a89209bf9a73f7190ddf0489eee5eb51377385f59f2a"}, {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-win32.whl", hash = "sha256:3eac5a91891ceb88138c113f9db04f3cebdae277f5d44eaa3651a4f573e6a5da"}, {file = "ruamel.yaml.clib-0.2.12-cp310-cp310-win_amd64.whl", hash = "sha256:ab007f2f5a87bd08ab1499bdf96f3d5c6ad4dcfa364884cb4549aa0154b13a28"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-macosx_13_0_arm64.whl", hash = "sha256:4a6679521a58256a90b0d89e03992c15144c5f3858f40d7c18886023d7943db6"}, @@ -9268,6 +9273,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:811ea1594b8a0fb466172c384267a4e5e367298af6b228931f273b111f17ef52"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:cf12567a7b565cbf65d438dec6cfbe2917d3c1bdddfce84a9930b7d35ea59642"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7dd5adc8b930b12c8fc5b99e2d535a09889941aa0d0bd06f4749e9a9397c71d2"}, + {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1492a6051dab8d912fc2adeef0e8c72216b24d57bd896ea607cb90bb0c4981d3"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-win32.whl", hash = "sha256:bd0a08f0bab19093c54e18a14a10b4322e1eacc5217056f3c063bd2f59853ce4"}, {file = "ruamel.yaml.clib-0.2.12-cp311-cp311-win_amd64.whl", hash = "sha256:a274fb2cb086c7a3dea4322ec27f4cb5cc4b6298adb583ab0e211a4682f241eb"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-macosx_14_0_arm64.whl", hash = "sha256:20b0f8dc160ba83b6dcc0e256846e1a02d044e13f7ea74a3d1d56ede4e48c632"}, @@ -9276,6 +9282,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:749c16fcc4a2b09f28843cda5a193e0283e47454b63ec4b81eaa2242f50e4ccd"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:bf165fef1f223beae7333275156ab2022cffe255dcc51c27f066b4370da81e31"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:32621c177bbf782ca5a18ba4d7af0f1082a3f6e517ac2a18b3974d4edf349680"}, + {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:b82a7c94a498853aa0b272fd5bc67f29008da798d4f93a2f9f289feb8426a58d"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-win32.whl", hash = "sha256:e8c4ebfcfd57177b572e2040777b8abc537cdef58a2120e830124946aa9b42c5"}, {file = "ruamel.yaml.clib-0.2.12-cp312-cp312-win_amd64.whl", hash = "sha256:0467c5965282c62203273b838ae77c0d29d7638c8a4e3a1c8bdd3602c10904e4"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-macosx_14_0_arm64.whl", hash = "sha256:4c8c5d82f50bb53986a5e02d1b3092b03622c02c2eb78e29bec33fd9593bae1a"}, @@ -9284,6 +9291,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96777d473c05ee3e5e3c3e999f5d23c6f4ec5b0c38c098b3a5229085f74236c6"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_1_i686.whl", hash = "sha256:3bc2a80e6420ca8b7d3590791e2dfc709c88ab9152c00eeb511c9875ce5778bf"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:e188d2699864c11c36cdfdada94d781fd5d6b0071cd9c427bceb08ad3d7c70e1"}, + {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4f6f3eac23941b32afccc23081e1f50612bdbe4e982012ef4f5797986828cd01"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-win32.whl", hash = "sha256:6442cb36270b3afb1b4951f060eccca1ce49f3d087ca1ca4563a6eb479cb3de6"}, {file = "ruamel.yaml.clib-0.2.12-cp313-cp313-win_amd64.whl", hash = "sha256:e5b8daf27af0b90da7bb903a876477a9e6d7270be6146906b276605997c7e9a3"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-macosx_12_0_arm64.whl", hash = "sha256:fc4b630cd3fa2cf7fce38afa91d7cfe844a9f75d7f0f36393fa98815e911d987"}, @@ -9292,6 +9300,7 @@ files = [ {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e2f1c3765db32be59d18ab3953f43ab62a761327aafc1594a2a1fbe038b8b8a7"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:d85252669dc32f98ebcd5d36768f5d4faeaeaa2d655ac0473be490ecdae3c285"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:e143ada795c341b56de9418c58d028989093ee611aa27ffb9b7f609c00d813ed"}, + {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:2c59aa6170b990d8d2719323e628aaf36f3bfbc1c26279c0eeeb24d05d2d11c7"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-win32.whl", hash = "sha256:beffaed67936fbbeffd10966a4eb53c402fafd3d6833770516bf7314bc6ffa12"}, {file = "ruamel.yaml.clib-0.2.12-cp39-cp39-win_amd64.whl", hash = "sha256:040ae85536960525ea62868b642bdb0c2cc6021c9f9d507810c0c604e66f5a7b"}, {file = "ruamel.yaml.clib-0.2.12.tar.gz", hash = "sha256:6c8fbb13ec503f99a91901ab46e0b07ae7941cd527393187039aec586fdfd36f"}, @@ -10085,6 +10094,20 @@ lint = ["mypy", "ruff (==0.5.5)", "types-docutils"] standalone = ["Sphinx (>=5)"] test = ["pytest"] +[[package]] +name = "sphinxext-rediraffe" +version = "0.2.7" +description = "Sphinx Extension that redirects non-existent pages to working pages." +optional = false +python-versions = ">=3.6" +files = [ + {file = "sphinxext-rediraffe-0.2.7.tar.gz", hash = "sha256:651dcbfae5ffda9ffd534dfb8025f36120e5efb6ea1a33f5420023862b9f725d"}, + {file = "sphinxext_rediraffe-0.2.7-py3-none-any.whl", hash = "sha256:9e430a52d4403847f4ffb3a8dd6dfc34a9fe43525305131f52ed899743a5fd8c"}, +] + +[package.dependencies] +sphinx = ">=2.0" + [[package]] name = "sqlalchemy" version = "2.0.37" @@ -12249,4 +12272,4 @@ web-tools = ["apify_client", "asknews", "dappier", "duckduckgo-search", "firecra [metadata] lock-version = "2.0" python-versions = ">=3.10,<3.13" -content-hash = "6f93227e89d6d00b8a5e5536682913ab83911034baa2709aed88bb70c5a1a8d9" +content-hash = "a1fd6e2729c779ce7e06be0a2ba9d5b97752bc297d8b12492f1b4c94b4466c38" diff --git a/pyproject.toml b/pyproject.toml index d75b423d82..a60579fedb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -400,6 +400,7 @@ sphinx_book_theme = "*" docutils = "<0.20.0" myst-parser = "*" nbsphinx = "*" +sphinxext-rediraffe = "^0.2.7" [tool.ruff] line-length = 79 From 042b1012c9bee3142bd50f9e7543d60a27d405ff Mon Sep 17 00:00:00 2001 From: koch3092 Date: Wed, 15 Jan 2025 20:53:16 +0800 Subject: [PATCH 2/2] style: update code format --- docs/conf.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index f523970de2..621ea1d2c8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -91,29 +91,29 @@ """ rediraffe_redirects = { - "cookbooks/create_your_first_agent": "cookbooks/basic_concepts/create_your_first_agent", - "cookbooks/create_your_first_agents_society": "cookbooks/basic_concepts/create_your_first_agents_society", + "cookbooks/create_your_first_agent": "cookbooks/basic_concepts/create_your_first_agent", # noqa: E501 + "cookbooks/create_your_first_agents_society": "cookbooks/basic_concepts/create_your_first_agents_society", # noqa: E501 "cookbooks/embodied_agents": "cookbooks/advanced_features/embodied_agents", - "cookbooks/critic_agents_and_tree_search": "cookbooks/advanced_features/critic_agents_and_tree_search", - "cookbooks/agents_society": "cookbooks/basic_concepts/create_your_first_agents_society", - "cookbooks/model_speed_comparison": "cookbooks/model_training/model_speed_comparison", + "cookbooks/critic_agents_and_tree_search": "cookbooks/advanced_features/critic_agents_and_tree_search", # noqa: E501 + "cookbooks/agents_society": "cookbooks/basic_concepts/create_your_first_agents_society", # noqa: E501 + "cookbooks/model_speed_comparison": "cookbooks/model_training/model_speed_comparison", # noqa: E501 "cookbooks/agents_message": "cookbooks/basic_concepts/agents_message", - "cookbooks/agents_with_tools": "cookbooks/advanced_features/agents_with_tools", - "cookbooks/agents_with_memory": "cookbooks/advanced_features/agents_with_memory", + "cookbooks/agents_with_tools": "cookbooks/advanced_features/agents_with_tools", # noqa: E501 + "cookbooks/agents_with_memory": "cookbooks/advanced_features/agents_with_memory", # noqa: E501 "cookbooks/agents_with_rag": "cookbooks/advanced_features/agents_with_rag", "cookbooks/agents_prompting": "cookbooks/basic_concepts/agents_prompting", "cookbooks/task_generation": "cookbooks/model_training/task_generation", - "cookbooks/knowledge_graph": "cookbooks/advanced_features/agents_with_graph_rag", - "cookbooks/roleplaying_scraper": "cookbooks/applications/roleplaying_scraper", + "cookbooks/knowledge_graph": "cookbooks/advanced_features/agents_with_graph_rag", # noqa: E501 + "cookbooks/roleplaying_scraper": "cookbooks/applications/roleplaying_scraper", # noqa: E501 "cookbooks/video_analysis": "cookbooks/data_processing/video_analysis", "cookbooks/agents_tracking": "cookbooks/advanced_features/agents_tracking", - "cookbooks/workforce_judge_committee": "cookbooks/multi_agent_society/workforce_judge_committee", - "cookbooks/ingest_data_from_websites_with_Firecrawl": "cookbooks/data_processing/ingest_data_from_websites_with_Firecrawl", - "cookbooks/sft_data_generation_and_unsloth_finetuning": "cookbooks/model_training/sft_data_generation_and_unsloth_finetuning_Qwen2_5_7B", - "cookbooks/customer_service_Discord_bot_with_agentic_RAG": "cookbooks/applications/customer_service_Discord_bot_using_SambaNova_with_agentic_RAG", - "cookbooks/agent_with_chunkr_for_pdf_parsing": "cookbooks/data_processing/agent_with_chunkr_for_pdf_parsing", - "cookbooks/data_gen_with_real_function_calls_and_hermes_format": "cookbooks/model_training/data_gen_with_real_function_calls_and_hermes_format", - "cookbooks/cot_data_gen_upload_to_huggingface": "cookbooks/model_training/cot_data_gen_upload_to_huggingface", - "cookbooks/cot_data_gen_sft_qwen_unsolth_upload_huggingface": "cookbooks/model_training/cot_data_gen_sft_qwen_unsolth_upload_huggingface", - "cookbooks/customer_service_Discord_bot_using_local_model_with_agentic_RAG": "cookbooks/applications/customer_service_Discord_bot_using_local_model_with_agentic_RAG", -} \ No newline at end of file + "cookbooks/workforce_judge_committee": "cookbooks/multi_agent_society/workforce_judge_committee", # noqa: E501 + "cookbooks/ingest_data_from_websites_with_Firecrawl": "cookbooks/data_processing/ingest_data_from_websites_with_Firecrawl", # noqa: E501 + "cookbooks/sft_data_generation_and_unsloth_finetuning": "cookbooks/model_training/sft_data_generation_and_unsloth_finetuning_Qwen2_5_7B", # noqa: E501 + "cookbooks/customer_service_Discord_bot_with_agentic_RAG": "cookbooks/applications/customer_service_Discord_bot_using_SambaNova_with_agentic_RAG", # noqa: E501 + "cookbooks/agent_with_chunkr_for_pdf_parsing": "cookbooks/data_processing/agent_with_chunkr_for_pdf_parsing", # noqa: E501 + "cookbooks/data_gen_with_real_function_calls_and_hermes_format": "cookbooks/model_training/data_gen_with_real_function_calls_and_hermes_format", # noqa: E501 + "cookbooks/cot_data_gen_upload_to_huggingface": "cookbooks/model_training/cot_data_gen_upload_to_huggingface", # noqa: E501 + "cookbooks/cot_data_gen_sft_qwen_unsolth_upload_huggingface": "cookbooks/model_training/cot_data_gen_sft_qwen_unsolth_upload_huggingface", # noqa: E501 + "cookbooks/customer_service_Discord_bot_using_local_model_with_agentic_RAG": "cookbooks/applications/customer_service_Discord_bot_using_local_model_with_agentic_RAG", # noqa: E501 +}