Skip to content

Commit

Permalink
add variables from the msg saved run to analysis run
Browse files Browse the repository at this point in the history
  • Loading branch information
devxpy committed Jul 21, 2024
1 parent 0bdb9e9 commit 5538240
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bots/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ def msg_analysis(self, msg_id: int, anal_id: int, countdown: int | None):
analysis_sr = anal.get_active_saved_run()
variables = analysis_sr.state.get("variables", {})

# add the state variables requested by the script
if msg.saved_run:
# add the variables from the parent run
variables |= msg.saved_run.state.get("variables") or {}
# add the state variables requested by the script
fill_req_vars_from_state(msg.saved_run.state, variables)
if "messages" in variables:
variables["messages"] = messages_as_prompt(
Expand Down

0 comments on commit 5538240

Please sign in to comment.