Skip to content

Conversation

@bjhargrave
Copy link
Contributor

Description

This allows the user to specify chat_template_kwargs like other chat params (e.g. temperature) on the ChatWatsonx constructor or as a kwarg to ChatWatsonx.invoke/generate/etc.

Prior to this change, one had to specify chat_template_kwargs under the params argument. But this is cumbersome, different that other LangChain chat integrations, and different from other chat params like all the others named in _get_supported_chat_params().

Relevant issues

Fixes #138

Type

🆕 New Feature

Changes(optional)

Testing(optional)

Note(optional)

This allows the user to specify chat_template_kwargs like other chat
params (e.g. temperature) on the ChatWatsonx constructor or as a kwarg
to ChatWatsonx.invoke/generate/etc.

Prior to this change, one had to specify chat_template_kwargs under the
params argument. But this is cumbersome, different that other LangChain
chat integrations, and different from other chat params like all the
others named in _get_supported_chat_params().

Signed-off-by: BJ Hargrave <[email protected]>
@MateuszOssGit MateuszOssGit merged commit 88b5069 into langchain-ai:main Nov 5, 2025
12 checks passed
@bjhargrave bjhargrave deleted the chat_template_kwargs branch November 5, 2025 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to support chat_template_kwargs for ChatWatsonx

2 participants