mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-17 10:28:11 +00:00
Some checks failed
SqlStore Integration Tests / test-postgres (3.13) (push) Failing after 2s
Integration Tests / discover-tests (push) Successful in 2s
Vector IO Integration Tests / test-matrix (3.12, inline::milvus) (push) Failing after 17s
Integration Auth Tests / test-matrix (oauth2_token) (push) Failing after 19s
Python Package Build Test / build (3.12) (push) Failing after 14s
Test Llama Stack Build / build-custom-container-distribution (push) Failing after 14s
Vector IO Integration Tests / test-matrix (3.12, remote::pgvector) (push) Failing after 15s
SqlStore Integration Tests / test-postgres (3.12) (push) Failing after 20s
Unit Tests / unit-tests (3.13) (push) Failing after 15s
Test Llama Stack Build / generate-matrix (push) Successful in 16s
Vector IO Integration Tests / test-matrix (3.13, remote::pgvector) (push) Failing after 20s
Test External Providers / test-external-providers (venv) (push) Failing after 17s
Update ReadTheDocs / update-readthedocs (push) Failing after 15s
Test Llama Stack Build / build-single-provider (push) Failing after 21s
Test Llama Stack Build / build-ubi9-container-distribution (push) Failing after 18s
Unit Tests / unit-tests (3.12) (push) Failing after 22s
Vector IO Integration Tests / test-matrix (3.12, inline::sqlite-vec) (push) Failing after 25s
Vector IO Integration Tests / test-matrix (3.13, remote::chromadb) (push) Failing after 23s
Vector IO Integration Tests / test-matrix (3.13, inline::milvus) (push) Failing after 26s
Vector IO Integration Tests / test-matrix (3.13, inline::sqlite-vec) (push) Failing after 19s
Vector IO Integration Tests / test-matrix (3.12, inline::faiss) (push) Failing after 28s
Vector IO Integration Tests / test-matrix (3.13, inline::faiss) (push) Failing after 21s
Vector IO Integration Tests / test-matrix (3.12, remote::chromadb) (push) Failing after 23s
Python Package Build Test / build (3.13) (push) Failing after 44s
Test Llama Stack Build / build (push) Failing after 25s
Integration Tests / test-matrix (push) Failing after 46s
Pre-commit / pre-commit (push) Successful in 2m24s
# What does this PR do? Reorganizes the Llama stack webpage into more concise index pages, introduce more of a workflow, and reduce repetition of content. New nav structure so far based on #2637 Further discussions in https://github.com/meta-llama/llama-stack/discussions/2585 **Preview:**  You can also build a full local preview locally **Feedback** Looking for feedback on page titles and general feedback on the new structure **Follow up documentation** I plan on reducing some sections and standardizing some terminology in a follow up PR. More discussions on that in https://github.com/meta-llama/llama-stack/discussions/2585
154 lines
4.7 KiB
Python
154 lines
4.7 KiB
Python
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the terms described in the LICENSE file in
|
|
# the root directory of this source tree.
|
|
|
|
# Configuration file for the Sphinx documentation builder.
|
|
#
|
|
# For the full list of built-in configuration values, see the documentation:
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
|
|
# -- Project information -----------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
|
|
import json
|
|
from datetime import datetime
|
|
from pathlib import Path
|
|
|
|
import requests
|
|
from docutils import nodes
|
|
|
|
# Read version from pyproject.toml
|
|
with Path(__file__).parent.parent.parent.joinpath("pyproject.toml").open("rb") as f:
|
|
pypi_url = "https://pypi.org/pypi/llama-stack/json"
|
|
headers = {
|
|
'User-Agent': 'pip/23.0.1 (python 3.11)', # Mimic pip's user agent
|
|
'Accept': 'application/json'
|
|
}
|
|
version_tag = json.loads(requests.get(pypi_url, headers=headers).text)["info"]["version"]
|
|
print(f"{version_tag=}")
|
|
|
|
# generate the full link including text and url here
|
|
llama_stack_version_url = (
|
|
f"https://github.com/meta-llama/llama-stack/releases/tag/v{version_tag}"
|
|
)
|
|
llama_stack_version_link = f"<a href='{llama_stack_version_url}'>release notes</a>"
|
|
|
|
project = "llama-stack"
|
|
copyright = f"{datetime.now().year}, Meta"
|
|
author = "Meta"
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
|
|
extensions = [
|
|
"myst_parser",
|
|
"sphinx_copybutton",
|
|
"sphinx_design",
|
|
"sphinx_rtd_theme",
|
|
"sphinx_rtd_dark_mode",
|
|
"sphinx_tabs.tabs",
|
|
"sphinxcontrib.redoc",
|
|
"sphinxcontrib.mermaid",
|
|
"sphinxcontrib.video",
|
|
"sphinx_reredirects"
|
|
]
|
|
|
|
redirects = {
|
|
"providers/post_training/index": "../../advanced_apis/post_training/index.html",
|
|
"providers/eval/index": "../../advanced_apis/eval/index.html",
|
|
"providers/scoring/index": "../../advanced_apis/scoring/index.html",
|
|
"playground/index": "../../building_applications/playground/index.html",
|
|
"openai/index": "../../providers/index.html#openai-api-compatibility",
|
|
"introduction/index": "../concepts/index.html#llama-stack-architecture"
|
|
}
|
|
|
|
myst_enable_extensions = ["colon_fence"]
|
|
|
|
html_theme = "sphinx_rtd_theme"
|
|
html_use_relative_paths = True
|
|
templates_path = ["_templates"]
|
|
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
|
|
myst_enable_extensions = [
|
|
"amsmath",
|
|
"attrs_inline",
|
|
"attrs_block",
|
|
"colon_fence",
|
|
"deflist",
|
|
"dollarmath",
|
|
"fieldlist",
|
|
"html_admonition",
|
|
"html_image",
|
|
# "linkify",
|
|
"replacements",
|
|
"smartquotes",
|
|
"strikethrough",
|
|
"substitution",
|
|
"tasklist",
|
|
]
|
|
|
|
myst_substitutions = {
|
|
"docker_hub": "https://hub.docker.com/repository/docker/llamastack",
|
|
"llama_stack_version": version_tag,
|
|
"llama_stack_version_link": llama_stack_version_link,
|
|
}
|
|
|
|
suppress_warnings = ["myst.header"]
|
|
|
|
# Copy button settings
|
|
copybutton_prompt_text = "$ " # for bash prompts
|
|
copybutton_prompt_is_regexp = True
|
|
copybutton_remove_prompts = True
|
|
copybutton_line_continuation_character = "\\"
|
|
|
|
# Source suffix
|
|
source_suffix = {
|
|
".rst": "restructuredtext",
|
|
".md": "markdown",
|
|
}
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
|
|
# html_theme = "alabaster"
|
|
html_theme_options = {
|
|
"canonical_url": "https://github.com/meta-llama/llama-stack",
|
|
"collapse_navigation": False,
|
|
# "style_nav_header_background": "#c3c9d4",
|
|
'display_version': True,
|
|
'version_selector': True,
|
|
}
|
|
|
|
default_dark_mode = False
|
|
|
|
html_static_path = ["../_static"]
|
|
# html_logo = "../_static/llama-stack-logo.png"
|
|
# html_style = "../_static/css/my_theme.css"
|
|
|
|
|
|
def setup(app):
|
|
app.add_css_file("css/my_theme.css")
|
|
app.add_js_file("js/detect_theme.js")
|
|
|
|
def dockerhub_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
|
|
url = f"https://hub.docker.com/r/llamastack/{text}"
|
|
node = nodes.reference(rawtext, text, refuri=url, **options)
|
|
return [node], []
|
|
|
|
def repopath_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
|
|
parts = text.split("::")
|
|
if len(parts) == 2:
|
|
link_text = parts[0]
|
|
url_path = parts[1]
|
|
else:
|
|
link_text = text
|
|
url_path = text
|
|
|
|
url = f"https://github.com/meta-llama/llama-stack/tree/main/{url_path}"
|
|
node = nodes.reference(rawtext, link_text, refuri=url, **options)
|
|
return [node], []
|
|
|
|
app.add_role("dockerhub", dockerhub_role)
|
|
app.add_role("repopath", repopath_role)
|