diff --git a/CHANGELOG.md b/CHANGELOG.md index 999f6123b..6bfe63aa6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Exception when calling `Structure.to_json()` after it has run. - `Agent` unintentionally modifying `stream` for all Prompt Drivers. -- Exception when calling `Structure.to_json()` after it has run. +- `StructureVisualizer.base_url` for setting the base URL on the url generated by `StructureVisualizer.to_url()`. +- `StructureVisualizer.query_params` for setting query parameters on the url generated by `StructureVisualizer.to_url()`. +- Parsing `ActionCallDeltaMessageContent`s with empty string `partial_input`s. ## [1.0.0] - 2024-12-09 diff --git a/griptape/common/prompt_stack/contents/action_call_message_content.py b/griptape/common/prompt_stack/contents/action_call_message_content.py index 94cc1cd14..208d9a638 100644 --- a/griptape/common/prompt_stack/contents/action_call_message_content.py +++ b/griptape/common/prompt_stack/contents/action_call_message_content.py @@ -37,7 +37,7 @@ def from_deltas(cls, deltas: Sequence[BaseDeltaMessageContent]) -> ActionCallMes if tag is not None and name is not None and path is not None: try: - parsed_input = json.loads(json_input) + parsed_input = json.loads(json_input or "{}") except json.JSONDecodeError as exc: raise ValueError("Invalid JSON input for ToolAction") from exc action = ToolAction(tag=tag, name=name, path=path, input=parsed_input) diff --git a/tests/unit/common/contents/test_action_call_message_content.py b/tests/unit/common/contents/test_action_call_message_content.py index d6c3f438f..ddd68a645 100644 --- a/tests/unit/common/contents/test_action_call_message_content.py +++ b/tests/unit/common/contents/test_action_call_message_content.py @@ -21,6 +21,7 @@ def test_from_deltas(self): ActionCallDeltaMessageContent(tag="testtag"), ActionCallDeltaMessageContent(name="TestName"), ActionCallDeltaMessageContent(path="test_tag"), + ActionCallDeltaMessageContent(partial_input=""), ActionCallDeltaMessageContent(partial_input='{"foo":'), ActionCallDeltaMessageContent(partial_input='"bar"}'), ]