fix: remove {{ }} from placeholder keys before resolution
Placeholder resolver returns keys with {{ }} wrappers,
but resolve_placeholders expects clean keys.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
afc70b5a95
commit
ba92d66880
|
|
@ -380,7 +380,12 @@ async def execute_prompt_with_data(
|
||||||
# This makes old-style prompts work with the new executor
|
# This makes old-style prompts work with the new executor
|
||||||
try:
|
try:
|
||||||
processed_placeholders = get_placeholder_example_values(profile_id)
|
processed_placeholders = get_placeholder_example_values(profile_id)
|
||||||
variables.update(processed_placeholders)
|
# Remove {{ }} from keys (placeholder_resolver returns them with wrappers)
|
||||||
|
cleaned_placeholders = {
|
||||||
|
key.replace('{{', '').replace('}}', ''): value
|
||||||
|
for key, value in processed_placeholders.items()
|
||||||
|
}
|
||||||
|
variables.update(cleaned_placeholders)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
# Continue even if placeholder resolution fails
|
# Continue even if placeholder resolution fails
|
||||||
if enable_debug:
|
if enable_debug:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user