docs: chat model pkg links (#24845)

This commit is contained in:
Bagatur 2024-07-30 16:26:06 -07:00 committed by GitHub
parent 1f5444817a
commit 943126c5fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -279,7 +279,11 @@ def get_chat_model_table() -> str:
for h in header[1:]:
value = feats.get(h)
if h == "package":
row.append(value or "langchain-community")
value = value or "langchain-community"
name = value[len("langchain-") :]
link = f"https://api.python.langchain.com/en/latest/{name}_api_reference.html"
value = f"[{value}]({link})"
row.append(value)
else:
if value == "partial":
row.append("🟡")