mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-29 01:41:22 +00:00
add_system_prompt() modified the message list even when the memory
lookup returned nothing (memories == "").
- If an existing system prompt was present, " \n " (whitespace) was
appended to its content.
- If no system prompt existed, a new {"role": "system", "content": ""}
message was prepended.
Both cases pollute the conversation context with empty/whitespace tokens
that waste prompt budget and can confuse models sensitive to blank
system messages.
Fix: return messages unchanged when memories is falsy.
Adds a regression test covering both cases (with and without existing
system prompt).
|
||
|---|---|---|
| .. | ||
| agent-framework-python | ||
| ai-sdk | ||
| cartesia-sdk-python | ||
| docs-test | ||
| hooks | ||
| lib | ||
| memory-graph | ||
| openai-sdk-python | ||
| pipecat-sdk-python | ||
| tools | ||
| ui | ||
| validation | ||