brute 3.2.0 → 3.2.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 +4 -4
- data/lib/brute/middleware/open_router.rb +3 -3
- data/lib/brute/version.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: f3375f62e8d019bd4a1dd45d2407112ef421c7ce437f604addb0fac51586c5ec
|
|
4
|
+
data.tar.gz: 15fbc6ed0dce515a143f2424957de3c120ff4f68e5b097d732b418f9fe43aecc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2ea1006786ddbb531aaa2bf708f60a362422acf87159f731d7ed459bf409d89103ea48a6530953eb31382eb6ca44ea314afdfb4b61bf870a6153b8128f498cd
|
|
7
|
+
data.tar.gz: 4ba3e5a9822d3c50b498cab1f33730decc3d3298eb289bd0a450c52e681eaa06fdc002cca73bf0c45b353283e95a0f12ec9cc8605a2623a0f43e1df7eb064789
|
|
@@ -6,14 +6,14 @@ module Brute
|
|
|
6
6
|
class Completion
|
|
7
7
|
def initialize(app, config: {}, **options)
|
|
8
8
|
@app = app
|
|
9
|
-
@config = OpenRouter::Configuration.new(config)
|
|
10
|
-
@options = OpenRouter::CompletionOptions.new(options)
|
|
9
|
+
@config = ::OpenRouter::Configuration.new(config)
|
|
10
|
+
@options = ::OpenRouter::CompletionOptions.new(options)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
13
|
def call(env)
|
|
14
14
|
messages = Brute::MessageTransport::OpenRouter.dump_all(env[:messages])
|
|
15
15
|
|
|
16
|
-
OpenRouter::Client.new(@config).then do |client|
|
|
16
|
+
::OpenRouter::Client.new(@config).then do |client|
|
|
17
17
|
client.complete(messages, @options).then do |response|
|
|
18
18
|
|
|
19
19
|
# OpenRouter in fact only returns a single message...
|
data/lib/brute/version.rb
CHANGED