Skip to content

Commit cdcde49

Browse files
fix(langchain): fix docs on LLMToolSelectorMiddleware (#1415)
Minor fixed for `llmToolSelectorMiddleware`
1 parent fbde169 commit cdcde49

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/oss/langchain/middleware/built-in.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,11 +1251,11 @@ const agent = createAgent({
12511251
</ParamField>
12521252

12531253
<ParamField body="max_tools" type="number">
1254-
Maximum number of tools to select. Defaults to no limit.
1254+
Maximum number of tools to select. If the model selects more, only the first max_tools will be used. No limit if not specified.
12551255
</ParamField>
12561256

12571257
<ParamField body="always_include" type="list[string]">
1258-
List of tool names to always include in the selection
1258+
Tool names to always include regardless of selection. These do not count against the max_tools limit.
12591259
</ParamField>
12601260
:::
12611261

@@ -1264,12 +1264,16 @@ const agent = createAgent({
12641264
Model for tool selection. Can be a model identifier string (e.g., `'openai:gpt-4o-mini'`) or a `BaseChatModel` instance. Defaults to the agent's main model.
12651265
</ParamField>
12661266

1267+
<ParamField body="systemPrompt" type="string">
1268+
Instructions for the selection model. Uses built-in prompt if not specified.
1269+
</ParamField>
1270+
12671271
<ParamField body="maxTools" type="number">
1268-
Maximum number of tools to select. Defaults to no limit.
1272+
Maximum number of tools to select. If the model selects more, only the first maxTools will be used. No limit if not specified.
12691273
</ParamField>
12701274

12711275
<ParamField body="alwaysInclude" type="string[]">
1272-
Array of tool names to always include in the selection
1276+
Tool names to always include regardless of selection. These do not count against the maxTools limit.
12731277
</ParamField>
12741278
:::
12751279

0 commit comments

Comments
 (0)