mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-07 23:12:34 +00:00
FIX: Make sure LlmEnumerator always return value hashes using symbols (#684)
This commit is contained in:
parent
3a2339902e
commit
091dc626e8
@ -10,12 +10,12 @@ module DiscourseAi
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.values
|
def self.values
|
||||||
values = DB.query_hash(<<~SQL)
|
values = DB.query_hash(<<~SQL).map(&:symbolize_keys)
|
||||||
SELECT display_name AS name, id AS value
|
SELECT display_name AS name, id AS value
|
||||||
FROM llm_models
|
FROM llm_models
|
||||||
SQL
|
SQL
|
||||||
|
|
||||||
values.each { |value_h| value_h["value"] = "custom:#{value_h["value"]}" }
|
values.each { |value_h| value_h[:value] = "custom:#{value_h[:value]}" }
|
||||||
|
|
||||||
values
|
values
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user