Skip to content

Commit

Permalink
Openai proxy: allow system prompt from user (#2097)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev-Khant authored Dec 19, 2024
1 parent 64c80e3 commit 7168248
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion mem0/proxy/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ def create(
def _prepare_messages(self, messages: List[dict]) -> List[dict]:
if not messages or messages[0]["role"] != "system":
return [{"role": "system", "content": MEMORY_ANSWER_PROMPT}] + messages
messages[0]["content"] = MEMORY_ANSWER_PROMPT
return messages

def _async_add_to_memory(self, messages, user_id, agent_id, run_id, metadata, filters):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mem0ai"
version = "0.1.35"
version = "0.1.36"
description = "Long-term memory for AI Agents"
authors = ["Mem0 <[email protected]>"]
exclude = [
Expand Down

0 comments on commit 7168248

Please sign in to comment.