Skip to content

Commit facfd42

Browse files
authored
docs[patch]: fix links in partner package table (#29112)
Integrations in external repos are not built into [API ref](https://python.langchain.com/api_reference/), so currently [the table](https://python.langchain.com/docs/integrations/providers/#integration-packages) includes broken links. Here we update the links for this type of package to point to PyPi.
1 parent 815bfa1 commit facfd42

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

docs/scripts/partner_pkg_table.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ def _enrich_package(p: dict) -> dict | None:
7676
)
7777
raise ValueError(msg)
7878

79+
if p["type"] in ("B", "C"):
80+
p["package_url"] = (
81+
f"https://python.langchain.com/api_reference/{p['name_short'].replace('-', '_')}/"
82+
)
83+
else:
84+
p["package_url"] = f"https://pypi.org/project/{p['name']}/"
85+
7986
return p
8087

8188

@@ -94,7 +101,7 @@ def package_row(p: dict) -> str:
94101
link = p["provider_page"]
95102
title = p["name_title"]
96103
provider = f"[{title}]({link})" if link else title
97-
return f"| {provider} | [{p['name']}](https://python.langchain.com/api_reference/{p['name_short'].replace('-', '_')}/) | ![PyPI - Downloads](https://img.shields.io/pypi/dm/{p['name']}?style=flat-square&label=%20&color=blue) | ![PyPI - Version](https://img.shields.io/pypi/v/{p['name']}?style=flat-square&label=%20&color=orange) | {js} |"
104+
return f"| {provider} | [{p['name']}]({p['package_url']}) | ![PyPI - Downloads](https://img.shields.io/pypi/dm/{p['name']}?style=flat-square&label=%20&color=blue) | ![PyPI - Version](https://img.shields.io/pypi/v/{p['name']}?style=flat-square&label=%20&color=orange) | {js} |"
98105

99106

100107
def table() -> str:

0 commit comments

Comments
 (0)