call-ai 0.10.1 → 0.10.2
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/dist/api.js +8 -2
- package/package.json +2 -2
package/dist/api.js
CHANGED
|
@@ -326,10 +326,16 @@ function prepareRequestParams(prompt, options) {
|
|
|
326
326
|
const requestParams = {
|
|
327
327
|
model,
|
|
328
328
|
messages,
|
|
329
|
-
temperature: options.temperature !== undefined ? options.temperature : 0.7,
|
|
330
|
-
top_p: options.topP !== undefined ? options.topP : 1,
|
|
331
329
|
stream: options.stream !== undefined ? options.stream : false,
|
|
332
330
|
};
|
|
331
|
+
// Only include temperature if explicitly set
|
|
332
|
+
if (options.temperature !== undefined) {
|
|
333
|
+
requestParams.temperature = options.temperature;
|
|
334
|
+
}
|
|
335
|
+
// Only include top_p if explicitly set
|
|
336
|
+
if (options.topP !== undefined) {
|
|
337
|
+
requestParams.top_p = options.topP;
|
|
338
|
+
}
|
|
333
339
|
// Only include max_tokens if explicitly set
|
|
334
340
|
if (options.maxTokens !== undefined) {
|
|
335
341
|
requestParams.max_tokens = options.maxTokens;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "call-ai",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Lightweight library for making AI API calls with streaming support",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"browser": "dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"typecheck": "tsc --noEmit",
|
|
26
26
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
27
27
|
"coverage": "jest --coverage",
|
|
28
|
-
"check": "npm run typecheck && npm run format && npm run test"
|
|
28
|
+
"check": "npm run typecheck && npm run format && npm run test && npm run build"
|
|
29
29
|
},
|
|
30
30
|
"keywords": [
|
|
31
31
|
"ai",
|