Skip to content

Commit

Permalink
fix arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-XT committed Jun 28, 2024
1 parent 1f1a6a5 commit 7ec5af1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions agixt/Chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,20 +344,20 @@ def update_step(self, chain_name, step_number, agent_name, prompt_type, prompt):
target_chain_id = None
target_command_id = None
target_prompt_id = None
prompt_args = prompt.copy()
if prompt_type == "Command":
command_name = prompt.get("command_name")
command_args = prompt.copy()
del command_args["command_name"]
del prompt_args["command_name"]
command = (
session.query(Command).filter(Command.name == command_name).first()
)
if command:
target_command_id = command.id
elif prompt_type == "Prompt":
prompt_name = prompt.get("prompt_name")
prompt_category = prompt_name = prompt.get("prompt_name", "Default")
prompt_args = prompt.copy()
prompt_category = prompt.get("prompt_category", "Default")
del prompt_args["prompt_name"]
del prompt_args["prompt_category"]
prompt_obj = (
session.query(Prompt)
.filter(
Expand All @@ -371,8 +371,7 @@ def update_step(self, chain_name, step_number, agent_name, prompt_type, prompt):
target_prompt_id = prompt_obj.id
elif prompt_type == "Chain":
chain_name = prompt.get("chain_name")
chain_args = prompt.copy()
del chain_args["chain_name"]
del prompt_args["chain_name"]
chain_obj = (
session.query(ChainDB)
.filter(ChainDB.name == chain_name, ChainDB.user_id == self.user_id)
Expand Down
2 changes: 1 addition & 1 deletion agixt/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1.6.1
v1.6.2

0 comments on commit 7ec5af1

Please sign in to comment.