Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ if st.session_state["story_started"]:
|
|
36 |
user_input = st.text_input("Add your sentence:")
|
37 |
if st.button("Submit"):
|
38 |
# การเรียกใช้ API ตามโครงสร้างใหม่
|
39 |
-
response =
|
40 |
model="gpt-4o-mini",
|
41 |
messages=[
|
42 |
{"role": "system", "content": "You are a storytelling assistant who helps children write fun and imaginative stories."},
|
|
|
36 |
user_input = st.text_input("Add your sentence:")
|
37 |
if st.button("Submit"):
|
38 |
# การเรียกใช้ API ตามโครงสร้างใหม่
|
39 |
+
response = client.chat.completions.create(
|
40 |
model="gpt-4o-mini",
|
41 |
messages=[
|
42 |
{"role": "system", "content": "You are a storytelling assistant who helps children write fun and imaginative stories."},
|