Skip to content

Commit 7833e16

Browse files
authored
missing session prompt in default configuration (MemMachine#760)
fixes a missing default configuration value for the session prompt field, which is required by semantic memory. The default value is now set to ["profile_prompt"] instead of an empty list. Key Changes: - Updated the default value for PromptConf.session from an empty list to ["profile_prompt"] - Added test assertions to verify both session and profile prompts contain "profile_prompt"]
1 parent b04db65 commit 7833e16

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/memmachine/common/configuration/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class PromptConf(YamlSerializableMixin):
9696
description="The default prompts to use for semantic role memory",
9797
)
9898
session: list[str] = Field(
99-
default=[],
99+
default=["profile_prompt"],
100100
description="The default prompts to use for semantic session memory",
101101
)
102102
episode_summary_system_prompt_path: str = Field(

tests/memmachine/installation/test_configuration_wizard.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ def test_configuration_with_prompt(mock_input, conf_args):
6060
assert embedder.api_key.get_secret_value() == "api_key_value"
6161
assert embedder.base_url == "https://api.my-openai.com/v1"
6262
assert embedder.dimensions == 1536
63+
prompt = config.prompt
64+
assert "profile_prompt" in prompt.session
65+
assert "profile_prompt" in prompt.profile
6366

6467

6568
@patch("builtins.input")

0 commit comments

Comments
 (0)