Skip to content

Commit 66726bc

Browse files
committed
remove rubocop ignore for anthropic complete method
1 parent 5f8eb1d commit 66726bc

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

lib/ruby_llm/providers/anthropic.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@ def headers
2222
}
2323
end
2424

25-
# rubocop:disable Metrics/ParameterLists
26-
def complete(messages, tools:, temperature:, model:, params: {}, headers: {}, schema: nil, thinking: nil,
27-
tool_prefs: nil, &block)
25+
def complete(messages, headers: {}, **kwargs, &block)
2826
headers = headers.merge('anthropic-beta' => 'prompt-caching-2024-07-31') if messages.any?(&:cache_point?)
2927

30-
super
28+
super(messages, headers: headers, **kwargs, &block) # rubocop:disable Style/SuperArguments
29+
# Ignoring as we're modifying headers before calling super. We need to call super with modified headers.
3130
end
32-
# rubocop:enable Metrics/ParameterLists
3331

3432
class << self
3533
def capabilities

0 commit comments

Comments
 (0)