Skip to content

Commit

Permalink
added check for openai key
Browse files Browse the repository at this point in the history
  • Loading branch information
bbird81 committed Jun 28, 2023
1 parent 118f8ff commit d65bd7d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webex-skill.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from webex_skills.api import SimpleAPI
from webex_skills.dialogue import responses
from webex_skills.models.mindmeld import DialogueState
import openai, os
import openai, os, sys

if os.getenv("OPENAI_KEY"):
openai.api_key = os.getenv("OPENAI_KEY")
else:
print("OpenAI Token not set: ABORTING!", flush=True)
sys.exit(2)

api = SimpleAPI()

Expand Down

0 comments on commit d65bd7d

Please sign in to comment.