@bitfab/sdk 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.cjs
CHANGED
|
@@ -659,7 +659,7 @@ __export(index_exports, {
|
|
|
659
659
|
module.exports = __toCommonJS(index_exports);
|
|
660
660
|
|
|
661
661
|
// src/version.generated.ts
|
|
662
|
-
var __version__ = "0.28.
|
|
662
|
+
var __version__ = "0.28.5";
|
|
663
663
|
|
|
664
664
|
// src/constants.ts
|
|
665
665
|
var DEFAULT_SERVICE_URL = "https://bitfab.ai";
|
|
@@ -1754,17 +1754,24 @@ function generateClientDefinitions(providers) {
|
|
|
1754
1754
|
for (const providerDef of providers) {
|
|
1755
1755
|
for (const model of providerDef.models) {
|
|
1756
1756
|
const clientName = getClientName(providerDef.provider, model.model);
|
|
1757
|
+
const temperatureOption = supportsTemperatureZero(
|
|
1758
|
+
providerDef.provider,
|
|
1759
|
+
model.model
|
|
1760
|
+
) ? "\n temperature 0" : "";
|
|
1757
1761
|
definitions.push(`client<llm> ${clientName} {
|
|
1758
1762
|
provider ${providerDef.provider}
|
|
1759
1763
|
options {
|
|
1760
1764
|
model "${model.model}"
|
|
1761
|
-
api_key env.${providerDef.apiKeyEnv}
|
|
1765
|
+
api_key env.${providerDef.apiKeyEnv}${temperatureOption}
|
|
1762
1766
|
}
|
|
1763
1767
|
}`);
|
|
1764
1768
|
}
|
|
1765
1769
|
}
|
|
1766
1770
|
return definitions.join("\n\n");
|
|
1767
1771
|
}
|
|
1772
|
+
function supportsTemperatureZero(provider, model) {
|
|
1773
|
+
return provider === "openai" && (model.startsWith("gpt-4.1") || model.startsWith("gpt-4o"));
|
|
1774
|
+
}
|
|
1768
1775
|
function withDefaultClients(bamlSource, providers) {
|
|
1769
1776
|
const hasDefaultClient = bamlSource.includes("client<llm> OpenAI_");
|
|
1770
1777
|
if (hasDefaultClient) {
|