shresthasingh
commited on
Commit
•
721b8da
1
Parent(s):
834700e
Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,8 @@ import os
|
|
7 |
|
8 |
# Initialize OpenAI client with hardcoded API key
|
9 |
# WARNING: This is not secure and should only be used for testing
|
10 |
-
|
11 |
-
|
12 |
# System prompt for GPT-4
|
13 |
SYSTEM_PROMPT = """
|
14 |
You are an AI assistant that converts user commands into structured JSON data. Your task is to interpret the user's intent and create a JSON object with relevant fields. Always include a 'response' field in the JSON with a friendly, conversational reply to the user's command.
|
|
|
7 |
|
8 |
# Initialize OpenAI client with hardcoded API key
|
9 |
# WARNING: This is not secure and should only be used for testing
|
10 |
+
API_KEY = os.getenv("openai")
|
11 |
+
client = OpenAI(api_key=API_KEY)
|
12 |
# System prompt for GPT-4
|
13 |
SYSTEM_PROMPT = """
|
14 |
You are an AI assistant that converts user commands into structured JSON data. Your task is to interpret the user's intent and create a JSON object with relevant fields. Always include a 'response' field in the JSON with a friendly, conversational reply to the user's command.
|