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

Commit 72e9576

Browse files
committed
fix more specs
1 parent 2181e2a commit 72e9576

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

lib/configuration/llm_enumerator.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@ def self.global_usage
1616

1717
AiPersona
1818
.where("force_default_llm = ?", true)
19-
.pluck(:default_llm, :name, :id)
20-
.each do |llm_name, name, id|
21-
llm_id = llm_name.split(":").last.to_i
22-
rval[llm_id] << { type: :ai_persona, name: name, id: id }
23-
end
19+
.pluck(:default_llm_id, :name, :id)
20+
.each { |llm_id, name, id| rval[llm_id] << { type: :ai_persona, name: name, id: id } }
2421
end
2522

2623
if SiteSetting.ai_helper_enabled

spec/requests/admin/ai_llms_controller_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
:ai_persona,
1717
name: "Cool persona",
1818
force_default_llm: true,
19-
default_llm: "custom:#{llm_model2.id}",
19+
default_llm_id: llm_model2.id,
2020
)
2121
end
2222

0 commit comments

Comments
 (0)