Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update Llama Deploy documentation build #16403

Merged
merged 32 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
84144f5
repare
masci Oct 7, 2024
0cef049
adjust import script and navigation
masci Oct 7, 2024
37bcc56
remove debug comment
masci Oct 7, 2024
9dfa8e3
document what empty folders are for
masci Oct 7, 2024
e4e378e
remove BUILD file
masci Oct 7, 2024
930051b
use poetry to install dependencies
masci Oct 7, 2024
a60521f
fix nav bar
masci Oct 8, 2024
282ef87
fix RTD build script
masci Oct 8, 2024
008699f
fix mkdocstrings dep
masci Oct 8, 2024
5cb2641
update the contribution guide
masci Oct 8, 2024
834f908
fix plugin defs
masci Oct 8, 2024
7093ae0
revert
masci Oct 8, 2024
c2b310d
make the script poetry-runnable
masci Oct 8, 2024
af38af2
remove duplicated readme for clarity
masci Oct 8, 2024
500b878
add it back
masci Oct 8, 2024
8c33a3b
add prepare-for-build script
masci Oct 8, 2024
d65ebce
mention the configuration step in the contributing docs
masci Oct 8, 2024
b3bb49f
revert debug branch
masci Oct 8, 2024
b418329
fix README and update the version in the docs
masci Oct 8, 2024
2b3009d
convert github admonitions into mkdocs
masci Oct 8, 2024
01c3e50
docs: update BGEM3Demo.ipynb (#16395)
eltociear Oct 7, 2024
c773571
Fix ZyteWebReader article parsing (#16401)
rakeshmehta0308 Oct 7, 2024
4235f64
don't include tool calls if there was none (#16408)
logan-markewich Oct 7, 2024
f332cd8
Fix ChatMessage serialization with janky openai types (#16410)
logan-markewich Oct 7, 2024
a716d1c
Add ObjectBox Vector Store Integration (#16314)
shubham0204 Oct 7, 2024
b0564af
feat: add Docling reader and node parser (#16406)
vagenas Oct 8, 2024
9055d08
MultiModal.HuggingFaceMultiModal: fix errors and README, add stream_c…
g-hano Oct 8, 2024
efb4fd3
fix prepare_for_build
logan-markewich Oct 8, 2024
9eac899
fix prepare_for_build
logan-markewich Oct 8, 2024
bc10ddd
more fixing
logan-markewich Oct 8, 2024
12aa918
last fix
logan-markewich Oct 8, 2024
591ad2e
Merge branch 'main' into massi/llama-deploy-docs
logan-markewich Oct 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ build:
tools:
python: "3.12"
jobs:
post_create_environment:
- python -m pip install poetry
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install
pre_build:
- python docs/merge_llama_deploy_docs.py

mkdocs:
configuration: docs/mkdocs.yml

python:
install:
- requirements: docs/requirements.txt
9 changes: 0 additions & 9 deletions docs/BUILD

This file was deleted.

2 changes: 2 additions & 0 deletions docs/docs/api_reference/llama_deploy/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Documentation content will be pulled from https://github.com/run-llama/llama_deploy,
make sure to run `python docs/merge_llama_deploy_docs.py` before building docs.
2 changes: 2 additions & 0 deletions docs/docs/module_guides/llama_deploy/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Documentation content will be pulled from https://github.com/run-llama/llama_deploy,
make sure to run `python docs/merge_llama_deploy_docs.py` before building docs.
84 changes: 5 additions & 79 deletions docs/merge_llama_deploy_docs.py
Original file line number Diff line number Diff line change
@@ -1,97 +1,23 @@
import os
import yaml

# clone the llama_deploy repo
if not os.path.exists("llama_deploy"):
os.system("git clone https://github.com/run-llama/llama_deploy.git")

os.system(
"git clone -b massi/docs https://github.com/run-llama/llama_deploy.git"
)
masci marked this conversation as resolved.
Show resolved Hide resolved
print("Cloned llama_deploy")
else:
os.system("git -C llama_deploy pull")

print("Updated llama_deploy")

# copy the llama_deploy/docs/docs/api_reference/llama_deploy to the current docs/api_reference
os.system(
"cp -r llama_deploy/docs/docs/api_reference/llama_deploy ./docs/docs/api_reference/"
)
print("Copied in latest llama-deploy reference")

# copy the module guides
os.system(
"cp -r llama_deploy/docs/docs/module_guides/workflow/deployment.md ./docs/docs/module_guides/workflow/deployment.md"
"cp -r llama_deploy/docs/docs/*.md ./docs/docs/module_guides/llama_deploy/"
)

print("Copied in latest llama-deploy docs")

# open current mkdocs.yml
with open("./docs/mkdocs.yml") as f:
mkdocs = yaml.safe_load(f)

# open llama-deploy mkdocs.yml
with open("./llama_deploy/docs/mkdocs.yml") as f:
llama_deploy_mkdocs = yaml.safe_load(f)

llama_docs_api_reference_idx = 0
for idx, item in enumerate(llama_deploy_mkdocs["nav"]):
if isinstance(item, dict) and "API Reference" in item:
llama_docs_api_reference_idx = idx
break

# Add links to llama-deploy api reference to nav
for nav_idx, item in enumerate(mkdocs["nav"]):
if isinstance(item, dict) and "API Reference" in item:
api_reference = item["API Reference"]
for api_ref_idx, api_ref in enumerate(api_reference):
if isinstance(api_ref, dict) and "LLMs" in api_ref:
# Find the Llama Deploy API reference in llama_deploy_mkdocs
break

api_reference.insert(
api_ref_idx,
{
"Llama Deploy": llama_deploy_mkdocs["nav"][
llama_docs_api_reference_idx
]["API Reference"]
},
)
break

print("Merged Llama Deploy API Reference")

# Add search paths from llama-deploy mkdocs.yml
mkdocs_plugins_idx = 0
for idx, item in enumerate(mkdocs["plugins"]):
if isinstance(item, dict) and "mkdocstrings" in item:
mkdocs_plugins_idx = idx
break

mkdocs["plugins"][mkdocs_plugins_idx]["mkdocstrings"]["handlers"]["python"][
"paths"
].append("../llama_deploy")

print("Updated search paths")

# Add the deployment guide to the nav
for value in mkdocs["nav"]:
if isinstance(value, dict) and "Component Guides" in value:
for item in value["Component Guides"]:
if isinstance(item, dict) and "Querying" in item:
for section in item["Querying"]:
if isinstance(section, dict) and "Workflows" in section:
if isinstance(section["Workflows"], str):
section["Workflows"] = [
section["Workflows"],
"./module_guides/workflow/deployment.md",
]
else:
section["Workflows"].append(
"./module_guides/workflow/deployment.md"
)

print("Updated nav")

# Save the updated mkdocs.yml
with open("./docs/mkdocs.yml", "w") as f:
yaml.dump(mkdocs, f, sort_keys=False)

print("Updated mkdocs.yml saved")
masci marked this conversation as resolved.
Show resolved Hide resolved
149 changes: 76 additions & 73 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@ nav:
- ./module_guides/observability/index.md
- ./module_guides/observability/instrumentation.md
- Settings: ./module_guides/supporting_modules/settings.md
- Llama Deploy: ./module_guides/llama_deploy
- Advanced Topics:
- ./optimizing/production_rag.md
- ./optimizing/basic_strategies/basic_strategies.md
Expand Down Expand Up @@ -945,6 +946,80 @@ nav:
- ./api_reference/instrumentation/index.md
- ./api_reference/instrumentation/span_handlers.md
- ./api_reference/instrumentation/span_types.md
- Llama Datasets:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section was reordered to match alphabetically

- ./api_reference/llama_dataset/index.md
- Llama Deploy:
- ./api_reference/llama_deploy
masci marked this conversation as resolved.
Show resolved Hide resolved
- Llama Packs:
- ./api_reference/packs/agent_search_retriever.md
- ./api_reference/packs/agents_coa.md
- ./api_reference/packs/agents_lats.md
- ./api_reference/packs/agents_llm_compiler.md
- ./api_reference/packs/amazon_product_extraction.md
- ./api_reference/packs/arize_phoenix_query_engine.md
- ./api_reference/packs/auto_merging_retriever.md
- ./api_reference/packs/chroma_autoretrieval.md
- ./api_reference/packs/code_hierarchy.md
- ./api_reference/packs/cogniswitch_agent.md
- ./api_reference/packs/cohere_citation_chat.md
- ./api_reference/packs/corrective_rag.md
- ./api_reference/packs/deeplake_deepmemory_retriever.md
- ./api_reference/packs/deeplake_multimodal_retrieval.md
- ./api_reference/packs/dense_x_retrieval.md
- ./api_reference/packs/diff_private_simple_dataset.md
- ./api_reference/packs/docugami_kg_rag.md
- ./api_reference/packs/evaluator_benchmarker.md
- ./api_reference/packs/finchat.md
- ./api_reference/packs/fusion_retriever.md
- ./api_reference/packs/fuzzy_citation.md
- ./api_reference/packs/gmail_openai_agent.md
- ./api_reference/packs/gradio_agent_chat.md
- ./api_reference/packs/gradio_react_agent_chatbot.md
- ./api_reference/packs/index.md
- ./api_reference/packs/infer_retrieve_rerank.md
- ./api_reference/packs/koda_retriever.md
- ./api_reference/packs/llama_dataset_metadata.md
- ./api_reference/packs/llama_guard_moderator.md
- ./api_reference/packs/llava_completion.md
- ./api_reference/packs/longrag.md
- ./api_reference/packs/mixture_of_agents.md
- ./api_reference/packs/multi_document_agents.md
- ./api_reference/packs/multi_tenancy_rag.md
- ./api_reference/packs/multidoc_autoretrieval.md
- ./api_reference/packs/nebulagraph_query_engine.md
- ./api_reference/packs/neo4j_query_engine.md
- ./api_reference/packs/node_parser_semantic_chunking.md
- ./api_reference/packs/ollama_query_engine.md
- ./api_reference/packs/panel_chatbot.md
- ./api_reference/packs/query_understanding_agent.md
- ./api_reference/packs/raft_dataset.md
- ./api_reference/packs/rag_cli_local.md
- ./api_reference/packs/rag_evaluator.md
- ./api_reference/packs/rag_fusion_query_pipeline.md
- ./api_reference/packs/ragatouille_retriever.md
- ./api_reference/packs/raptor.md
- ./api_reference/packs/recursive_retriever.md
- ./api_reference/packs/redis_ingestion_pipeline.md
- ./api_reference/packs/resume_screener.md
- ./api_reference/packs/retry_engine_weaviate.md
- ./api_reference/packs/searchain.md
- ./api_reference/packs/secgpt.md
- ./api_reference/packs/self_discover.md
- ./api_reference/packs/self_rag.md
- ./api_reference/packs/sentence_window_retriever.md
- ./api_reference/packs/snowflake_query_engine.md
- ./api_reference/packs/stock_market_data_query_engine.md
- ./api_reference/packs/streamlit_chatbot.md
- ./api_reference/packs/sub_question_weaviate.md
- ./api_reference/packs/subdoc_summary.md
- ./api_reference/packs/tables.md
- ./api_reference/packs/timescale_vector_autoretrieval.md
- ./api_reference/packs/trulens_eval_packs.md
- ./api_reference/packs/vanna.md
- ./api_reference/packs/vectara_rag.md
- ./api_reference/packs/voyage_query_engine.md
- ./api_reference/packs/zenguard.md
- ./api_reference/packs/zephyr_query_engine.md
- LLMs:
- ./api_reference/llms/OptimumIntelLLM.md
- ./api_reference/llms/ai21.md
Expand Down Expand Up @@ -1025,78 +1100,6 @@ nav:
- ./api_reference/llms/xinference.md
- ./api_reference/llms/yi.md
- ./api_reference/llms/you.md
- Llama Datasets:
- ./api_reference/llama_dataset/index.md
- Llama Packs:
- ./api_reference/packs/agent_search_retriever.md
- ./api_reference/packs/agents_coa.md
- ./api_reference/packs/agents_lats.md
- ./api_reference/packs/agents_llm_compiler.md
- ./api_reference/packs/amazon_product_extraction.md
- ./api_reference/packs/arize_phoenix_query_engine.md
- ./api_reference/packs/auto_merging_retriever.md
- ./api_reference/packs/chroma_autoretrieval.md
- ./api_reference/packs/code_hierarchy.md
- ./api_reference/packs/cogniswitch_agent.md
- ./api_reference/packs/cohere_citation_chat.md
- ./api_reference/packs/corrective_rag.md
- ./api_reference/packs/deeplake_deepmemory_retriever.md
- ./api_reference/packs/deeplake_multimodal_retrieval.md
- ./api_reference/packs/dense_x_retrieval.md
- ./api_reference/packs/diff_private_simple_dataset.md
- ./api_reference/packs/docugami_kg_rag.md
- ./api_reference/packs/evaluator_benchmarker.md
- ./api_reference/packs/finchat.md
- ./api_reference/packs/fusion_retriever.md
- ./api_reference/packs/fuzzy_citation.md
- ./api_reference/packs/gmail_openai_agent.md
- ./api_reference/packs/gradio_agent_chat.md
- ./api_reference/packs/gradio_react_agent_chatbot.md
- ./api_reference/packs/index.md
- ./api_reference/packs/infer_retrieve_rerank.md
- ./api_reference/packs/koda_retriever.md
- ./api_reference/packs/llama_dataset_metadata.md
- ./api_reference/packs/llama_guard_moderator.md
- ./api_reference/packs/llava_completion.md
- ./api_reference/packs/longrag.md
- ./api_reference/packs/mixture_of_agents.md
- ./api_reference/packs/multi_document_agents.md
- ./api_reference/packs/multi_tenancy_rag.md
- ./api_reference/packs/multidoc_autoretrieval.md
- ./api_reference/packs/nebulagraph_query_engine.md
- ./api_reference/packs/neo4j_query_engine.md
- ./api_reference/packs/node_parser_semantic_chunking.md
- ./api_reference/packs/ollama_query_engine.md
- ./api_reference/packs/panel_chatbot.md
- ./api_reference/packs/query_understanding_agent.md
- ./api_reference/packs/raft_dataset.md
- ./api_reference/packs/rag_cli_local.md
- ./api_reference/packs/rag_evaluator.md
- ./api_reference/packs/rag_fusion_query_pipeline.md
- ./api_reference/packs/ragatouille_retriever.md
- ./api_reference/packs/raptor.md
- ./api_reference/packs/recursive_retriever.md
- ./api_reference/packs/redis_ingestion_pipeline.md
- ./api_reference/packs/resume_screener.md
- ./api_reference/packs/retry_engine_weaviate.md
- ./api_reference/packs/searchain.md
- ./api_reference/packs/secgpt.md
- ./api_reference/packs/self_discover.md
- ./api_reference/packs/self_rag.md
- ./api_reference/packs/sentence_window_retriever.md
- ./api_reference/packs/snowflake_query_engine.md
- ./api_reference/packs/stock_market_data_query_engine.md
- ./api_reference/packs/streamlit_chatbot.md
- ./api_reference/packs/sub_question_weaviate.md
- ./api_reference/packs/subdoc_summary.md
- ./api_reference/packs/tables.md
- ./api_reference/packs/timescale_vector_autoretrieval.md
- ./api_reference/packs/trulens_eval_packs.md
- ./api_reference/packs/vanna.md
- ./api_reference/packs/vectara_rag.md
- ./api_reference/packs/voyage_query_engine.md
- ./api_reference/packs/zenguard.md
- ./api_reference/packs/zephyr_query_engine.md
- Memory:
- ./api_reference/memory/chat_memory_buffer.md
- ./api_reference/memory/index.md
Expand Down Expand Up @@ -1623,7 +1626,7 @@ plugins:
- search
- include_dir_to_nav
- mkdocs-jupyter:
execute: false
execute: false
- mkdocstrings:
handlers:
python:
Expand Down
Loading
Loading