foobara-ai 0.0.13 → 0.0.14
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: 9c915b80c804ceddc6311400052b2a7cce0011bfcfda4d80dc200f63e50382e5
|
4
|
+
data.tar.gz: 3e50a758f4b65631c5c535fcce51aca9013170cdcd856760c956bb3605b1acff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1eb53a355a90be12c04da34da4449c22ef8808c4b9bb98e422285a363089d5284fbf916138bc60dcfab525ade24016fdda5878649b9310d9c662857326d9ea0a
|
7
|
+
data.tar.gz: 6d825776dc6a23720bf90d72c9f61aed29665f19625d8c36dcd03388f751ccae3b798c38cab8c388c0f15b3b69f7fe17e42d7c52a61d7e6145e6cf3ce103d30c
|
data/CHANGELOG.md
CHANGED
data/src/foobara/ai/answer_bot/domain_mappers/open_ai_api/chat_to_generate_chat_completion.rb
CHANGED
@@ -21,7 +21,9 @@ module Foobara
|
|
21
21
|
}
|
22
22
|
|
23
23
|
if temperature
|
24
|
-
|
24
|
+
# NOTE: some models don't support temperature, like o1. Instead of possibly receiving an error
|
25
|
+
# we will set the temperature to 1 which prevents a 400. Maybe print a warning instead?
|
26
|
+
inputs[:temperature] = model_supports_temperature? ? temperature : 1
|
25
27
|
end
|
26
28
|
|
27
29
|
if model
|
@@ -42,6 +44,10 @@ module Foobara
|
|
42
44
|
def model
|
43
45
|
from[:model]
|
44
46
|
end
|
47
|
+
|
48
|
+
def model_supports_temperature?
|
49
|
+
model && model.to_s !~ /\Ao1(-|$)/
|
50
|
+
end
|
45
51
|
end
|
46
52
|
end
|
47
53
|
end
|