:goal_net: fail to start if API key is missing.
Browse files
app.py
CHANGED
@@ -5,6 +5,10 @@ import json
|
|
5 |
import html
|
6 |
|
7 |
api_key = os.environ.get('FEATHERLESS_API_KEY')
|
|
|
|
|
|
|
|
|
8 |
client = OpenAI(
|
9 |
base_url="https://api.featherless.ai/v1",
|
10 |
api_key=api_key
|
|
|
5 |
import html
|
6 |
|
7 |
api_key = os.environ.get('FEATHERLESS_API_KEY')
|
8 |
+
|
9 |
+
if not api_key:
|
10 |
+
raise RuntimeError("Cannot start without required API key. Please register for one at https://featherless.ai")
|
11 |
+
|
12 |
client = OpenAI(
|
13 |
base_url="https://api.featherless.ai/v1",
|
14 |
api_key=api_key
|