diff --git a/.vitepress/config/apiReferenceSidebar.ts b/.vitepress/config/apiReferenceSidebar.ts index 428d3aae..5af00533 100644 --- a/.vitepress/config/apiReferenceSidebar.ts +++ b/.vitepress/config/apiReferenceSidebar.ts @@ -29,6 +29,7 @@ const classesOrder = [ "LlamaEmbeddingContext", "LlamaEmbedding", "LlamaRankingContext", + "LlamaDecisionContext", "LlamaGrammar", "LlamaJsonSchemaGrammar", "LlamaText", diff --git a/docs/index.md b/docs/index.md index e207090f..0fd4685b 100644 --- a/docs/index.md +++ b/docs/index.md @@ -334,7 +334,7 @@ console.log({ queue: answers.team.confidence >= 0.7 ? answers.team.choice : "triage", - priority: answers.impact.score >= 1.5 + priority: answers.impact.score >= 1.5 // 0-2 range ? "high" : "normal", nextStep: answers.troubleshooted.value >= 0.8 diff --git a/src/evaluator/LlamaDecisionContext/utils/generateCriteriaChoiceOptionTokens.ts b/src/evaluator/LlamaDecisionContext/utils/generateCriteriaChoiceOptionTokens.ts index 714c4d07..3a88c631 100644 --- a/src/evaluator/LlamaDecisionContext/utils/generateCriteriaChoiceOptionTokens.ts +++ b/src/evaluator/LlamaDecisionContext/utils/generateCriteriaChoiceOptionTokens.ts @@ -35,6 +35,8 @@ export function generateCriteriaChoiceOptionTokens(min: number, max: number, tok return false; } + addRanges("09"); + if (additionalChars !== "") { for (const char of additionalChars) { if (pushCharacter(char)) @@ -42,8 +44,6 @@ export function generateCriteriaChoiceOptionTokens(min: number, max: number, tok } } - addRanges("09"); - if (res.size < min) throw new RangeError( "Failed to find enough choice options for the given criteria. " +