Skip to content

Commit

Permalink
Fix the copy
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrl committed Apr 10, 2024
1 parent 5f80731 commit 1177d3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion haystack/nodes/prompt/prompt_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ def _prepare( # type: ignore
"""
Prepare prompt invocation.
"""
invocation_context = invocation_context.copy() or {}
if invocation_context is None:
invocation_context = {}
else:
invocation_context = invocation_context.copy()

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

0 comments on commit 1177d3f

Please sign in to comment.