active_harness 0.3.2 → 0.3.3
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/lib/active_harness/request/providers.rb +10 -1
- data/lib/active_harness.rb +1 -1
- 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: 4297f5db3bd99d90d12679afcc742998ed815606ee25e3c0490187370fad8e2d
|
|
4
|
+
data.tar.gz: c2955dc8a5391fcf13fc3752ba490222ea8d55f7127cc90f8aee93937b1bac91
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 731130020cff7ed11514659b2cfc7b9dd6aed0e6a935e9ff198ebf695b44065a7e1a139da1824178b289c1aa13d75e8aaba5b32373b781b4f9639a61d9c5135e
|
|
7
|
+
data.tar.gz: 6240251c55447e9a56d3c87d704b441d447ad3c8604b09651c2dfbb9577e20c11165bb4fba740bdf9c0cb386adca2c0ab52a80485c7410d56d1285fddf86ff61
|
|
@@ -62,7 +62,7 @@ module ActiveHarness
|
|
|
62
62
|
opts[:temperature] = entry[:temperature] if entry[:temperature]
|
|
63
63
|
opts[:stream] = @token if @token
|
|
64
64
|
opts[:name] = entry[:name] if entry[:name]
|
|
65
|
-
opts[:questions] = entry[:questions]
|
|
65
|
+
opts[:questions] = resolve_questions(entry[:questions]) if entry[:questions]
|
|
66
66
|
provider.call(**opts)
|
|
67
67
|
end
|
|
68
68
|
|
|
@@ -111,6 +111,15 @@ module ActiveHarness
|
|
|
111
111
|
factory.call
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
+
# `questions:` (currently used only by provider: :vercel) accepts either a
|
|
115
|
+
# static Hash or a Proc, resolved the same way system_prompt is: called via
|
|
116
|
+
# instance_exec with no arguments, so it can read @input/@context/@params.
|
|
117
|
+
#
|
|
118
|
+
# use provider: :vercel, model: "typesafe-ai/jev", questions: -> { @params[:questions] }
|
|
119
|
+
def resolve_questions(value)
|
|
120
|
+
value.is_a?(Proc) ? instance_exec(&value) : value
|
|
121
|
+
end
|
|
122
|
+
|
|
114
123
|
def build_messages(system_prompt, input)
|
|
115
124
|
# Memory is NOT auto-injected here.
|
|
116
125
|
# To use history in LLM context, inject it manually via a hook or prompt class.
|
data/lib/active_harness.rb
CHANGED