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:
我秦始皇 2025-01-22 04:55:41 -08:00 committed by GitHub
parent a5e5ae72a8
commit 654f90f1cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,
) )