Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,7 +40,7 @@ if prompt:
|
|
| 40 |
# Use a spinner to indicate that the model is generating a response
|
| 41 |
with st.spinner('Simon-Pierre is Thinking...'):
|
| 42 |
client = OpenAI(api_key=openai_api_key)
|
| 43 |
-
response = client.chat.completions.create(model=model_choice, messages=st.session_state.messages)
|
| 44 |
msg = response.choices[0].message.content
|
| 45 |
|
| 46 |
# Append and display the assistant's response
|
|
|
|
| 40 |
# Use a spinner to indicate that the model is generating a response
|
| 41 |
with st.spinner('Simon-Pierre is Thinking...'):
|
| 42 |
client = OpenAI(api_key=openai_api_key)
|
| 43 |
+
response = client.chat.completions.create(model=model_choice, messages=st.session_state.messages,max_tokens=4000)
|
| 44 |
msg = response.choices[0].message.content
|
| 45 |
|
| 46 |
# Append and display the assistant's response
|