@saltcorn/large-language-model 0.8.3 → 0.8.4
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.
- package/generate.js +5 -2
- package/package.json +1 -1
package/generate.js
CHANGED
|
@@ -164,9 +164,12 @@ const getCompletionOpenAICompatible = async (
|
|
|
164
164
|
if (rest.temperature || temperature) {
|
|
165
165
|
const str_or_num = rest.temperature || temperature;
|
|
166
166
|
body.temperature = +str_or_num;
|
|
167
|
-
} else if (
|
|
168
|
-
body.temperature
|
|
167
|
+
} else if (rest.temperature === null) {
|
|
168
|
+
delete body.temperature;
|
|
169
|
+
} else if (typeof temperature === "undefined") {
|
|
170
|
+
body.temperature = 0.7;
|
|
169
171
|
}
|
|
172
|
+
|
|
170
173
|
if (responses_api) {
|
|
171
174
|
for (const tool of body.tools || []) {
|
|
172
175
|
if (tool.type !== "function") continue;
|