active_harness_pricing 0.1.0 → 0.1.1
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 053d38400e387ca3f0600d59f3fb8c6ce2f12aa2a173932584da6cebf0d25730
|
|
4
|
+
data.tar.gz: 7d5074e44f84d5d55d3d65c1440193c5b0b4fa83020018b6cef1b8e7761b4d65
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef0291f5bf9a832cb9423420684c2fabea5714476150e477963ab7bda5143296dc53a9d2c129adba8ef40b96d18de9748fdf82f88e6e82c57b56be242e937f21
|
|
7
|
+
data.tar.gz: 8b9b0db82d20051fef355da98f134a2e4d810f6a77762f68424303498246e8a361d7b23b551c9307c2c2fb4529f790bcc67443f76678a0d34c8366e9eb17ceaf
|
|
@@ -164,8 +164,8 @@ module ActiveHarness
|
|
|
164
164
|
next [] unless ah_provider && allowed.include?(ah_provider)
|
|
165
165
|
|
|
166
166
|
models_hash = provider_data.is_a?(Hash) ? (provider_data[:models] || {}) : {}
|
|
167
|
-
models_hash.values.
|
|
168
|
-
next unless m.is_a?(Hash) && m[:id]
|
|
167
|
+
models_hash.values.map do |m|
|
|
168
|
+
next nil unless m.is_a?(Hash) && m[:id]
|
|
169
169
|
|
|
170
170
|
cost = m[:cost] || {}
|
|
171
171
|
standard = {
|
|
@@ -186,7 +186,7 @@ module ActiveHarness
|
|
|
186
186
|
output_modalities: Array(mods[:output]),
|
|
187
187
|
pricing: standard.any? ? { text_tokens: { standard: standard } } : {}
|
|
188
188
|
}
|
|
189
|
-
end
|
|
189
|
+
end.compact
|
|
190
190
|
end
|
|
191
191
|
end
|
|
192
192
|
|