feat(knowledge): add optional channel parameter to CreateKnowledgeFromFile

- Updated the CreateKnowledgeFromFile function to include a new optional `channel` parameter, allowing for better tracking of knowledge entry sources.
- Enhanced documentation to reflect the addition of the channel parameter, improving clarity for future developers.
This commit is contained in:
wizardchen
2026-03-24 20:05:37 +08:00
committed by lyingbug
parent 5245475e0f
commit 164c39444d
2 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ func ExampleUsage() {
"source": "local",
"type": "document",
}
knowledge, err := apiClient.CreateKnowledgeFromFile(context.Background(), createdKB.ID, filePath, metadata, nil, "")
knowledge, err := apiClient.CreateKnowledgeFromFile(context.Background(), createdKB.ID, filePath, metadata, nil, "", "")
if err != nil {
fmt.Printf("Failed to upload knowledge file: %v\n", err)
} else {