Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/link-fail-fast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
fetch-depth: 2

Expand All @@ -17,12 +17,19 @@ jobs:
CHANGED_FILES=$(git diff-tree --name-only --diff-filter 'AM' -r HEAD^1 HEAD -- "*.md" | sed -z "s/\n$//;s/\n/' '/g")
echo "all_changed_files=${CHANGED_FILES}" >> $GITHUB_OUTPUT

- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- name: Link Checker
if: ${{ steps.changed-files.outputs.all_changed_files }}
uses: lycheeverse/lychee-action@v2.3.0
uses: lycheeverse/lychee-action@v2
with:
fail: true
failIfEmpty: false
args: --root-dir $(pwd) -E -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}'
args: --root-dir $(pwd) --cache --max-cache-age 1d -E -i -n -t 45 -- '${{ steps.changed-files.outputs.all_changed_files }}'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
17 changes: 13 additions & 4 deletions .github/workflows/link.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,32 @@ jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Download Exclude Path
run: |
curl https://raw.githubusercontent.com/pingcap/docs/master/.lycheeignore --output .lycheeignore

- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- name: Check Links
uses: lycheeverse/lychee-action@v1.6.1
uses: lycheeverse/lychee-action@v2
with:
# For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
args: -E --exclude-mail -v -i -n -t 45 -- **/*.md *.md
fail: true
failIfEmpty: false
args: --root-dir $(pwd) --cache --max-cache-age 8d -E -i -n -t 45 --exclude-path '^releases/' --exclude-path '^tidb-cloud/releases/' -- **/*.md *.md
output: out.md
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Create Issue From File
uses: peter-evans/create-issue-from-file@v4
uses: peter-evans/create-issue-from-file@v6
with:
title: Broken Link Detected
content-filepath: out.md
Expand Down
6 changes: 3 additions & 3 deletions ai/integrations/vector-search-integrate-with-langchain.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aliases: ['/zh/tidb/stable/vector-search-integrate-with-langchain/','/zh/tidb/de

> **提示**
>
> 你可以在 Jupyter Notebook 中查看完整的 [示例代码](https://github.com/langchain-ai/langchain/blob/master/docs/docs/integrations/vectorstores/tidb_vector.ipynb),或直接在 [Colab](https://colab.research.google.com/github/langchain-ai/langchain/blob/master/docs/docs/integrations/vectorstores/tidb_vector.ipynb) 在线环境中运行
> 你可以在 LangChain 文档中查看完整的[示例代码](https://docs.langchain.com/oss/python/integrations/vectorstores/tidb_vector)

## 前置条件

Expand Down Expand Up @@ -148,11 +148,11 @@ TIDB_DATABASE_URL="mysql+pymysql://<USERNAME>:<PASSWORD>@<HOST>:<PORT>/<DATABASE

#### 步骤 4.1 下载示例文档

在你的项目目录下,新建 `data/how_to/` 目录,并从 [langchain-ai/langchain](https://github.com/langchain-ai/langchain) GitHub 仓库下载示例文档 [`state_of_the_union.txt`](https://github.com/langchain-ai/langchain/blob/master/docs/docs/how_to/state_of_the_union.txt)。
在你的项目目录下,新建 `data/how_to/` 目录,并从 [langchain-ai/langchainjs](https://github.com/langchain-ai/langchainjs) GitHub 仓库下载示例文档 [`state_of_the_union.txt`](https://github.com/langchain-ai/langchainjs/blob/main/examples/state_of_the_union.txt)。

```shell
!mkdir -p 'data/how_to/'
!wget 'https://raw.githubusercontent.com/langchain-ai/langchain/master/docs/docs/how_to/state_of_the_union.txt' -O 'data/how_to/state_of_the_union.txt'
!wget 'https://raw.githubusercontent.com/langchain-ai/langchainjs/refs/heads/main/examples/state_of_the_union.txt' -O 'data/how_to/state_of_the_union.txt'
```

#### 步骤 4.2 加载并切分文档
Expand Down
6 changes: 3 additions & 3 deletions ai/integrations/vector-search-integrate-with-llamaindex.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ aliases: ['/zh/tidb/stable/vector-search-integrate-with-llamaindex/','/zh/tidb/d

> **提示**
>
> 你可以在 Jupyter Notebook 中查看完整的 [示例代码](https://github.com/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/TiDBVector.ipynb),或直接在 [Colab](https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/docs/examples/vector_stores/TiDBVector.ipynb) 在线环境中运行。
> 你可以在 Jupyter Notebook 中查看完整的 [示例代码](https://github.com/run-llama/llama_index/blob/main/docs/examples/vector_stores/TiDBVector.ipynb),或直接在 [Colab](https://colab.research.google.com/github/run-llama/llama_index/blob/main/docs/examples/vector_stores/TiDBVector.ipynb) 在线环境中运行。

## 前置条件

Expand Down Expand Up @@ -147,11 +147,11 @@ TIDB_DATABASE_URL="mysql+pymysql://<USERNAME>:<PASSWORD>@<HOST>:<PORT>/<DATABASE

#### 步骤 4.1 下载示例文档

在你的项目目录下,新建 `data/paul_graham/` 目录,并从 [run-llama/llama_index](https://github.com/run-llama/llama_index) GitHub 仓库下载示例文档 [`paul_graham_essay.txt`](https://github.com/run-llama/llama_index/blob/main/docs/docs/examples/data/paul_graham/paul_graham_essay.txt)。
在你的项目目录下,新建 `data/paul_graham/` 目录,并从 [run-llama/llama_index](https://github.com/run-llama/llama_index) GitHub 仓库下载示例文档 [`paul_graham_essay.txt`](https://github.com/run-llama/llama_index/blob/main/docs/examples/data/paul_graham/paul_graham_essay.txt)。

```shell
!mkdir -p 'data/paul_graham/'
!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/docs/examples/data/paul_graham/paul_graham_essay.txt' -O 'data/paul_graham/paul_graham_essay.txt'
!wget 'https://raw.githubusercontent.com/run-llama/llama_index/main/docs/examples/data/paul_graham/paul_graham_essay.txt' -O 'data/paul_graham/paul_graham_essay.txt'
```

#### 步骤 4.2 加载文档
Expand Down
2 changes: 1 addition & 1 deletion ticdc/ticdc-sink-to-kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ token="xxxx"

在以上配置中,`region` 和 `registry-name` 是必填项,`access-key`、`secret-access-key` 和 `token` 是可选项。最佳实践是将 AWS 连接凭证设置为环境变量或存储在 `~/.aws/credentials` 文件中,而不是将它们设置在 changefeed 的配置文件中。

更多信息,请参阅 [AWS官方文档](https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/#specifying-credentials)。
更多信息,请参阅 [AWS Go SDK V2 官方文档](https://docs.aws.amazon.com/zh_cn/sdk-for-go/v2/developer-guide/configure-gosdk.html#specifying-credentials)。

## 自定义 Kafka Sink 的 Topic 和 Partition 的分发规则

Expand Down
Loading