Skip to content

Commit 4e2f5a5

Browse files
committed
feat: 增加文档vitepress 兼容性
1 parent f0d6f6d commit 4e2f5a5

39 files changed

Lines changed: 3381 additions & 2131 deletions

.github/workflows/deploy.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy VitePress to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Setup pnpm
22+
uses: pnpm/action-setup@v4
23+
with:
24+
version: 9
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: 18
30+
cache: pnpm
31+
32+
- name: Install deps
33+
run: pnpm install
34+
35+
- name: Build
36+
run: pnpm docs:build
37+
38+
- name: Setup Pages
39+
uses: actions/configure-pages@v4
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: .vitepress/dist
45+
46+
- name: Deploy
47+
uses: actions/deploy-pages@v4

.vitepress/config.mts

Lines changed: 0 additions & 92 deletions
This file was deleted.

.vitepress/config.ts

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
import {defineConfig} from 'vitepress'
2+
3+
// https://vitepress.dev/reference/site-config
4+
export default defineConfig({
5+
6+
title: "技术笔记",
7+
description: "Kayn的个人技术笔记",
8+
lastUpdated: true,
9+
themeConfig: {
10+
// https://vitepress.dev/reference/default-theme-config
11+
// search: {
12+
// provider: 'local'
13+
// },
14+
nav: [
15+
{text: 'Home', link: '/'},
16+
{text: 'Examples', link: '/markdown-examples'},
17+
{text: 'Skills', link: '/skills'},
18+
{text: 'AI', link: '/AI'}
19+
],
20+
search: {
21+
provider: 'local'
22+
},
23+
outline: {
24+
level: [1, 2],
25+
label: "目录",
26+
27+
},
28+
docFooter: {
29+
prev: '上一页',
30+
next: '下一页',
31+
},
32+
sidebar: [
33+
{text: 'Introduction', link: '/README'},
34+
{text: 'Home', link: '/'},
35+
{
36+
text: '计算机科学',
37+
items: [
38+
{text: 'Python', link: '/Python程序设计语言'},
39+
{text: '工程实践', link: '/工程实践'},
40+
{text: '编程技术', link: '/编程技术'},
41+
{text: '程序原理', link: '/程序原理'},
42+
{text: '系统设计', link: '/系统设计'},
43+
],
44+
collapsed: false,
45+
},
46+
{
47+
text: 'Examples',
48+
items: [
49+
{text: 'Markdown Examples', link: '/markdown-examples'},
50+
{text: 'Runtime API Examples', link: '/api-examples'}
51+
],
52+
collapsed: true,
53+
},
54+
{
55+
text: 'AI',
56+
items: [
57+
{text: 'AI', link: '/AI'},
58+
{text: 'AI最佳实践', link: '/AI最佳实践'}
59+
],
60+
collapsed: true,
61+
},
62+
{
63+
text: '系统设计',
64+
items: [
65+
{text: '系统设计', link: '/系统设计'},
66+
],
67+
collapsed: true,
68+
},
69+
{
70+
text: 'skills',
71+
items: [
72+
{text: 'uv', link: '/skills/uv'},
73+
],
74+
collapsed: true,
75+
},
76+
{
77+
text: 'Python',
78+
items: [
79+
{text: 'Python', link: '/Python程序设计语言'},
80+
{text: '最佳实践', link: '/Python最佳实践'}
81+
],
82+
collapsed: true,
83+
},
84+
{
85+
text: 'Infra',
86+
items: [
87+
{text: 'Python', link: '/Python程序设计语言'},
88+
{text: 'AI最佳实践', link: '/最佳实践'}
89+
],
90+
collapsed: true,
91+
},
92+
],
93+
returnToTopLabel: '回到顶部',
94+
sidebarMenuLabel: '菜单',
95+
darkModeSwitchLabel: '主题',
96+
lightModeSwitchTitle: '切换到浅色模式',
97+
darkModeSwitchTitle: '切换到深色模式',
98+
socialLinks: [
99+
{icon: 'github', link: 'https://github.com/wwfyde/TechNotes'}
100+
],
101+
102+
footer: {
103+
message: 'Released under the MIT License.',
104+
copyright: 'Copyright © 2019-present Evan You'
105+
}
106+
}
107+
})

AI-Papers.md

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1 @@
1-
# Papers
21

