Skip to content

fix: pass prompt_file_suffix through ContextManager.__init__ - #355

Open
andrewwhitecdw wants to merge 1 commit into
huggingface:mainfrom
andrewwhitecdw:andrewwhitecdw/fix/context-manager-prompt-suffix
Open

fix: pass prompt_file_suffix through ContextManager.__init__#355
andrewwhitecdw wants to merge 1 commit into
huggingface:mainfrom
andrewwhitecdw:andrewwhitecdw/fix/context-manager-prompt-suffix

Conversation

@andrewwhitecdw

Copy link
Copy Markdown

Bug

ContextManager.__init__ accepted a prompt_file_suffix argument but hardcoded "system_prompt_v3.yaml" when calling _load_system_prompt, so callers could not select a different prompt template.

Fix

Forward the provided prompt_file_suffix to _load_system_prompt.

Test

Added tests/unit/test_context_manager.py with a test that patches _load_system_prompt and asserts the provided suffix is forwarded.

Verification

uv run --extra dev pytest tests/unit/test_context_manager.py -v passes.

ContextManager accepted a prompt_file_suffix argument but hardcoded
'system_prompt_v3.yaml' when calling _load_system_prompt, so callers
could not select a different prompt template.

Adds a unit test that patches _load_system_prompt and asserts the
provided suffix is forwarded.

Signed-off-by: Andrew White <andrewh@cdw.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant