inference_activity 1.0.1 → 1.0.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/inference_activity/version.rb +1 -1
- data/lib/inference_activity.rb +2 -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: 6f34a12579e31be82eca7ac88e85f02488f04af9ef800eee7ceaf6f488c6ca69
|
|
4
|
+
data.tar.gz: daadc9ff6a1b6ba9028044ed6b75611c44f28afdaa2a242c810c17c8d4f5e735
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fb6246bcb05dc328bd74f8eb26b855e26b003ecc7682bef9ce82436d9c467010b04b32a8092ea361729a6ca63c9686f85faedb40e9f44770aff26289757d686e
|
|
7
|
+
data.tar.gz: b2b81e084f748eb386ab2386359e940ef9c83f1163972945a5f42815506632852cff0737e89c02cd20a68d05d85323d2ff5179378eb084f1aa9ae53072f2a115
|
data/lib/inference_activity.rb
CHANGED
|
@@ -30,7 +30,7 @@ module InferenceActivity
|
|
|
30
30
|
timestamp: (Time.now.to_f * 1000).to_i, # Unix timestamp in milliseconds
|
|
31
31
|
response_time: duration,
|
|
32
32
|
status_code: response.is_a?(Integer) ? response : response.code.to_i,
|
|
33
|
-
status_message: response.message,
|
|
33
|
+
status_message: response.is_a?(Integer) ? response.to_s : response.message,
|
|
34
34
|
request: redact_request(request),
|
|
35
35
|
response: redact_response(response)
|
|
36
36
|
}
|
|
@@ -113,6 +113,7 @@ module InferenceActivity
|
|
|
113
113
|
end
|
|
114
114
|
|
|
115
115
|
def parse_response_body(response)
|
|
116
|
+
return {} if response.is_a?(Integer)
|
|
116
117
|
JSON.parse(response.body)
|
|
117
118
|
rescue JSON::ParserError
|
|
118
119
|
response.body
|