Skip to content

Commit f6ec2ed

Browse files
authored
fix changing models bug
there bug in utils function which is when set model name to gemini or any other model name it don't effect this functions and remain gpt-4o-mini to solve this i will set variable name to model name model=os.environ.get("llm_model") or model in each function
1 parent 9c1187f commit f6ec2ed

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

memoryos-pypi/memoryos.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def __init__(self, user_id: str,
4444
self.assistant_id = assistant_id
4545
self.data_storage_path = os.path.abspath(data_storage_path)
4646
self.llm_model = llm_model
47+
os.environ["llm_model"]= llm_model
4748
self.mid_term_similarity_threshold = mid_term_similarity_threshold
4849

4950
print(f"Initializing Memoryos for user '{self.user_id}' and assistant '{self.assistant_id}'. Data path: {self.data_storage_path}")
@@ -328,4 +329,4 @@ def force_mid_term_analysis(self):
328329
self.mid_term_heat_threshold = original_threshold # Restore original threshold
329330

330331
def __repr__(self):
331-
return f"<Memoryos user_id='{self.user_id}' assistant_id='{self.assistant_id}' data_path='{self.data_storage_path}'>"
332+
return f"<Memoryos user_id='{self.user_id}' assistant_id='{self.assistant_id}' data_path='{self.data_storage_path}'>"

0 commit comments

Comments
 (0)