You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add support for Anthropic 'thinking' parameter (#955)
This commit introduces support for the `thinking` parameter in the Anthropic LLM integration. Users can now enable Claude 3.7 Sonnet's extended thinking mode by passing the `thinking` parameter either via `default_options` during initialization or directly to the `chat` method.
Changes include:
- Added `thinking` to the `chat_parameters` schema in `Langchain::LLM::Anthropic`.
- Included tests for the `thinking` parameter in `spec/langchain/llm/anthropic_spec.rb`.
- Updated inline documentation for the `initialize` and `chat` methods to reflect the new parameter.
Copy file name to clipboardExpand all lines: lib/langchain/llm/anthropic.rb
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ class Anthropic < Base
22
22
#
23
23
# @param api_key [String] The API key to use
24
24
# @param llm_options [Hash] Options to pass to the Anthropic client
25
-
# @param default_options [Hash] Default options to use on every call to LLM, e.g.: { temperature:, completion_model:, chat_model:, max_tokens: }
25
+
# @param default_options [Hash] Default options to use on every call to LLM, e.g.: { temperature:, completion_model:, chat_model:, max_tokens:, thinking: }
0 commit comments