completion-kit 0.29.2 → 0.30.0

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.
Files changed (28) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +4 -1
  3. data/README.md +94 -127
  4. data/app/assets/stylesheets/completion_kit/application.css +29 -0
  5. data/app/controllers/completion_kit/api/v1/base_controller.rb +1 -0
  6. data/app/controllers/completion_kit/api/v1/prompts_controller.rb +14 -2
  7. data/app/controllers/completion_kit/prompts_controller.rb +1 -6
  8. data/app/controllers/completion_kit/runs_controller.rb +8 -1
  9. data/app/models/completion_kit/prompt.rb +7 -0
  10. data/app/services/completion_kit/mcp_tools/agreements.rb +4 -2
  11. data/app/services/completion_kit/mcp_tools/base.rb +7 -1
  12. data/app/services/completion_kit/mcp_tools/datasets.rb +12 -6
  13. data/app/services/completion_kit/mcp_tools/imports.rb +2 -1
  14. data/app/services/completion_kit/mcp_tools/judges.rb +4 -2
  15. data/app/services/completion_kit/mcp_tools/metric_groups.rb +10 -5
  16. data/app/services/completion_kit/mcp_tools/metric_versions.rb +6 -3
  17. data/app/services/completion_kit/mcp_tools/metrics.rb +12 -6
  18. data/app/services/completion_kit/mcp_tools/prompts.rb +18 -9
  19. data/app/services/completion_kit/mcp_tools/provider_credentials.rb +10 -5
  20. data/app/services/completion_kit/mcp_tools/responses.rb +4 -6
  21. data/app/services/completion_kit/mcp_tools/runs.rb +18 -11
  22. data/app/services/completion_kit/mcp_tools/tags.rb +10 -5
  23. data/app/views/completion_kit/api_reference/_body.html.erb +4 -6
  24. data/app/views/completion_kit/provider_credentials/_form.html.erb +4 -2
  25. data/app/views/completion_kit/runs/compare_picker.html.erb +5 -3
  26. data/lib/completion_kit/version.rb +1 -1
  27. data/lib/completion_kit.rb +2 -1
  28. metadata +1 -1
@@ -8,15 +8,16 @@
8
8
  <section class="ck-page-header">
9
9
  <div>
10
10
  <h1 class="ck-title">Compare with another run</h1>
11
- <p class="ck-lead">Pick a run on the same dataset and prompt to see per-case score deltas side by side.</p>
11
+ <p class="ck-lead">Pick a run on the same dataset and prompt, from any version of the prompt, to see per-case score deltas side by side.</p>
12
12
  </div>
13
13
  </section>
14
14
 
15
15
  <% if @other_runs.any? %>
16
- <table class="ck-results-table">
16
+ <table class="ck-results-table ck-compare-picker">
17
17
  <thead>
18
18
  <tr>
19
19
  <th scope="col">Run</th>
20
+ <th scope="col">Prompt version</th>
20
21
  <th scope="col">Judge</th>
21
22
  <th scope="col">Created</th>
22
23
  <th scope="col"></th>
@@ -25,7 +26,8 @@
25
26
  <tbody>
26
27
  <% @other_runs.each do |other| %>
27
28
  <tr>
28
- <td><%= link_to other.name, run_path(other), class: "ck-link" %></td>
29
+ <td><%= link_to other.name, run_path(other), class: "ck-link", title: other.name %></td>
30
+ <td class="ck-meta-copy"><%= other.prompt&.version_label %></td>
29
31
  <td class="ck-meta-copy"><%= other.judge_model %></td>
30
32
  <td class="ck-meta-copy"><time datetime="<%= other.created_at.utc.iso8601 %>"><%= time_ago_in_words(other.created_at) %> ago</time></td>
31
33
  <td class="ck-results-table__arrow"><%= link_to "Compare →", compare_run_path(@run, with: other.id), class: "ck-link" %></td>
@@ -1,3 +1,3 @@
1
1
  module CompletionKit
2
- VERSION = "0.29.2"
2
+ VERSION = "0.30.0"
3
3
  end
@@ -13,7 +13,7 @@ module CompletionKit
13
13
  attr_accessor :tenant_scope, :tenant_scope_columns
14
14
  attr_accessor :api_reference_authentication_partial
15
15
  attr_accessor :runs_display_scope, :runs_display_footer_partial
16
- attr_accessor :api_rate_limit, :web_rate_limit, :max_upload_bytes
16
+ attr_accessor :api_rate_limit, :api_rate_limit_key, :web_rate_limit, :max_upload_bytes
17
17
  attr_accessor :max_template_bytes
18
18
  attr_reader :regex_timeout
19
19
  attr_accessor :allow_loopback_endpoints
@@ -33,6 +33,7 @@ module CompletionKit
33
33
  @medium_quality_threshold = 3
34
34
 
35
35
  @api_rate_limit = 120
36
+ @api_rate_limit_key = ->(request) { request.remote_ip }
36
37
  @web_rate_limit = 300
37
38
  @max_upload_bytes = 25 * 1024 * 1024
38
39
  @max_template_bytes = 1024 * 1024
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.29.2
4
+ version: 0.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Damien Bastin