Skip to content

Commit

Permalink
Merge pull request #49 from canvas-medical/jw-remove-add-plan-from-te…
Browse files Browse the repository at this point in the history
…mplate

Removes ADD_PLAN_COMMAND from examples.
  • Loading branch information
jrwils authored May 17, 2024
2 parents dc9e4a9 + 696bdca commit f1fe305
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ def compute(self):

# Return zero, one, or many effects.
# Example:
# return [Effect(type=EffectType.ADD_PLAN_COMMAND, payload=json.dumps(payload))]
# return [Effect(type=EffectType.LOG, payload=json.dumps(payload))]
return []
5 changes: 2 additions & 3 deletions test-plugins/my_first_plugin/protocols/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
from canvas_sdk.effects import Effect, EffectType
from canvas_sdk.events import EventType
from canvas_sdk.protocols import BaseProtocol

from logger import log


class Protocol(BaseProtocol):
RESPONDS_TO = EventType.Name(EventType.ASSESS_COMMAND__CONDITION_SELECTED)

NARRATIVE_STRING = "monkey"
NARRATIVE_STRING = "zebra"

def compute(self):
log.info(self.NARRATIVE_STRING)
Expand All @@ -19,4 +18,4 @@ def compute(self):
"data": {"narrative": self.NARRATIVE_STRING},
}

return [Effect(type=EffectType.ADD_PLAN_COMMAND, payload=json.dumps(payload))]
return [Effect(type=EffectType.LOG, payload=json.dumps(payload))]

0 comments on commit f1fe305

Please sign in to comment.