examples package¶
Submodules¶
examples.01_light_switch module¶
- async examples.01_light_switch.start_state(fsm: MooreFSM, response: str, will_transition: bool)[source]¶
Default state when light is off
- Parameters:
fsm (
moorellm.MooreFSM
) – The Moore FSM objectresponse (str) – The response from the AI model
will_transition (bool) – Whether the FSM will transition to the next state, if true then the light will turn on after the transition
- Returns:
The response from the AI model (which is to be displayed to the user)
- Return type:
str
- async examples.01_light_switch.state_on(fsm: MooreFSM, response: str, will_transition: bool)[source]¶
State when light is on, user can turn off the light
- Parameters:
fsm (
moorellm.MooreFSM
) – The Moore FSM objectresponse (str) – The response from the AI model
will_transition (bool) – Whether the FSM will transition to the next state, if true then the light will turn off after the transition
- Returns:
The response from the AI model (which is to be displayed to the user)
- Return type:
str