llm_logs 0.2.3 → 0.2.5
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 +4 -4
- data/README.md +1 -0
- data/app/controllers/llm_logs/batches_controller.rb +2 -2
- data/app/controllers/llm_logs/prompts_controller.rb +1 -1
- data/app/controllers/llm_logs/traces_controller.rb +1 -1
- data/lib/llm_logs/configuration.rb +2 -1
- data/lib/llm_logs/version.rb +1 -1
- data/lib/llm_logs.rb +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3bb808cbb1283ea0377f8f86fea214292206fd926417f06210226c937880228d
|
|
4
|
+
data.tar.gz: 15565f490c2d97e4548fa1f49adef4f8d21d3caf77b787cc01fd50dcd2ad0d09
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 07cffca75a8ced5f19a8e0b54cd3b0b161f6c610453f21e40f421b0e1c62cdd6a64acb706f09bf9850a2275eb03061f0e67caf4c4d6d5a6a58ef349485553cdc
|
|
7
|
+
data.tar.gz: 28ec05567c6ced0eb8b9b61d74a4d153e53b9a5c2fa6a76710a6b524856b025946d6e2dde06858fad26b1a6ed0fb81506f0dd7d3565a493069611382e4df01f8
|
data/README.md
CHANGED
|
@@ -267,6 +267,7 @@ LlmLogs.setup do |config|
|
|
|
267
267
|
config.prompt_subfolders = %w[skills fragments templates]
|
|
268
268
|
config.batch_enabled = true # enable the batch API integration
|
|
269
269
|
config.batch_provider = :openai_responses # batch backend
|
|
270
|
+
config.page_size = 50 # rows per page on all index pages
|
|
270
271
|
end
|
|
271
272
|
```
|
|
272
273
|
|
|
@@ -4,12 +4,12 @@ module LlmLogs
|
|
|
4
4
|
@batches = Batch.recent
|
|
5
5
|
@batches = @batches.where(purpose: params[:purpose]) if params[:purpose].present?
|
|
6
6
|
@batches = @batches.where(status: params[:status]) if params[:status].present?
|
|
7
|
-
@batches = @batches.page(params[:page]).per(
|
|
7
|
+
@batches = @batches.page(params[:page]).per(LlmLogs.page_size)
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def show
|
|
11
11
|
@batch = Batch.find(params[:id])
|
|
12
|
-
@requests = @batch.requests.order(:created_at).page(params[:page]).per(
|
|
12
|
+
@requests = @batch.requests.order(:created_at).page(params[:page]).per(LlmLogs.page_size)
|
|
13
13
|
end
|
|
14
14
|
end
|
|
15
15
|
end
|
|
@@ -8,7 +8,7 @@ module LlmLogs
|
|
|
8
8
|
@direction = params[:direction] == "desc" ? "desc" : "asc"
|
|
9
9
|
scope = Prompt.order(SORT_COLUMNS.fetch(@sort) => @direction.to_sym).includes(:versions)
|
|
10
10
|
scope = scope.with_tag(tag) if tag
|
|
11
|
-
@prompts = scope.page(params[:page]).per(
|
|
11
|
+
@prompts = scope.page(params[:page]).per(LlmLogs.page_size)
|
|
12
12
|
@active_tag = tag
|
|
13
13
|
@all_tags = Prompt.pluck(:tags).flatten.compact.uniq.sort
|
|
14
14
|
end
|
|
@@ -7,7 +7,7 @@ module LlmLogs
|
|
|
7
7
|
@traces = @traces.where(prompt_version_id: params[:prompt_version_id])
|
|
8
8
|
@filter_version = PromptVersion.find_by(id: params[:prompt_version_id])
|
|
9
9
|
end
|
|
10
|
-
@traces = @traces.page(params[:page]).per(
|
|
10
|
+
@traces = @traces.page(params[:page]).per(LlmLogs.page_size)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def show
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module LlmLogs
|
|
2
2
|
class Configuration
|
|
3
3
|
attr_accessor :enabled, :auto_instrument, :retention_days, :prompts_source_path, :prompt_subfolders,
|
|
4
|
-
:batch_enabled, :batch_provider
|
|
4
|
+
:batch_enabled, :batch_provider, :page_size
|
|
5
5
|
|
|
6
6
|
def initialize
|
|
7
7
|
@enabled = true
|
|
@@ -11,6 +11,7 @@ module LlmLogs
|
|
|
11
11
|
@prompt_subfolders = %w[skills fragments templates]
|
|
12
12
|
@batch_enabled = true
|
|
13
13
|
@batch_provider = :openai_responses
|
|
14
|
+
@page_size = 50
|
|
14
15
|
end
|
|
15
16
|
end
|
|
16
17
|
|
data/lib/llm_logs/version.rb
CHANGED
data/lib/llm_logs.rb
CHANGED
|
@@ -38,6 +38,14 @@ module LlmLogs
|
|
|
38
38
|
configuration.retention_days = retention_days
|
|
39
39
|
end
|
|
40
40
|
|
|
41
|
+
def self.page_size
|
|
42
|
+
configuration.page_size
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def self.page_size=(page_size)
|
|
46
|
+
configuration.page_size = page_size
|
|
47
|
+
end
|
|
48
|
+
|
|
41
49
|
def self.batch_enabled?
|
|
42
50
|
configuration.batch_enabled
|
|
43
51
|
end
|