Skip to content

Commit f7dfa61

Browse files
committed
docs: add slides
1 parent 87327fd commit f7dfa61

17 files changed

+3546
-27
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ docs/.vitepress/cache
1212
.fuse_hidden*
1313
sdk/go/example/uni-token-example
1414
sdk/go/example/uni-token-example.exe
15+
docs/slides/about-me-impl.md

docs/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,18 @@
55
"scripts": {
66
"dev": "vitepress dev",
77
"build": "vitepress build",
8-
"serve": "vitepress serve"
8+
"serve": "vitepress serve",
9+
"dev:slides": "slidev ./slides/slides.md",
10+
"build:slides": "slidev build ./slides/slides.md --base /slides/ --out ../.vitepress/dist/slides"
911
},
1012
"dependencies": {
1113
"@vercel/analytics": "^1.5.0"
1214
},
1315
"devDependencies": {
1416
"@iconify-json/carbon": "^1.2.13",
17+
"@slidev/cli": "^52.1.0",
18+
"@slidev/theme-default": "latest",
19+
"@slidev/types": "^52.1.0",
1520
"unocss": "^66.4.2",
1621
"vitepress": "^1.6.3",
1722
"vue": "^3.5.18"

docs/slides/about-me.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@CONDITIONAL_IMPORT ./about-me-impl.md

docs/slides/assets/agents-growth.svg

Lines changed: 44 additions & 0 deletions
Loading

docs/slides/assets/how-to-profit.svg

Lines changed: 45 additions & 0 deletions
Loading

docs/slides/assets/plug.svg

Lines changed: 11 additions & 0 deletions
Loading

docs/slides/setup/preparser.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { existsSync } from 'node:fs'
2+
import { resolve } from 'node:path'
3+
import { definePreparserSetup } from '@slidev/types'
4+
5+
export default definePreparserSetup(({ filepath }) => {
6+
return [
7+
{
8+
transformRawLines(lines) {
9+
for (const i in lines) {
10+
const match = lines[i].match(/^@CONDITIONAL_IMPORT (.*)$/)
11+
if (match) {
12+
const importPath = match[1].trim()
13+
if (existsSync(resolve(filepath, '..', importPath))) {
14+
const importLines = [
15+
'---',
16+
`src: ${importPath}`,
17+
'---',
18+
'',
19+
]
20+
lines.splice(Number(i), 1, ...importLines)
21+
}
22+
else {
23+
lines[i] = `<!-- No ${importPath} -->`
24+
}
25+
}
26+
}
27+
},
28+
},
29+
]
30+
})

docs/slides/slides.md

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
---
2+
theme: default
3+
background: https://images.unsplash.com/photo-1620837953336-8274c0623a3c
4+
title: UniToken - LLM Token Solution for Local AI Agents
5+
info: |
6+
## UniToken
7+
LLM Token Solution for Local AI Agents
8+
9+
Learn more at https://docs.uni-token.app/
10+
transition: slide-left
11+
mdc: true
12+
canvasWidth: 784
13+
routerMode: hash
14+
---
15+
16+
# <span text-lightblue>Local-first</span><br> AI Token <span font-bold>Platform</span>
17+
18+
<div op-80 mt--1 mb-4>
19+
20+
</div>
21+
22+
<img src="https://docs.uni-token.app/logo-dark.png" v-drag="[597,376,40,NaN]" backdrop-blur-xs rounded-xl />
23+
24+
<div v-drag="[640,382,103,NaN]" text-2xl>
25+
UniToken
26+
</div>
27+
28+
---
29+
30+
# [Local AI Agents]{.text-primary.font-bold}[:]{.op-50} Dilemma
31+
32+
<div ml-4 text-2xl space-y-4 class="text-#ddd">
33+
<div mb-8 mt-8 ml-5>
34+
35+
36+
- Logics could run locally.
37+
- But how to get LLM APIs?
38+
39+
</div>
40+
<div><carbon-close-large text-red text-3xl mb--1 mx-2 />Too complex for <span text-red>users to provide</span></div>
41+
42+
<div>
43+
44+
<carbon-arrow-right text-3xl mx-2 mb--1 text-yellow />[Paid plans]{.text-yellow} that include token costs
45+
46+
</div>
47+
</div>
48+
49+
---
50+
51+
# Why is this bad? 😞
52+
53+
```mermaid{scale:0.85,class:'ml-8'}
54+
graph TB;
55+
U(Users) -->|&nbsp;pay monthly plan&nbsp;| A(Agent) -->|&nbsp;pay token costs&nbsp;| B(LLM Provider)
56+
```
57+
58+
<div fixed left-66 top-30>
59+
60+
- <span text-2xl>Developers [earn less]{.text-red} as [usage grows]{.text-green}</span>
61+
62+
<div op-80> The opposite of traditional apps! </div>
63+
64+
<br>
65+
66+
- <span text-2xl>[Light users]{.text-yellow} avoid high fees</span>
67+
68+
<div op-80> Tokens are paid per-agent. </div>
69+
70+
</div>
71+
72+
---
73+
74+
# Just [let users pay]{.font-bold.text-primary} for tokens directly!
75+
76+
<div />
77+
78+
<div text-xl>
79+
—— Once we make the process simple enough 😄
80+
</div>
81+
82+
<div mt-4>
83+
<table class="w-full">
84+
<thead text-sm>
85+
<tr>
86+
<th class="pb-0!"></th>
87+
<th class="pb-0! p-2 font-semibold">On first Agent</th>
88+
<th class="pb-0! p-2 font-semibold">On next Agent</th>
89+
<th class="pb-0! p-2 font-semibold">On the future...</th>
90+
<th class="pb-0!"></th>
91+
</tr>
92+
</thead>
93+
<tbody>
94+
<tr text-8px op-80>
95+
<td text-xl>
96+
Before
97+
</td>
98+
<td>
99+
<ol class="flex flex-col h-full">
100+
<li>Search for provider</li>
101+
<li>Visit <span class="font-mono text-6px">OpenRouter.ai</span></li>
102+
<li>Sign up account</li>
103+
<li>Add credits</li>
104+
<li>Create API Key</li>
105+
<li>Go back to agent</li>
106+
<li>Copy&Paste API Key</li>
107+
</ol>
108+
</td>
109+
<td align-top>
110+
<ol class="flex flex-col h-full">
111+
<li>Visit <span class="font-mono text-6px">OpenRouter.ai</span></li>
112+
<li>Sign in account</li>
113+
<li>Create API Key</li>
114+
<li>Go back to agent</li>
115+
<li>Copy&Paste API Key</li>
116+
</ol>
117+
</td>
118+
<td align-top>
119+
<ol class="flex flex-col h-full">
120+
<li>Visit <span class="font-mono text-6px">OpenRouter.ai</span></li>
121+
<li>Sign in account</li>
122+
<li>Create API Key</li>
123+
<li>Go back to agent</li>
124+
<li>Copy&Paste API Key</li>
125+
</ol>
126+
</td>
127+
<!-- <td text-sm>
128+
<div class="flex flex-col w-full">
129+
<div>...</div>
130+
</div>
131+
</td> -->
132+
</tr>
133+
<tr text-xs>
134+
<td text-xl>
135+
After
136+
</td>
137+
<td>
138+
<ol class="flex flex-col h-full">
139+
<li><span text-primary font-bold>Auto</span> open UniToken</li>
140+
<li>Sign up <span text-primary font-bold>in-app</span></li>
141+
<li>Add credits <span text-primary font-bold>in-app</span></li>
142+
<li><span text-primary font-bold>One-tap</span> auth</li>
143+
</ol>
144+
</td>
145+
<td text-lg>
146+
<span text-primary font-bold>One-tap</span> auth
147+
</td>
148+
<td text-lg>
149+
<span text-primary font-bold>One-tap</span> auth
150+
</td>
151+
<!-- <td text-sm>
152+
<div class="flex flex-col w-full">
153+
<div>...</div>
154+
</div>
155+
</td> -->
156+
</tr>
157+
</tbody>
158+
</table>
159+
</div>
160+
161+
---
162+
src: ./about-me.md
163+
---
164+
165+
---
166+
167+
# Why Now?
168+
169+
<div text-2xl>
170+
171+
- AI Agents **will** [blow up]{.font-bold.text-yellow}
172+
173+
- [But not yet!]{.text-lightblue.font-bold}
174+
175+
</div>
176+
177+
<img src="./assets/agents-growth.svg" v-drag="[183,89,554,NaN]" />
178+
179+
---
180+
181+
# How to Scale
182+
183+
<div h-6 />
184+
185+
<div flex gap-14 ml-2><div border="l solid #ccc" pl-6>
186+
187+
## Stage 1 {.text-primary}
188+
189+
Open-source <br>
190+
Local-first <br>
191+
Lightweight
192+
193+
leads to [widespread adoption]{.text-xl.font-bold.text-green}
194+
195+
</div><div border="l solid #ccc" pl-6>
196+
197+
## Stage 2 {.text-primary}
198+
199+
Become a [standard]{.text-xl.font-bold}<br>
200+
like the ["OpenAI Protocol"]{.text-xl.font-bold.text-yellow}
201+
202+
<img src="./assets/plug.svg" v-drag="[458,245,155,NaN]" />
203+
204+
</div></div>
205+
206+
---
207+
208+
<div class="fixed left-14 top-10">
209+
210+
# How to Profit
211+
212+
</div>
213+
214+
<img src="./assets/how-to-profit.svg" fixed h-102 top-4 bottom-4 />
215+
216+
---
217+
class: flex items-center justify-center
218+
---
219+
220+
<div text-2xl>
221+
222+
Thanks
223+
224+
</div>
225+
226+
---
227+
228+
<img src="https://docs.uni-token.app/arch.png" v-drag="[44,32,700,NaN]" rounded-xl />

docs/vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
{ "source": "/(.*)", "destination": "/index.html" }
55
],
66
"installCommand": "pnpm install",
7-
"buildCommand": "pnpm build",
7+
"buildCommand": "pnpm build && pnpm build:slides",
88
"outputDirectory": ".vitepress/dist"
99
}

eslint.config.mjs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ export default antfu({
44
vue: true,
55
typescript: true,
66
markdown: true,
7+
formatters: {
8+
markdown: true,
9+
css: true,
10+
slidev: {
11+
files: [
12+
'**/slides.md',
13+
],
14+
},
15+
},
716
ignores: [
817
'frontend/public/**',
918
'**/.venv/**',

0 commit comments

Comments
 (0)