fix: pin snapshot context in system prompt
This commit is contained in:
parent
5f8b807cfa
commit
57fdf2e135
@ -60,9 +60,10 @@ class LLMClient:
|
||||
|
||||
|
||||
def build_messages(system: str, prompt: str, *, context: str | None = None) -> list[dict[str, str]]:
|
||||
messages: list[dict[str, str]] = [{"role": "system", "content": system}]
|
||||
system_content = system
|
||||
if context:
|
||||
messages.append({"role": "user", "content": "Context (grounded):\n" + context})
|
||||
system_content = system_content + "\n\nContext (grounded facts):\n" + context
|
||||
messages: list[dict[str, str]] = [{"role": "system", "content": system_content}]
|
||||
messages.append({"role": "user", "content": prompt})
|
||||
return messages
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user