open_router 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/open_router/client.rb +2 -2
- data/lib/open_router/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a5b9e865727928cf848ac7358a9d5b4fc5531885151549d4f872088761497a5e
|
4
|
+
data.tar.gz: 79696ceb293c5123529bdd50bc5ed99bbd324e0b68cc1a174ecec5f53db15026
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70738504ab35189048b1eb76d7f52c7e3421876b3bab31792af0afbe013ca0d2d27abaafd2cd07fc7c7d2942333b68d8170b51729bb5a32606188f702d4a6eca
|
7
|
+
data.tar.gz: 47155d2a9ef577daaa979776838a51ae9107294d8e370e4a7ad3fc3b8099589def7f40d96f44f2bf2fcdd9126a46562d7d54a7ab43778906c13d6ab409228cb7
|
data/Gemfile.lock
CHANGED
data/lib/open_router/client.rb
CHANGED
@@ -42,8 +42,8 @@ module OpenRouter
|
|
42
42
|
parameters.merge!(extras)
|
43
43
|
|
44
44
|
post(path: "/chat/completions", parameters:).tap do |response|
|
45
|
-
raise ServerError,
|
46
|
-
raise ServerError, response.
|
45
|
+
raise ServerError, response.dig("error", "message") if response.presence&.dig("error", "message").present?
|
46
|
+
raise ServerError, "Empty response from OpenRouter. Might be worth retrying once or twice." if stream.blank? && response.blank?
|
47
47
|
end.with_indifferent_access
|
48
48
|
end
|
49
49
|
|
data/lib/open_router/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: open_router
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Obie Fernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|