refactor: Introduce explicit-member-accessibility lint rule (#12325)

This commit is contained in:
Iván Ovejero
2024-12-20 11:44:01 +01:00
committed by GitHub
parent e5587ff11f
commit 95db031aa4
27 changed files with 59 additions and 56 deletions

View File

@@ -32,14 +32,14 @@ class MemoryChatBufferSingleton {
this.memoryBuffer = new Map();
}
public static getInstance(): MemoryChatBufferSingleton {
static getInstance(): MemoryChatBufferSingleton {
if (!MemoryChatBufferSingleton.instance) {
MemoryChatBufferSingleton.instance = new MemoryChatBufferSingleton();
}
return MemoryChatBufferSingleton.instance;
}
public async getMemory(
async getMemory(
sessionKey: string,
memoryParams: BufferWindowMemoryInput,
): Promise<BufferWindowMemory> {

View File

@@ -11,7 +11,7 @@ export class MemoryVectorStoreManager {
this.vectorStoreBuffer = new Map();
}
public static getInstance(embeddings: Embeddings): MemoryVectorStoreManager {
static getInstance(embeddings: Embeddings): MemoryVectorStoreManager {
if (!MemoryVectorStoreManager.instance) {
MemoryVectorStoreManager.instance = new MemoryVectorStoreManager(embeddings);
} else {
@@ -27,7 +27,7 @@ export class MemoryVectorStoreManager {
return MemoryVectorStoreManager.instance;
}
public async getVectorStore(memoryKey: string): Promise<MemoryVectorStore> {
async getVectorStore(memoryKey: string): Promise<MemoryVectorStore> {
let vectorStoreInstance = this.vectorStoreBuffer.get(memoryKey);
if (!vectorStoreInstance) {
@@ -38,7 +38,7 @@ export class MemoryVectorStoreManager {
return vectorStoreInstance;
}
public async addDocuments(
async addDocuments(
memoryKey: string,
documents: Document[],
clearStore?: boolean,