@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.
Files changed (2) hide show
  1. package/generate.js +5 -2
  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 (typeof temperature==="undefined") {
168
- body.temperature = 0.7
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/large-language-model",
3
- "version": "0.8.3",
3
+ "version": "0.8.4",
4
4
  "description": "Large language models and functionality for Saltcorn",
5
5
  "main": "index.js",
6
6
  "dependencies": {