Skip to content

Commit

Permalink
feat/runtime_requirements (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Feb 9, 2023
1 parent 43d68ec commit 97c54bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import openai as ai
from ovos_workshop.skills.fallback import FallbackSkill
from ovos_utils.process_utils import RuntimeRequirements
from ovos_utils import classproperty


class ChatGPTSkill(FallbackSkill):
Expand All @@ -12,6 +14,18 @@ def __init__(self):
self.current_q = None
self.current_a = None

@classproperty
def runtime_requirements(self):
return RuntimeRequirements(internet_before_load=True,
network_before_load=True,
gui_before_load=False,
requires_internet=True,
requires_network=True,
requires_gui=False,
no_internet_fallback=False,
no_network_fallback=False,
no_gui_fallback=True)

def initialize(self):
self.add_event("speak", self.handle_speak)
self.add_event("recognizer_loop:utterance", self.handle_utterance)
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
openai
ovos_workshop~=0.0.10
ovos-utils~=0.0, >=0.0.28a4
ovos_workshop~=0.0, >=0.0.11a4

0 comments on commit 97c54bc

Please sign in to comment.