Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,6 @@ from openai import AzureOpenAI
|
|
5 |
|
6 |
# Set your OpenAI API key
|
7 |
AZURE_API_VERSION = "2023-03-15-preview"
|
8 |
-
Deployment_Name = "gpt-4o"
|
9 |
|
10 |
client = AzureOpenAI(api_key=os.getenv("AZURE_OPENAI_API_KEY"), api_version=AZURE_API_VERSION, azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"))
|
11 |
|
@@ -24,7 +23,7 @@ def ask_openai(prompt, secret_word):
|
|
24 |
|
25 |
try:
|
26 |
response = client.chat.completions.create(
|
27 |
-
model=
|
28 |
messages=[
|
29 |
{"role": "system", "content": system_message},
|
30 |
{"role": "user", "content": prompt}
|
|
|
5 |
|
6 |
# Set your OpenAI API key
|
7 |
AZURE_API_VERSION = "2023-03-15-preview"
|
|
|
8 |
|
9 |
client = AzureOpenAI(api_key=os.getenv("AZURE_OPENAI_API_KEY"), api_version=AZURE_API_VERSION, azure_endpoint=os.getenv("AZURE_OPENAI_ENDPOINT"))
|
10 |
|
|
|
23 |
|
24 |
try:
|
25 |
response = client.chat.completions.create(
|
26 |
+
model="gpt-3.5-turbo",
|
27 |
messages=[
|
28 |
{"role": "system", "content": system_message},
|
29 |
{"role": "user", "content": prompt}
|