MCPcopy Create free account
hub / github.com/53AI/53AIHub / refreshEntityScopeNarrowLibraries

Method refreshEntityScopeNarrowLibraries

api/service/rag/search.go:989–1002  ·  view source on GitHub ↗
(eid int64, result *EntityScopeNarrowResult)

Source from the content-addressed store, hash-verified

987}
988
989func (s *SearchService) refreshEntityScopeNarrowLibraries(eid int64, result *EntityScopeNarrowResult) {
990 if result == nil {
991 return
992 }
993
994 result.NarrowedLibraries = entityScopeNarrowLibrariesFromIDs(result.NarrowedLibraryIDs)
995 libraries, err := s.buildEntityScopeNarrowLibraries(eid, result.NarrowedLibraryIDs)
996 if err != nil {
997 logger.SysDebugf("【实体范围】知识库名称加载失败: eid=%d, library_count=%d, err=%v",
998 eid, len(result.NarrowedLibraryIDs), err)
999 return
1000 }
1001 result.NarrowedLibraries = libraries
1002}
1003
1004func (s *SearchService) buildEntityScopeNarrowLibraries(eid int64, libraryIDs []int64) ([]EntityScopeNarrowLibrary, error) {
1005 if len(libraryIDs) == 0 {

Callers 1

PreprocessEntityScopeMethod · 0.95

Tested by

no test coverage detected