mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-08 04:25:46 +00:00
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.
This commit is contained in:
parent
815bfa1913
commit
facfd42768
@ -76,6 +76,13 @@ def _enrich_package(p: dict) -> dict | None:
|
|||||||
)
|
)
|
||||||
raise ValueError(msg)
|
raise ValueError(msg)
|
||||||
|
|
||||||
|
if p["type"] in ("B", "C"):
|
||||||
|
p["package_url"] = (
|
||||||
|
f"https://python.langchain.com/api_reference/{p['name_short'].replace('-', '_')}/"
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
p["package_url"] = f"https://pypi.org/project/{p['name']}/"
|
||||||
|
|
||||||
return p
|
return p
|
||||||
|
|
||||||
|
|
||||||
@ -94,7 +101,7 @@ def package_row(p: dict) -> str:
|
|||||||
link = p["provider_page"]
|
link = p["provider_page"]
|
||||||
title = p["name_title"]
|
title = p["name_title"]
|
||||||
provider = f"[{title}]({link})" if link else title
|
provider = f"[{title}]({link})" if link else title
|
||||||
return f"| {provider} | [{p['name']}](https://python.langchain.com/api_reference/{p['name_short'].replace('-', '_')}/) |  |  | {js} |"
|
return f"| {provider} | [{p['name']}]({p['package_url']}) |  |  | {js} |"
|
||||||
|
|
||||||
|
|
||||||
def table() -> str:
|
def table() -> str:
|
||||||
|
Loading…
Reference in New Issue
Block a user