@blank-utils/llm 0.4.16 → 0.4.18
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.
|
@@ -1063,7 +1063,11 @@ ${newText}` : newText);
|
|
|
1063
1063
|
try {
|
|
1064
1064
|
const captioner = await captionerPromiseRef.current;
|
|
1065
1065
|
if (captioner) {
|
|
1066
|
-
const out = await captioner(dataUrl
|
|
1066
|
+
const out = await captioner(dataUrl, {
|
|
1067
|
+
max_new_tokens: 100,
|
|
1068
|
+
num_beams: 4,
|
|
1069
|
+
repetition_penalty: 1.5
|
|
1070
|
+
});
|
|
1067
1071
|
console.log("[ImagePipeline] Raw captioner output:", out);
|
|
1068
1072
|
if (Array.isArray(out) && out[0] && out[0].generated_text) {
|
|
1069
1073
|
extractedText = out[0].generated_text;
|
|
@@ -1619,7 +1623,15 @@ ${systemPrompt}` : systemPrompt;
|
|
|
1619
1623
|
mermaid: mermaidOptions,
|
|
1620
1624
|
controls: streamdownControls,
|
|
1621
1625
|
parseMarkdownIntoBlocksFn: sanitizeMarkdownLanguageBlocks,
|
|
1622
|
-
children:
|
|
1626
|
+
children: [
|
|
1627
|
+
{ match: "\u{1F4C4} PDF:", index: msg.content.indexOf("\u{1F4C4} PDF:") },
|
|
1628
|
+
{ match: "\u{1F4C4} SVG Source Code", index: msg.content.indexOf("\u{1F4C4} SVG Source Code") },
|
|
1629
|
+
{ match: "\u{1F5BC}\uFE0F Image Auto-Caption", index: msg.content.indexOf("\u{1F5BC}\uFE0F Image Auto-Caption") }
|
|
1630
|
+
].filter((m) => m.index !== -1).reduce((min, m) => m.index < min ? m.index : min, msg.content.length) !== msg.content.length ? msg.content.substring(0, [
|
|
1631
|
+
{ match: "\u{1F4C4} PDF:", index: msg.content.indexOf("\u{1F4C4} PDF:") },
|
|
1632
|
+
{ match: "\u{1F4C4} SVG Source Code", index: msg.content.indexOf("\u{1F4C4} SVG Source Code") },
|
|
1633
|
+
{ match: "\u{1F5BC}\uFE0F Image Auto-Caption", index: msg.content.indexOf("\u{1F5BC}\uFE0F Image Auto-Caption") }
|
|
1634
|
+
].filter((m) => m.index !== -1).reduce((min, m) => m.index < min ? m.index : min, msg.content.length)).trim() : msg.content
|
|
1623
1635
|
}
|
|
1624
1636
|
) })
|
|
1625
1637
|
] }) : /* @__PURE__ */ jsxs3("div", { className: "prose prose-base dark:prose-invert max-w-none py-2 w-full min-w-0 font-mono bg-transparent mt-2 !text-current", children: [
|
package/dist/index.js
CHANGED
package/dist/react/index.js
CHANGED
package/package.json
CHANGED