cli hotfix
This commit is contained in:
@@ -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
|
||||
|
||||
7
main.py
7
main.py
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user