Skip to content

SamOS-sketch/SamOS_master

Repository files navigation

SamOS\nMinimal runtime for Phase 10.

## Build a Skill in 60 seconds

Create my\_skill.py:

from samos.runtime.models import UserMessage, Response, Context



class MySkill:

  name = "my\_skill"

  def supports(self, msg: UserMessage, ctx: Context) -> bool:

    return msg.text.strip().lower().startswith("do:")

  def run(self, msg: UserMessage, ctx: Context) -> Response:

    task = msg.text.split(":",1)\[1].strip() or "(nothing)"

    return Response(text=f"{ctx.soulprint.voice\_tag()}: doing {task}")

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published