Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit d7f060f

Browse files
committed
lint
1 parent 311ad48 commit d7f060f

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

lib/completions/anthropic_message_processor.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def to_xml_tool_calls(function_buffer)
4141
params = JSON.parse(tool_call.raw_json, symbolize_names: true)
4242
xml = params.map { |name, value| "<#{name}>#{CGI.escapeHTML(value)}</#{name}>" }.join("\n")
4343

44-
4544
node.at("tool_name").content = tool_call.name
4645
node.at("tool_id").content = tool_call.id
4746
node.at("parameters").children = Nokogiri::HTML5::DocumentFragment.parse(xml) if xml.present?

spec/lib/completions/endpoints/gemini_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def tool_response
188188
llm = DiscourseAi::Completions::Llm.proxy("custom:#{model.id}")
189189
url = "#{model.url}:generateContent?key=123"
190190

191-
response_json = { "functionCall" => { name: "echo", args: {text: "<S>ydney" } } }
191+
response_json = { "functionCall" => { name: "echo", args: { text: "<S>ydney" } } }
192192
response = gemini_mock.response(response_json, tool_call: true).to_json
193193

194194
stub_request(:post, url).to_return(status: 200, body: response)

spec/models/ai_tool_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def create_tool(
3939
end
4040

4141
it "can perform HTTP requests with various verbs" do
42-
[:post, :put, :delete, :patch].each do |verb|
42+
%i[post put delete patch].each do |verb|
4343
script = <<~JS
4444
function invoke(params) {
4545
result = http.#{verb}("https://example.com/api",

0 commit comments

Comments
 (0)