mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-30 15:01:31 +00:00
fix:memory create collection bug
This commit is contained in:
parent
4c6386ad3f
commit
2991c7e437
@ -311,7 +311,7 @@ class OceanBaseStore(VectorStoreBase):
|
||||
def create_collection(self, collection_name: str, **kwargs) -> Any:
|
||||
"""Create the collection."""
|
||||
embeddings = self.embedding_function.embed_documents([collection_name])
|
||||
raise self._create_table_with_index(embeddings)
|
||||
return self._create_table_with_index(embeddings)
|
||||
|
||||
def load_document(self, chunks: List[Chunk]) -> List[str]:
|
||||
"""Load document in vector database."""
|
||||
|
@ -142,7 +142,10 @@ class MultiAgents(BaseComponent, ABC):
|
||||
).create()
|
||||
|
||||
storage_manager = StorageManager.get_instance(self.system_app)
|
||||
vector_store = storage_manager.create_vector_store(index_name="_agent_memory_")
|
||||
index_name = "_agent_memory_"
|
||||
vector_store = storage_manager.create_vector_store(index_name=index_name)
|
||||
if not vector_store.vector_name_exists():
|
||||
vector_store.create_collection(collection_name=index_name)
|
||||
embeddings = EmbeddingFactory.get_instance(self.system_app).create()
|
||||
short_term_memory = EnhancedShortTermMemory(
|
||||
embeddings, executor=executor, buffer_size=10
|
||||
|
Loading…
Reference in New Issue
Block a user