cli hotfix

This commit is contained in:
Vivian Fang
2023-10-23 13:48:05 -07:00
parent 68e422f56f
commit 39b545f869
2 changed files with 6 additions and 7 deletions

View File

@@ -37,6 +37,7 @@ class Config:
self.agent_save_file = None
self.persistence_manager_save_file = None
self.host = os.getenv("OPENAI_API_BASE")
self.index = None
@classmethod
async def legacy_flags_init(
@@ -59,10 +60,7 @@ class Config:
self.compute_embeddings = compute_embeddings
recompute_embeddings = self.compute_embeddings
if self.archival_storage_index:
recompute_embeddings = questionary.confirm(
f"Would you like to recompute embeddings? Do this if your files have changed.\nFiles:{self.archival_storage_files}",
default=False,
)
recompute_embeddings = False # TODO Legacy support -- can't recompute embeddings on a path that's not specified.
if self.archival_storage_files:
await self.configure_archival_storage(recompute_embeddings)
return self

View File

@@ -202,8 +202,9 @@ async def main():
memgpt_persona,
human_persona,
load_type="folder",
archival_storage_index=FLAGS.archival_storage_index,
compute_embeddings=False,
archival_storage_files=FLAGS.archival_storage_faiss_path,
archival_storage_index=FLAGS.archival_storage_faiss_path,
compute_embeddings=True,
)
elif FLAGS.archival_storage_files_compute_embeddings:
print(model)
@@ -273,7 +274,7 @@ async def main():
)
return
if cfg.archival_storage_index:
if cfg.index:
persistence_manager = InMemoryStateManagerWithFaiss(
cfg.index, cfg.archival_database
)