mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-03-03 15:59:59 +00:00
FIX: convert provider_params hash to json before db insert (#1081)
* FIX: convert provider_params hash to json before db insert * FIX: lint issues in config migration * FIX: simplify provider_params json conversion
This commit is contained in:
parent
a5e5ae72a8
commit
654f90f1cd
@ -185,7 +185,7 @@ class EmbeddingConfigDataMigration < ActiveRecord::Migration[7.0]
|
|||||||
tokenizer_class: attrs[:tokenizer_class],
|
tokenizer_class: attrs[:tokenizer_class],
|
||||||
url: attrs[:url],
|
url: attrs[:url],
|
||||||
api_key: attrs[:api_key],
|
api_key: attrs[:api_key],
|
||||||
provider_params: attrs[:provider_params],
|
provider_params: attrs[:provider_params]&.to_json,
|
||||||
seeded: !!attrs[:seeded],
|
seeded: !!attrs[:seeded],
|
||||||
now: Time.zone.now,
|
now: Time.zone.now,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user