From 654f90f1cde85a040b4a000f113c496b6e517814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=91=E7=A7=A6=E5=A7=8B=E7=9A=87?= Date: Wed, 22 Jan 2025 04:55:41 -0800 Subject: [PATCH] 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 --- db/migrate/20250110114305_embedding_config_data_migration.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20250110114305_embedding_config_data_migration.rb b/db/migrate/20250110114305_embedding_config_data_migration.rb index 3125bc99..98fc3864 100644 --- a/db/migrate/20250110114305_embedding_config_data_migration.rb +++ b/db/migrate/20250110114305_embedding_config_data_migration.rb @@ -185,7 +185,7 @@ class EmbeddingConfigDataMigration < ActiveRecord::Migration[7.0] tokenizer_class: attrs[:tokenizer_class], url: attrs[:url], api_key: attrs[:api_key], - provider_params: attrs[:provider_params], + provider_params: attrs[:provider_params]&.to_json, seeded: !!attrs[:seeded], now: Time.zone.now, )