Skip to content

Commit

Permalink
Add copy to invocation_context instead of overwriting
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrl committed Apr 10, 2024
1 parent 8991c12 commit 5f80731
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion haystack/nodes/prompt/prompt_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def _prepare( # type: ignore
"""
Prepare prompt invocation.
"""
invocation_context = invocation_context or {}
invocation_context = invocation_context.copy() or {}

if query and "query" not in invocation_context:
invocation_context["query"] = query
Expand Down

0 comments on commit 5f80731

Please sign in to comment.