Skip to content

Commit

Permalink
Removed update_parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
liunelson committed Jan 31, 2025
1 parent accfda4 commit 857dcf6
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 59 deletions.
2 changes: 1 addition & 1 deletion src/askem_beaker/contexts/mira_model_edit/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ async def substitute_parameter(self,
):
"""
This tool is used when a user wants to remove a specified parameter from their model.
An example for this might look like: "Remove the parameter beta"
An example for this might look like: "Remove the parameter beta" or "Substitute the parameter beta with 1"
Args:
parameter_name (str): This is the name of the parameter the user wants to remove.
Expand Down
23 changes: 0 additions & 23 deletions src/askem_beaker/contexts/mira_model_edit/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,29 +469,6 @@ async def substitute_parameter_request(self, message):
)
await self.send_mira_preview_message(parent_header=message.header)


@intercept()
async def update_parameter_request(self, message):
content = message.content

updated_id = content.get("updated_id")
replacement_value = content.get("replacement_value")

code = self.get_code("update_parameter", {
"updated_id": updated_id,
"replacement_value": replacement_value
})
result = await self.execute(code)
content = {
"success": True,
"executed_code": result["parent"].content["code"],
}

self.beaker_kernel.send_response(
"iopub", "update_parameter_response", content, parent_header=message.header
)
await self.send_mira_preview_message(parent_header=message.header)

@intercept()
async def add_observable_template_request(self, message):
content = message.content
Expand Down

This file was deleted.

0 comments on commit 857dcf6

Please sign in to comment.