Refactor message parameter in ContractEdge
This commit is contained in:
parent
27fe142377
commit
39a2801095
1 changed files with 3 additions and 2 deletions
|
|
@ -137,14 +137,15 @@ class ContractEdge(Edge):
|
||||||
log_transaction(self, source, target, "success")
|
log_transaction(self, source, target, "success")
|
||||||
# If the target vertex is a power component we log messages
|
# If the target vertex is a power component we log messages
|
||||||
if target.vertex_type == "ChatOutput" and (
|
if target.vertex_type == "ChatOutput" and (
|
||||||
isinstance(target.params.get("message"), str) or isinstance(target.params.get("message"), dict)
|
isinstance(target.params.get("input_value"), str)
|
||||||
|
or isinstance(target.params.get("input_value"), dict)
|
||||||
):
|
):
|
||||||
if target.params.get("message") == "":
|
if target.params.get("message") == "":
|
||||||
return self.result
|
return self.result
|
||||||
await log_message(
|
await log_message(
|
||||||
sender=target.params.get("sender", ""),
|
sender=target.params.get("sender", ""),
|
||||||
sender_name=target.params.get("sender_name", ""),
|
sender_name=target.params.get("sender_name", ""),
|
||||||
message=target.params.get("message", {}),
|
message=target.params.get("input_value", {}),
|
||||||
session_id=target.params.get("session_id", ""),
|
session_id=target.params.get("session_id", ""),
|
||||||
artifacts=target.artifacts,
|
artifacts=target.artifacts,
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue