Rathapoom commited on
Commit
3967efa
·
verified ·
1 Parent(s): a9cc308

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 = openai.ChatCompletion.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."},
 
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."},