3-
## llya 30
4-
5-
## 多模态
6-
7-
### 具身智能经典:PaLM-E,基于图文VLM的具身VQA任务推理模型
8-
9-
### PaLM-E: An Embodied Multimodal Language Model
10-
11-
> [!tip]
12-
>
13-
> [具身智能经典:PaLM-E,基于图文VLM的具身VQA任务推理模型](https://mp.weixin.qq.com/s/zQ9h59t5H5HLfZ0WmVRE4A)
14-
15-
### Spectral Torical Band Inequalities and Generalizations of the Schoen-Yau Black Hole Existence Theorem
16-
17-
https://arxiv.org/abs/2301.08270
18-
19-
### Language Is Not All You Need: Aligning Perception with Language Models
20-
21-
https://arxiv.org/abs/2302.14045
22-
23-
# Attention is All You Need
24-
## quickstart
25-
26-
### concepts
27-
- attention mechanism
28-
- self-attention
29-
- multi-headed sel-attention(多头自注意力机制)
30-
- encoder-dcoder 多头输入, 逐个输出
31-
- auto-regressive(自回归): 过去时刻的输出可以作为当前时刻的输入
32-
- positional encoding(位置编码)
33-
- $LayerNorm(x + Sublayer(x))$
34-
35-
## Architecture
36-
encoder-decoder architecture
37-
38-
39-
40-
二维矩阵(batch, feature)
41-
42-
三维矩阵(batch, sequence, feature)
43-
44-
$X=[x1,x2,...,xn]$, 为 $ \mu = \frac{1}{n} \sum_{i=1}^n x_i $,标准化后的值变为 $ x_i' = x_i - \mu $。
45-
46-
通过除以数据的标准差(方差的平方根),将数据的分散程度缩放到1。这样可以消除不同数据尺度(单位或范围)的差异。
47-
48-
标准差 $ \sigma = \sqrt{\frac{1}{n} \sum_{i=1}^n (x_i - \mu)^2} $,标准化后的值变为 $ x_i'' = \frac{x_i'}{\sigma} = \frac{x_i - \mu}{\sigma} $。

API.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
- URI是资源的标识符
124124
- 大多数情况下, URI对客户端来说是模糊的(opaque)
125125
- URL(统一资源定位器, Uniform Resource Locator)
126-
- <scheme>://<domain>/<path>/<resource>
126+
- `<scheme>://<domain>/<path>/<resource>`
127127
-
128128
- Resource(资源): 任意可以用URI来表示的东西
129129
- HTML页面
@@ -136,7 +136,6 @@
136136
- 消息体
137137
- 报文头
138138
- HTTP统一接口: 介于客户端和资源之间的协议
139-
-
140139
- 应用状态(Application State):
141140
- 每个表述都反应了应用程序中用户交互的状态
142141
- 应用程序在请求前或响应后的状态, 每执行一次HTTP请求都应该会发生应用状态转移
@@ -602,3 +601,35 @@ In the above example, a request to an analytics endpoint was made with an invali
602601
}
603602
```
604603

604+
605+
606+
## 错误码
607+
608+
609+
610+
> [错误码](https://klingai.com/document-api/apiReference/commonInfo)
611+
612+
| HTTP状态码 | 业务码 | 业务码定义 | 业务码解释 | 建议解决方案 |
613+
| :--------: | :----: | :----------: | :-------------------------------: | :---------------------------------------------: |
614+
| 200 | 0 | 请求成功 | - | - |
615+
| 401 | 1000 | 身份验证失败 | 身份验证失败 | 检查Authorization是否正确 |
616+
| 401 | 1001 | 身份验证失败 | Authorization为空 | 在 Request Header 中填写正确的 Authorization |
617+
| 401 | 1002 | 身份验证失败 | Authorization值非法 | 在 Request Header 中填写正确的 Authorization |
618+
| 401 | 1003 | 身份验证失败 | Authorization未到有效时间 | 检查token的开始生效时间,等待生效或重新签发 |
619+
| 401 | 1004 | 身份验证失败 | Authorization已失效 | 检查token的有效期,重新签发 |
620+
| 429 | 1100 | 账户异常 | 账户异常 | 检查账户配置信息 |
621+
| 429 | 1101 | 账户异常 | 账户欠费 (后付费场景) | 进行账户充值,确保余额充足 |
622+
| 429 | 1102 | 账户异常 | 资源包已用完/已过期(预付费场景) | 购买额外的资源包,或开通后付费服务(如有) |
623+
| 403 | 1103 | 账户异常 | 请求的资源无权限,如接口/模型 | 检查账户权限 |
624+
| 400 | 1200 | 请求参数非法 | 请求参数非法 | 检查请求参数是否正确 |
625+
| 400 | 1201 | 请求参数非法 | 参数非法,如key写错或value非法 | 参考返回体中message字段的具体信息,修改请求参数 |
626+
| 404 | 1202 | 请求参数非法 | 请求的 method 无效 | 查看接口文档,使用正确的 request method |
627+
| 404 | 1203 | 请求参数非法 | 请求的资源不存在,如模型 | 参考返回体中message字段的具体信息,修改请求参数 |
628+
| 400 | 1300 | 触发策略 | 触发平台策略 | 检查是否触发平台策略 |
629+
| 400 | 1301 | 触发策略 | 触发平台的内容安全策略 | 检查输入内容,修改后重新发起请求 |
630+
| 429 | 1302 | 触发策略 | API请求过快,超过平台速率限制 | 降低请求频率、稍后重试,或联系客服增加限额 |
631+
| 429 | 1303 | 触发策略 | 并发或QPS超出预付费资源包限制 | 降低请求频率、稍后重试,或联系客服增加限额 |
632+
| 429 | 1304 | 触发策略 | 触发平台的IP白名单策略 | 联系客服 |
633+
| 500 | 5000 | 内部错误 | 服务器内部错误 | 稍后重试,或联系客服 |
634+
| 503 | 5001 | 内部错误 | 服务器暂时不可用,通常是在维护 | 稍后重试,或联系客服 |
635+
| 504 | 5002 | 内部错误 | 服务器内部超时,通常是发生积压 | 稍后重试,或联系客服 |

0 commit comments

Comments
 (0)