awacke1 commited on
Commit
b3ccbc9
1 Parent(s): 86d273d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -132,7 +132,8 @@ def chat_with_model(prompt, document_section, model_choice='gpt-3.5-turbo'):
132
  # streaming response
133
  result_textarea = st.empty()
134
  results=[]
135
- for responses in openai.ChatCompletion.create(model=model, messages=conversation, stream=True):
 
136
  #results.append(str(responses.choices[0]))
137
  results.append(responses.choices[0].text)
138
  #st.markdown(f'*{results}*')
 
132
  # streaming response
133
  result_textarea = st.empty()
134
  results=[]
135
+ for responses in openai.Completion.create(model=model, messages=conversation, stream=True):
136
+ # for responses in openai.ChatCompletion.create(model=model, messages=conversation, stream=True):
137
  #results.append(str(responses.choices[0]))
138
  results.append(responses.choices[0].text)
139
  #st.markdown(f'*{results}*')