Skip to content

Commit

Permalink
style:Change mem to mem0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hizeros committed Sep 6, 2024
1 parent 77cec19 commit 218155b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions example/mem0/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def main():
# todo llm default answer with cn
with st.sidebar:
mem0_user_id = st.text_input("mem0 user id", type="password")
mem_api_key = st.text_input(
mem0_api_key = st.text_input(
"mem0 API Key", key="provider_mem0_api_key", type="password"
)

Expand All @@ -30,11 +30,11 @@ def main():
st.info("Please add your model API key to continue.")
st.stop()

if not mem_api_key:
if not mem0_api_key:
st.error("Please provide your mem0 API Key to continue.")
st.stop()

ai_assistant.set_mem_api_key(mem_api_key)
ai_assistant.set_mem0_api_key(mem0_api_key)

answer = ai_assistant.ask_question(
question=prompt, user_id=mem0_user_id, config=config
Expand Down
4 changes: 2 additions & 2 deletions example/mem0/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def __init__(self):
{"role": "system", "content": "You are a personal healing AI Assistant."}
]

def set_mem_api_key(self, mem_api_key: str):
self.memory = MemoryClient(api_key=mem_api_key)
def set_mem0_api_key(self, mem0_api_key: str):
self.memory = MemoryClient(api_key=mem0_api_key)

def ask_question(self, question: str, user_id: str, config) -> str:
# Fetch previous related memories
Expand Down

0 comments on commit 218155b

Please sign in to comment.