knowledge:update
About 572 wordsAbout 2 min
knowledge:update
Update knowledge base, used to build Issues, repository documents, etc. into the knowledge base.
Applicable Events
How it works
Fetch repository Issues & documents -> chunking -> vectorization -> into knowledge base
Parameters
The list below groups the parameters by purpose (documents / issues) for a quick overview.
- include: Files to include in the knowledge base, matched by
Glob - exclude: Files to exclude, matched by
Glob - chunkSize: Text chunk size
- chunkOverlap: Overlapping tokens between adjacent chunks
- embeddingModel: Embedding model (only
hunyuanis supported) - issueSyncEnabled: Whether to sync issues into the knowledge base
- issueState: Sync only issues of a given state (
open/closed) - issueLabels: Sync only issues with given labels
- issueExcludeLabels: Exclude issues with given labels (takes precedence)
- forceRebuild: Whether to drop the knowledge base and rebuild it
- ignoreProcessFailures: Update the knowledge base even if some files fail to process
Detailed descriptions for each parameter are provided below.
include
- type:
String|Array<String> - required:
false - default:
**/**.md
Specify which files to include, using Glob pattern matching. Defaults to **/**.md (all Markdown files). Supports arrays or comma-separated values. Supported file types: .md, .mdx, .docx, .txt, .pdf.
exclude
- type:
String|Array<String> - required:
false
Specify files to exclude using Glob patterns. By default, nothing is excluded. Supports arrays or comma-separated values.
chunkSize
- type:
Number - required:
false - default:
1500
Specify the text chunk size.
chunkOverlap
- type:
Number - required:
false - default:
0
Specify the overlapping token count between two adjacent chunks.
embeddingModel
- type:
String - required:
false - default:
hunyuan
Embedding model. Currently, only hunyuan is supported.
issueSyncEnabled
- type:
Boolean - required:
false - default:
true
Whether to enable Issue sync. If enabled, Issues from the repository will be automatically pulled and added to the knowledge base.
issueState
- type:
String - required:
false
Only sync Issues with the specified state. Defaults to all. Optional values: open | closed.
issueLabels
- type:
String|Array<String> - required:
false
Only sync Issues with the specified labels. Defaults to all. Supports arrays or comma-separated values.
issueExcludeLabels
- type:
String|Array<String> - required:
false
Exclude Issues with the specified labels. By default, no Issues are excluded. Supports arrays or comma-separated values. When overlapping with issueLabels, exclude takes priority.
forceRebuild
- type:
Boolean - required:
false - default:
false
Whether to delete and rebuild the knowledge base. When set to true, the knowledge base is deleted and created afresh.
ignoreProcessFailures
- type:
Boolean - required:
false - default:
false
Whether to ignore document processing failures. If set to true, the knowledge base will update even if some documents failed to process.
Configuration Examples
Basic Usage
main:
push:
- stages:
- name: build knowledge base
type: knowledge:update
options:
include: "**/**.md"