Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ def get_diagram_code(prompt, diagram_type, api_key):
|
|
12 |
|
13 |
# For GPT-4 and other chat models, use the v1/chat/completions endpoint
|
14 |
response = openai.ChatCompletion.create(
|
15 |
-
model="gpt-
|
16 |
messages=[
|
17 |
{"role": "system", "content": "You are a helpful assistant."},
|
18 |
{"role": "user", "content": f"Generate a {diagram_type} diagram in Mermaid.js syntax based on the following prompt: {prompt}"}
|
|
|
12 |
|
13 |
# For GPT-4 and other chat models, use the v1/chat/completions endpoint
|
14 |
response = openai.ChatCompletion.create(
|
15 |
+
model="gpt-4o", # Make sure you're using the right model
|
16 |
messages=[
|
17 |
{"role": "system", "content": "You are a helpful assistant."},
|
18 |
{"role": "user", "content": f"Generate a {diagram_type} diagram in Mermaid.js syntax based on the following prompt: {prompt}"}
|