@aryacode/dsh-local-llm 0.8.5 → 0.8.6
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/lib/index.d.ts +7 -4
- package/lib/index.js +9 -6
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1610,10 +1610,13 @@ declare const LIBRARY_PROVIDER = "local-library";
|
|
|
1610
1610
|
/**
|
|
1611
1611
|
* The per-request output default this adapter publishes for one model.
|
|
1612
1612
|
*
|
|
1613
|
-
*
|
|
1614
|
-
*
|
|
1615
|
-
*
|
|
1616
|
-
*
|
|
1613
|
+
* It scales with the window the engine actually serves: a quarter of it, floored
|
|
1614
|
+
* at 1,024 tokens and bounded by the engine's own allowance when one is known.
|
|
1615
|
+
* A fixed 8K used to cap every model here, which silently truncated long answers
|
|
1616
|
+
* and made a 100K- or 256K-token engine behave like an 8K one.
|
|
1617
|
+
*
|
|
1618
|
+
* @param context - the model's served context window in tokens.
|
|
1619
|
+
* @param ceiling - the engine's maximum response allowance, when it declares one.
|
|
1617
1620
|
*/
|
|
1618
1621
|
declare function outputDefault(context: number, ceiling?: number): number;
|
|
1619
1622
|
/** Where the Strata engine's own OpenAI-compatible surface answers, and how to authorize it. */
|
package/lib/index.js
CHANGED
|
@@ -2605,13 +2605,16 @@ const LIBRARY_PROVIDER = "local-library";
|
|
|
2605
2605
|
/**
|
|
2606
2606
|
* The per-request output default this adapter publishes for one model.
|
|
2607
2607
|
*
|
|
2608
|
-
*
|
|
2609
|
-
*
|
|
2610
|
-
*
|
|
2611
|
-
*
|
|
2608
|
+
* It scales with the window the engine actually serves: a quarter of it, floored
|
|
2609
|
+
* at 1,024 tokens and bounded by the engine's own allowance when one is known.
|
|
2610
|
+
* A fixed 8K used to cap every model here, which silently truncated long answers
|
|
2611
|
+
* and made a 100K- or 256K-token engine behave like an 8K one.
|
|
2612
|
+
*
|
|
2613
|
+
* @param context - the model's served context window in tokens.
|
|
2614
|
+
* @param ceiling - the engine's maximum response allowance, when it declares one.
|
|
2612
2615
|
*/
|
|
2613
|
-
function outputDefault(context, ceiling =
|
|
2614
|
-
return Math.max(1024, Math.min(ceiling,
|
|
2616
|
+
function outputDefault(context, ceiling = Number.POSITIVE_INFINITY) {
|
|
2617
|
+
return Math.max(1024, Math.min(ceiling, Math.floor(context / 4)));
|
|
2615
2618
|
}
|
|
2616
2619
|
/** Thinking levels a chat-template engine can be asked for through its template kwargs. */
|
|
2617
2620
|
const strataReasoning = {
|