bitfab 0.28.4 → 0.28.5
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/{chunk-3F46BMPM.js → chunk-7UU5L64L.js} +10 -3
- package/dist/chunk-7UU5L64L.js.map +1 -0
- package/dist/index.cjs +9 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node.cjs +9 -2
- package/dist/node.cjs.map +1 -1
- package/dist/node.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3F46BMPM.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1603,7 +1603,7 @@ declare class BitfabFunction {
|
|
|
1603
1603
|
/**
|
|
1604
1604
|
* SDK version from package.json (injected at build time)
|
|
1605
1605
|
*/
|
|
1606
|
-
declare const __version__ = "0.28.
|
|
1606
|
+
declare const __version__ = "0.28.5";
|
|
1607
1607
|
|
|
1608
1608
|
/**
|
|
1609
1609
|
* Constants for the Bitfab SDK.
|
package/dist/index.d.ts
CHANGED
|
@@ -1603,7 +1603,7 @@ declare class BitfabFunction {
|
|
|
1603
1603
|
/**
|
|
1604
1604
|
* SDK version from package.json (injected at build time)
|
|
1605
1605
|
*/
|
|
1606
|
-
declare const __version__ = "0.28.
|
|
1606
|
+
declare const __version__ = "0.28.5";
|
|
1607
1607
|
|
|
1608
1608
|
/**
|
|
1609
1609
|
* Constants for the Bitfab SDK.
|
package/dist/index.js
CHANGED
package/dist/node.cjs
CHANGED
|
@@ -682,7 +682,7 @@ registerAsyncLocalStorageClass(
|
|
|
682
682
|
);
|
|
683
683
|
|
|
684
684
|
// src/version.generated.ts
|
|
685
|
-
var __version__ = "0.28.
|
|
685
|
+
var __version__ = "0.28.5";
|
|
686
686
|
|
|
687
687
|
// src/constants.ts
|
|
688
688
|
var DEFAULT_SERVICE_URL = "https://bitfab.ai";
|
|
@@ -1777,17 +1777,24 @@ function generateClientDefinitions(providers) {
|
|
|
1777
1777
|
for (const providerDef of providers) {
|
|
1778
1778
|
for (const model of providerDef.models) {
|
|
1779
1779
|
const clientName = getClientName(providerDef.provider, model.model);
|
|
1780
|
+
const temperatureOption = supportsTemperatureZero(
|
|
1781
|
+
providerDef.provider,
|
|
1782
|
+
model.model
|
|
1783
|
+
) ? "\n temperature 0" : "";
|
|
1780
1784
|
definitions.push(`client<llm> ${clientName} {
|
|
1781
1785
|
provider ${providerDef.provider}
|
|
1782
1786
|
options {
|
|
1783
1787
|
model "${model.model}"
|
|
1784
|
-
api_key env.${providerDef.apiKeyEnv}
|
|
1788
|
+
api_key env.${providerDef.apiKeyEnv}${temperatureOption}
|
|
1785
1789
|
}
|
|
1786
1790
|
}`);
|
|
1787
1791
|
}
|
|
1788
1792
|
}
|
|
1789
1793
|
return definitions.join("\n\n");
|
|
1790
1794
|
}
|
|
1795
|
+
function supportsTemperatureZero(provider, model) {
|
|
1796
|
+
return provider === "openai" && (model.startsWith("gpt-4.1") || model.startsWith("gpt-4o"));
|
|
1797
|
+
}
|
|
1791
1798
|
function withDefaultClients(bamlSource, providers) {
|
|
1792
1799
|
const hasDefaultClient = bamlSource.includes("client<llm> OpenAI_");
|
|
1793
1800
|
if (hasDefaultClient) {
|