completion-kit 0.28.17 → 0.28.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a06bbc49a6b929962197f8ff7fe9cd5e1fa4561fe2a7074e4028ac867472cf61
4
- data.tar.gz: 6615270452a2c991cce7ef84aa5267e22f014e3039dd59cd7ebeb1f0ba8cb90c
3
+ metadata.gz: e30a6a27a48e1a23c1947477068eec74f8ff2ff869bab4592f68c612a728dc76
4
+ data.tar.gz: c1cdf115062d9ddd903296574420bd75128995460ce26e64e44681cdd6655ed9
5
5
  SHA512:
6
- metadata.gz: 9be6cc2b9f3522f622c9b6d503e391b3007d70e156ea12f862e4cd8fd91a20a3a9c01691a8910a48bdaedd2d9dea86766051ea8bf8172aac7f0882f5368e257c
7
- data.tar.gz: b87f4a046822e9b52b2edd823f443894d5f106cc81f1e6470fb5f7d4d4764a497ac23f3795201e63819971d3890c235eb3a297e9b689d2781479cdfc005f89b1
6
+ metadata.gz: ef4c4ddecf48be58b43ff9d02b1e2743d75b28eabdccf13bc35db32c0225b4a880318a4e35faa7ba8c235a29f77c934ad323f5099a355edd0d29ba18f8293566
7
+ data.tar.gz: cd6b8331a0ad697ca16e71c7d6eb623d70e050c1fe50332672bd797c01a42509cef2c2ba6738bbebf3dfdff6d1feb07a29ea2f205408390259ea8d809622103a
@@ -4,6 +4,7 @@ module CompletionKit
4
4
  include CompletionKit::Taggable
5
5
 
6
6
  STATUSES = %w[pending running completed failed].freeze
7
+ INSERT_BATCH_SIZE = 1000
7
8
 
8
9
  belongs_to :prompt, optional: true
9
10
  belongs_to :dataset, optional: true
@@ -240,7 +241,7 @@ module CompletionKit
240
241
  updated_at: now
241
242
  }.merge(scope_defaults)
242
243
  end
243
- Response.insert_all(response_attrs)
244
+ response_attrs.each_slice(INSERT_BATCH_SIZE) { |batch| Response.insert_all(batch) }
244
245
  responses.reset
245
246
 
246
247
  response_ids = responses.order(:row_index).pluck(:id)
@@ -172,7 +172,7 @@
172
172
  <% suggestions.each do |s| %>
173
173
  <tr onclick="window.location='<%= suggestion_path(s, from: "prompt") %>'" style="cursor: pointer;">
174
174
  <td><%= link_to suggestion_path(s, from: "prompt"), class: "ck-record-name" do %><strong><%= s.run.name %></strong><% end %></td>
175
- <td class="ck-meta-copy"><%= s.prompt.version_label %></td>
175
+ <td><span class="ck-chip ck-chip--soft"><%= s.prompt.version_label %></span></td>
176
176
  <td class="ck-meta-copy"><%= truncate(ck_strip_markdown(s.reasoning), length: 100) %></td>
177
177
  <td><%= s.applied_at? ? content_tag(:span, "Applied", class: "ck-chip", style: "background: var(--ck-success-soft); color: var(--ck-success);") : "&mdash;".html_safe %></td>
178
178
  <td class="ck-meta-copy"><time data-relative-time datetime="<%= s.created_at.utc.iso8601 %>"><%= time_ago_in_words(s.created_at) %> ago</time></td>
@@ -1,3 +1,3 @@
1
1
  module CompletionKit
2
- VERSION = "0.28.17"
2
+ VERSION = "0.28.19"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: completion-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.17
4
+ version: 0.28.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damien Bastin