Skip to content

Commit 0e74fb4

Browse files
authored
docs: Update list of chat models tool calling providers (langchain-ai#20330)
Will follow up with a few missing providers
1 parent 653489a commit 0e74fb4

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

docs/scripts/model_feat_table.py

+18-3
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,17 @@
1515
"PromptLayerOpenAI": {"batch_generate": False, "batch_agenerate": False},
1616
}
1717
CHAT_MODEL_IGNORE = ("FakeListChatModel", "HumanInputChatModel")
18+
1819
CHAT_MODEL_FEAT_TABLE_CORRECTION = {
1920
"ChatMLflowAIGateway": {"_agenerate": False},
2021
"PromptLayerChatOpenAI": {"_stream": False, "_astream": False},
2122
"ChatKonko": {"_astream": False, "_agenerate": False},
23+
"ChatOpenAI": {"tool_calling": True},
24+
"ChatAnthropic": {"tool_calling": True},
25+
"ChatMistralAI": {"tool_calling": True},
2226
}
2327

28+
2429
LLM_TEMPLATE = """\
2530
---
2631
sidebar_position: 1
@@ -101,6 +106,7 @@ def get_llm_table():
101106
"_astream",
102107
"batch_generate",
103108
"batch_agenerate",
109+
"tool_calling",
104110
]
105111
title = [
106112
"Model",
@@ -110,14 +116,16 @@ def get_llm_table():
110116
"Async stream",
111117
"Batch",
112118
"Async batch",
119+
"Tool calling",
113120
]
114121
rows = [title, [":-"] + [":-:"] * (len(title) - 1)]
115122
for llm, feats in sorted(final_feats.items()):
116123
rows += [[llm, "✅"] + ["✅" if feats.get(h) else "❌" for h in header[1:]]]
117124
return "\n".join(["|".join(row) for row in rows])
118125

119126

120-
def get_chat_model_table():
127+
def get_chat_model_table() -> str:
128+
"""Get the table of chat models."""
121129
feat_table = {}
122130
for cm in chat_models.__all__:
123131
feat_table[cm] = {}
@@ -133,8 +141,15 @@ def get_chat_model_table():
133141
for k, v in {**feat_table, **CHAT_MODEL_FEAT_TABLE_CORRECTION}.items()
134142
if k not in CHAT_MODEL_IGNORE
135143
}
136-
header = ["model", "_agenerate", "_stream", "_astream"]
137-
title = ["Model", "Invoke", "Async invoke", "Stream", "Async stream"]
144+
header = ["model", "_agenerate", "_stream", "_astream", "tool_calling"]
145+
title = [
146+
"Model",
147+
"Invoke",
148+
"Async invoke",
149+
"Stream",
150+
"Async stream",
151+
"Tool calling",
152+
]
138153
rows = [title, [":-"] + [":-:"] * (len(title) - 1)]
139154
for llm, feats in sorted(final_feats.items()):
140155
rows += [[llm, "✅"] + ["✅" if feats.get(h) else "❌" for h in header[1:]]]

0 commit comments

Comments
 (0)