Documentation
¶
Index ¶
- func DeleteChunkByIdWithTx(ctx context.Context, tx *gorm.DB, id string) error
- func DeleteChunksByDocumentIdWithTx(ctx context.Context, tx *gorm.DB, documentId string) error
- func DeleteDocumentDataOnly(ctx context.Context, documentId string, vectorStore vector_store.VectorStore) error
- func DeleteDocumentWithTx(ctx context.Context, tx *gorm.DB, id string) error
- func GetChunkById(ctx context.Context, id string) (chunk gormModel.KnowledgeChunks, err error)
- func GetChunksList(ctx context.Context, where gormModel.KnowledgeChunks, page, size int) (list []gormModel.KnowledgeChunks, total int, err error)
- func GetDocumentById(ctx context.Context, id string) (document gormModel.KnowledgeDocuments, err error)
- func GetDocumentBySHA256(ctx context.Context, knowledgeId, sha256 string) (document gormModel.KnowledgeDocuments, err error)
- func GetDocumentsList(ctx context.Context, where gormModel.KnowledgeDocuments, page int, ...) (documents []gormModel.KnowledgeDocuments, total int, err error)
- func SaveChunksData(ctx context.Context, documentsId string, chunks []gormModel.KnowledgeChunks) error
- func SaveDocumentsInfoWithTx(ctx context.Context, tx *gorm.DB, documents gormModel.KnowledgeDocuments) (documentsSave gormModel.KnowledgeDocuments, err error)
- func UpdateChunkByIdsWithTx(ctx context.Context, tx *gorm.DB, ids []string, data gormModel.KnowledgeChunks) error
- func UpdateDocumentsStatus(ctx context.Context, documentsId string, status int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteChunkByIdWithTx ¶
DeleteChunkByIdWithTx 根据ID删除知识块
func DeleteChunksByDocumentIdWithTx ¶
DeleteChunksByDocumentIdWithTx 根据文档ID删除该文档的所有chunks
func DeleteDocumentDataOnly ¶
func DeleteDocumentDataOnly(ctx context.Context, documentId string, vectorStore vector_store.VectorStore) error
DeleteDocumentDataOnly deletes the chunks data for the specified document, but keeps the document record
func DeleteDocumentWithTx ¶
DeleteDocumentWithTx 删除文档及其相关数据
func GetChunkById ¶
GetChunkById 根据ID查询单个知识块
func GetChunksList ¶
func GetChunksList(ctx context.Context, where gormModel.KnowledgeChunks, page, size int) (list []gormModel.KnowledgeChunks, total int, err error)
GetChunksList 查询知识块列表
func GetDocumentById ¶
func GetDocumentById(ctx context.Context, id string) (document gormModel.KnowledgeDocuments, err error)
GetDocumentById 根据ID获取文档信息
func GetDocumentBySHA256 ¶
func GetDocumentBySHA256(ctx context.Context, knowledgeId, sha256 string) (document gormModel.KnowledgeDocuments, err error)
GetDocumentBySHA256 根据知识库ID和SHA256获取文档信息
func GetDocumentsList ¶
func GetDocumentsList(ctx context.Context, where gormModel.KnowledgeDocuments, page int, pageSize int) (documents []gormModel.KnowledgeDocuments, total int, err error)
GetDocumentsList 获取文档列表
func SaveChunksData ¶
func SaveChunksData(ctx context.Context, documentsId string, chunks []gormModel.KnowledgeChunks) error
SaveChunksData 批量保存知识块数据
func SaveDocumentsInfoWithTx ¶
func SaveDocumentsInfoWithTx(ctx context.Context, tx *gorm.DB, documents gormModel.KnowledgeDocuments) (documentsSave gormModel.KnowledgeDocuments, err error)
SaveDocumentsInfoWithTx 保存文档信息
func UpdateChunkByIdsWithTx ¶
func UpdateChunkByIdsWithTx(ctx context.Context, tx *gorm.DB, ids []string, data gormModel.KnowledgeChunks) error
UpdateChunkByIdsWithTx 根据ID更新知识块
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.