(teamId: string)
| 166 | |
| 167 | // Count vector |
| 168 | export 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 | }; |
| 183 | export const getVectorCount = Vector.getVectorCount; |
no test coverage detected