MCPcopy
hub / github.com/labring/FastGPT / getVectorCountByTeamId

Function getVectorCountByTeamId

packages/service/common/vectorDB/controller.ts:168–182  ·  view source on GitHub ↗
(teamId: string)

Source from the content-addressed store, hash-verified

166
167// Count vector
168export const getVectorCountByTeamId = async (teamId: string) => {
169 const cacheCount = await teamVectorCache.get(teamId);
170 if (cacheCount !== undefined) {
171 return cacheCount;
172 }
173
174 const count = await Vector.getVectorCount({ teamId });
175
176 teamVectorCache.set({
177 teamId,
178 count
179 });
180
181 return count;
182};
183export const getVectorCount = Vector.getVectorCount;

Callers 3

controller.test.tsFile · 0.90
checkDatasetIndexLimitFunction · 0.90
handlerFunction · 0.90

Calls 3

getVectorCountMethod · 0.80
getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected