Drew Skillman commited on
Commit
a6de0c8
·
1 Parent(s): 5e285ff

switch model to gpt4o and fix readme

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -34,7 +34,7 @@ try:
34
  client = openai.OpenAI(api_key=OpenAI_API_Key) # Added OpenAI client init
35
  except Exception as e:
36
  # st.error(f"Failed to configure Google AI: {e}") # Updated error message
37
- st.error(f"Failed to configure OpenAI client: {e}")
38
  st.stop()
39
 
40
  # Function to translate roles between Gemini-Pro and Streamlit terminology
@@ -356,7 +356,7 @@ if user_prompt:
356
  # gemini_response = st.session_state.chat_session.send_message(user_prompt)
357
  # response_text = gemini_response.text
358
  openai_response = client.chat.completions.create(
359
- model="gpt-4", # Changed from gpt-4o
360
  messages=st.session_state.messages # Pass the entire history
361
  )
362
  response_text = openai_response.choices[0].message.content
 
34
  client = openai.OpenAI(api_key=OpenAI_API_Key) # Added OpenAI client init
35
  except Exception as e:
36
  # st.error(f"Failed to configure Google AI: {e}") # Updated error message
37
+ st.error(f"Failed to configure OpenAI client: {e}") # Updated error message for OpenAI
38
  st.stop()
39
 
40
  # Function to translate roles between Gemini-Pro and Streamlit terminology
 
356
  # gemini_response = st.session_state.chat_session.send_message(user_prompt)
357
  # response_text = gemini_response.text
358
  openai_response = client.chat.completions.create(
359
+ model="gpt-4o", # IMPORTANT: Use gpt-4o as the model
360
  messages=st.session_state.messages # Pass the entire history
361
  )
362
  response_text = openai_response.choices[0].message.content