From ddddaeae74ab454657307df31d49bbf37f7e9b05 Mon Sep 17 00:00:00 2001 From: raghotham Date: Sat, 24 May 2025 23:23:07 -0700 Subject: [PATCH] Update conf.py --- docs/source/conf.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 43e8dbdd5..6e59dbdfb 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -22,7 +22,11 @@ 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" - version_tag = json.loads(requests.get(pypi_url).text)["info"]["version"] + 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