mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-02 17:54:23 +00:00
docs: Update chat model providers include package information (#20336)
Include package information
This commit is contained in:
parent
56fe4ab382
commit
de938a4451
@ -20,12 +20,13 @@ CHAT_MODEL_FEAT_TABLE_CORRECTION = {
|
|||||||
"ChatMLflowAIGateway": {"_agenerate": False},
|
"ChatMLflowAIGateway": {"_agenerate": False},
|
||||||
"PromptLayerChatOpenAI": {"_stream": False, "_astream": False},
|
"PromptLayerChatOpenAI": {"_stream": False, "_astream": False},
|
||||||
"ChatKonko": {"_astream": False, "_agenerate": False},
|
"ChatKonko": {"_astream": False, "_agenerate": False},
|
||||||
"ChatOpenAI": {"tool_calling": True},
|
"ChatAnthropic": {"tool_calling": True, "package": "langchain-anthropic"},
|
||||||
"ChatAnthropic": {"tool_calling": True},
|
"ChatMistralAI": {"tool_calling": True, "package": "langchain-mistralai"},
|
||||||
"ChatMistralAI": {"tool_calling": True},
|
"ChatFireworks": {"tool_calling": True, "package": "langchain-fireworks"},
|
||||||
"ChatVertexAI": {"tool_calling": True},
|
"ChatOpenAI": {"tool_calling": True, "package": "langchain-openai"},
|
||||||
"ChatFireworks": {"tool_calling": True},
|
"ChatVertexAI": {"tool_calling": True, "package": "langchain-google-vertexai"},
|
||||||
"ChatGroq": {"tool_calling": True},
|
"ChatGroq": {"tool_calling": "partial", "package": "langchain-groq"},
|
||||||
|
"ChatCohere": {"tool_calling": "partial", "package": "langchain-cohere"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -65,6 +66,7 @@ All ChatModels implement the Runnable interface, which comes with default implem
|
|||||||
|
|
||||||
Each ChatModel integration can optionally provide native implementations to truly enable async or streaming.
|
Each ChatModel integration can optionally provide native implementations to truly enable async or streaming.
|
||||||
The table shows, for each integration, which features have been implemented with native support.
|
The table shows, for each integration, which features have been implemented with native support.
|
||||||
|
Yellow circles (🟡) indicates partial support - for example, if the model supports tool calling but not tool messages for agents.
|
||||||
|
|
||||||
{table}
|
{table}
|
||||||
|
|
||||||
@ -144,7 +146,14 @@ def get_chat_model_table() -> str:
|
|||||||
for k, v in {**feat_table, **CHAT_MODEL_FEAT_TABLE_CORRECTION}.items()
|
for k, v in {**feat_table, **CHAT_MODEL_FEAT_TABLE_CORRECTION}.items()
|
||||||
if k not in CHAT_MODEL_IGNORE
|
if k not in CHAT_MODEL_IGNORE
|
||||||
}
|
}
|
||||||
header = ["model", "_agenerate", "_stream", "_astream", "tool_calling"]
|
header = [
|
||||||
|
"model",
|
||||||
|
"_agenerate",
|
||||||
|
"_stream",
|
||||||
|
"_astream",
|
||||||
|
"tool_calling",
|
||||||
|
"package",
|
||||||
|
]
|
||||||
title = [
|
title = [
|
||||||
"Model",
|
"Model",
|
||||||
"Invoke",
|
"Invoke",
|
||||||
@ -152,10 +161,25 @@ def get_chat_model_table() -> str:
|
|||||||
"Stream",
|
"Stream",
|
||||||
"Async stream",
|
"Async stream",
|
||||||
"Tool calling",
|
"Tool calling",
|
||||||
|
"Python Package",
|
||||||
]
|
]
|
||||||
rows = [title, [":-"] + [":-:"] * (len(title) - 1)]
|
rows = [title, [":-"] + [":-:"] * (len(title) - 1)]
|
||||||
for llm, feats in sorted(final_feats.items()):
|
for llm, feats in sorted(final_feats.items()):
|
||||||
rows += [[llm, "✅"] + ["✅" if feats.get(h) else "❌" for h in header[1:]]]
|
# Fields are in the order of the header
|
||||||
|
row = [llm, "✅"]
|
||||||
|
for h in header[1:]:
|
||||||
|
value = feats.get(h)
|
||||||
|
index = header.index(h)
|
||||||
|
if h == "package":
|
||||||
|
row.append(value or "langchain-community")
|
||||||
|
else:
|
||||||
|
if value == "partial":
|
||||||
|
row.append("🟡")
|
||||||
|
elif value is True:
|
||||||
|
row.append("✅")
|
||||||
|
else:
|
||||||
|
row.append("❌")
|
||||||
|
rows.append(row)
|
||||||
return "\n".join(["|".join(row) for row in rows])
|
return "\n".join(["|".join(row) for row in rows])
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user