mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-07 20:15:40 +00:00
docs: Update list of chat models tool calling providers (#20330)
Will follow up with a few missing providers
This commit is contained in:
parent
653489a1a9
commit
0e74fb4ec1
@ -15,12 +15,17 @@ LLM_FEAT_TABLE_CORRECTION = {
|
|||||||
"PromptLayerOpenAI": {"batch_generate": False, "batch_agenerate": False},
|
"PromptLayerOpenAI": {"batch_generate": False, "batch_agenerate": False},
|
||||||
}
|
}
|
||||||
CHAT_MODEL_IGNORE = ("FakeListChatModel", "HumanInputChatModel")
|
CHAT_MODEL_IGNORE = ("FakeListChatModel", "HumanInputChatModel")
|
||||||
|
|
||||||
CHAT_MODEL_FEAT_TABLE_CORRECTION = {
|
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},
|
||||||
|
"ChatMistralAI": {"tool_calling": True},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LLM_TEMPLATE = """\
|
LLM_TEMPLATE = """\
|
||||||
---
|
---
|
||||||
sidebar_position: 1
|
sidebar_position: 1
|
||||||
@ -101,6 +106,7 @@ def get_llm_table():
|
|||||||
"_astream",
|
"_astream",
|
||||||
"batch_generate",
|
"batch_generate",
|
||||||
"batch_agenerate",
|
"batch_agenerate",
|
||||||
|
"tool_calling",
|
||||||
]
|
]
|
||||||
title = [
|
title = [
|
||||||
"Model",
|
"Model",
|
||||||
@ -110,6 +116,7 @@ def get_llm_table():
|
|||||||
"Async stream",
|
"Async stream",
|
||||||
"Batch",
|
"Batch",
|
||||||
"Async batch",
|
"Async batch",
|
||||||
|
"Tool calling",
|
||||||
]
|
]
|
||||||
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()):
|
||||||
@ -117,7 +124,8 @@ def get_llm_table():
|
|||||||
return "\n".join(["|".join(row) for row in rows])
|
return "\n".join(["|".join(row) for row in rows])
|
||||||
|
|
||||||
|
|
||||||
def get_chat_model_table():
|
def get_chat_model_table() -> str:
|
||||||
|
"""Get the table of chat models."""
|
||||||
feat_table = {}
|
feat_table = {}
|
||||||
for cm in chat_models.__all__:
|
for cm in chat_models.__all__:
|
||||||
feat_table[cm] = {}
|
feat_table[cm] = {}
|
||||||
@ -133,8 +141,15 @@ def get_chat_model_table():
|
|||||||
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"]
|
header = ["model", "_agenerate", "_stream", "_astream", "tool_calling"]
|
||||||
title = ["Model", "Invoke", "Async invoke", "Stream", "Async stream"]
|
title = [
|
||||||
|
"Model",
|
||||||
|
"Invoke",
|
||||||
|
"Async invoke",
|
||||||
|
"Stream",
|
||||||
|
"Async stream",
|
||||||
|
"Tool calling",
|
||||||
|
]
|
||||||
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:]]]
|
rows += [[llm, "✅"] + ["✅" if feats.get(h) else "❌" for h in header[1:]]]
|
||||||
|
Loading…
Reference in New Issue
Block a user