feat: update docs and components, fix DLQ demo bug

This commit is contained in:
sanbuphy
2026-01-18 12:21:49 +08:00
parent 26ed39e1eb
commit e41063a1cd
159 changed files with 54236 additions and 2525 deletions
@@ -35,11 +35,9 @@
>|</span
></code></pre>
<div v-else>
{{ msg.content }}<span
v-if="
isGenerating &&
index === messages.length - 1
"
{{ msg.content
}}<span
v-if="isGenerating && index === messages.length - 1"
class="cursor"
>|</span
>
@@ -46,8 +46,16 @@
<h3 class="stage-title">Step 1: Tokenization (分词)</h3>
<p class="stage-desc">
计算机首先将文本切分为最小的语义单位Token
<span style="font-size: 0.85em; color: var(--vp-c-text-2); display: block; margin-top: 4px;">
(此处演示简化为按字切分真实模型通常使用 BPE 算法人工智能可能合并为一个 Token)
<span
style="
font-size: 0.85em;
color: var(--vp-c-text-2);
display: block;
margin-top: 4px;
"
>
(此处演示简化为按字切分真实模型通常使用 BPE
算法人工智能可能合并为一个 Token)
</span>
</p>
<div class="token-container">
@@ -181,7 +189,7 @@ const getHeatmapColor = (val) => {
// val is -1 to 1
// Map to blue (negative) -> white (0) -> red (positive)
// Reduce max opacity to avoid confusion with "selection" or "special token"
const opacity = Math.abs(val) * 0.6 + 0.1
const opacity = Math.abs(val) * 0.6 + 0.1
if (val > 0) return `rgba(239, 68, 68, ${opacity})` // Red
return `rgba(59, 130, 246, ${opacity})` // Blue
}