mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-09 13:00:34 +00:00
docs: provider list from packages.yml (#28677)
This commit is contained in:
parent
a4713cab47
commit
0af5ad8262
@ -1,4 +1,4 @@
|
|||||||
# Robocorp
|
# Sema4 (fka Robocorp)
|
||||||
|
|
||||||
>[Robocorp](https://robocorp.com/) helps build and operate Python workers that run seamlessly anywhere at any scale
|
>[Robocorp](https://robocorp.com/) helps build and operate Python workers that run seamlessly anywhere at any scale
|
||||||
|
|
||||||
|
@ -2,38 +2,31 @@ import glob
|
|||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
PARTNER_DIR = Path(__file__).parents[2] / "libs" / "partners"
|
import yaml
|
||||||
DOCS_DIR = Path(__file__).parents[1]
|
|
||||||
|
|
||||||
PLATFORMS = {
|
DOCS_DIR = Path(__file__).parents[1]
|
||||||
path.split("/")[-1][:-4]
|
PACKAGE_YML = Path(__file__).parents[2] / "libs" / "packages.yml"
|
||||||
for path in glob.glob(
|
IGNORE_PACKGAGES = {"langchain-experimental"}
|
||||||
str(DOCS_DIR) + "/docs/integrations/providers/*.mdx", recursive=True
|
|
||||||
|
# for now, only include packages that are in the langchain-ai org
|
||||||
|
# because we don't have a policy for inclusion in this table yet,
|
||||||
|
# and including all packages will make the list too long
|
||||||
|
with open(PACKAGE_YML) as f:
|
||||||
|
data = yaml.safe_load(f)
|
||||||
|
EXTERNAL_PACKAGES = set(
|
||||||
|
p["name"][10:]
|
||||||
|
for p in data["packages"]
|
||||||
|
if p["repo"].startswith("langchain-ai/")
|
||||||
|
and p["repo"] != "langchain-ai/langchain"
|
||||||
|
and p["name"] not in IGNORE_PACKGAGES
|
||||||
|
)
|
||||||
|
IN_REPO_PACKAGES = set(
|
||||||
|
p["name"][10:]
|
||||||
|
for p in data["packages"]
|
||||||
|
if p["repo"] == "langchain-ai/langchain"
|
||||||
|
and p["path"].startswith("libs/partners")
|
||||||
|
and p["name"] not in IGNORE_PACKGAGES
|
||||||
)
|
)
|
||||||
}
|
|
||||||
EXTERNAL_PACKAGES = {
|
|
||||||
"astradb",
|
|
||||||
"aws",
|
|
||||||
"box",
|
|
||||||
"cohere",
|
|
||||||
"databricks",
|
|
||||||
"elasticsearch",
|
|
||||||
"google-community",
|
|
||||||
"google-genai",
|
|
||||||
"google-vertexai",
|
|
||||||
"nvidia-ai-endpoints",
|
|
||||||
"postgres",
|
|
||||||
"redis",
|
|
||||||
"weaviate",
|
|
||||||
"upstage",
|
|
||||||
"mongodb",
|
|
||||||
"azure-dynamic-sessions",
|
|
||||||
"ibm",
|
|
||||||
"unstructured",
|
|
||||||
"milvus",
|
|
||||||
"together",
|
|
||||||
"ai21",
|
|
||||||
}
|
|
||||||
|
|
||||||
JS_PACKAGES = {
|
JS_PACKAGES = {
|
||||||
"google-gauth",
|
"google-gauth",
|
||||||
@ -67,11 +60,6 @@ JS_PACKAGES = {
|
|||||||
"ibm",
|
"ibm",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
IN_REPO_PACKAGES = {
|
|
||||||
path.split("/")[-2]
|
|
||||||
for path in glob.glob(str(PARTNER_DIR) + "/**/pyproject.toml", recursive=True)
|
|
||||||
}
|
|
||||||
ALL_PACKAGES = IN_REPO_PACKAGES.union(EXTERNAL_PACKAGES)
|
ALL_PACKAGES = IN_REPO_PACKAGES.union(EXTERNAL_PACKAGES)
|
||||||
|
|
||||||
CUSTOM_NAME = {
|
CUSTOM_NAME = {
|
||||||
@ -81,14 +69,17 @@ CUSTOM_NAME = {
|
|||||||
}
|
}
|
||||||
CUSTOM_PROVIDER_PAGES = {
|
CUSTOM_PROVIDER_PAGES = {
|
||||||
"azure-dynamic-sessions": "/docs/integrations/providers/microsoft/",
|
"azure-dynamic-sessions": "/docs/integrations/providers/microsoft/",
|
||||||
|
"prompty": "/docs/integrations/providers/microsoft/",
|
||||||
|
"sqlserver": "/docs/integrations/providers/microsoft/",
|
||||||
"google-community": "/docs/integrations/providers/google/",
|
"google-community": "/docs/integrations/providers/google/",
|
||||||
"google-genai": "/docs/integrations/providers/google/",
|
"google-genai": "/docs/integrations/providers/google/",
|
||||||
"google-vertexai": "/docs/integrations/providers/google/",
|
"google-vertexai": "/docs/integrations/providers/google/",
|
||||||
"nvidia-ai-endpoints": "/docs/integrations/providers/nvidia/",
|
"nvidia-ai-endpoints": "/docs/integrations/providers/nvidia/",
|
||||||
"exa": "/docs/integrations/providers/exa_search/",
|
"exa": "/docs/integrations/providers/exa_search/",
|
||||||
"mongodb": "/docs/integrations/providers/mongodb_atlas/",
|
"mongodb": "/docs/integrations/providers/mongodb_atlas/",
|
||||||
|
"sema4": "/docs/integrations/providers/robocorp/",
|
||||||
|
"postgres": "/docs/integrations/providers/pgvector/",
|
||||||
}
|
}
|
||||||
PLATFORM_PAGES = {name: f"/docs/integrations/providers/{name}/" for name in PLATFORMS}
|
|
||||||
PROVIDER_PAGES = {
|
PROVIDER_PAGES = {
|
||||||
name: f"/docs/integrations/providers/{name}/"
|
name: f"/docs/integrations/providers/{name}/"
|
||||||
for name in ALL_PACKAGES
|
for name in ALL_PACKAGES
|
||||||
@ -96,10 +87,8 @@ PROVIDER_PAGES = {
|
|||||||
}
|
}
|
||||||
PROVIDER_PAGES = {
|
PROVIDER_PAGES = {
|
||||||
**PROVIDER_PAGES,
|
**PROVIDER_PAGES,
|
||||||
**PLATFORM_PAGES,
|
|
||||||
**CUSTOM_PROVIDER_PAGES,
|
**CUSTOM_PROVIDER_PAGES,
|
||||||
}
|
}
|
||||||
print(PROVIDER_PAGES)
|
|
||||||
|
|
||||||
|
|
||||||
def package_row(name: str) -> str:
|
def package_row(name: str) -> str:
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
-e ../libs/community
|
-e ../libs/community
|
||||||
-e ../libs/text-splitters
|
-e ../libs/text-splitters
|
||||||
langgraph
|
langgraph
|
||||||
|
pyyaml
|
||||||
langchain-cohere
|
langchain-cohere
|
||||||
urllib3==1.26.19
|
urllib3==1.26.19
|
||||||
nbconvert==7.16.4
|
nbconvert==7.16.4
|
||||||
|
Loading…
Reference in New Issue
Block a user