Update app.py
Browse files
app.py
CHANGED
@@ -135,14 +135,14 @@ def chat_with_model(prompt, document_section, model_choice='gpt-3.5-turbo'):
|
|
135 |
for responses in openai.ChatCompletion.create(model=model, messages=conversation, stream=True):
|
136 |
results.append(str(responses.choices[0]))
|
137 |
#st.markdown(f'*{results}*')
|
138 |
-
result_textarea.markdown(f'*{
|
139 |
|
140 |
#result = "".join(results).strip()
|
141 |
#result = result.replace('\n','')
|
142 |
|
143 |
#return response
|
144 |
#return response['choices'][0]['message']['content']
|
145 |
-
return
|
146 |
|
147 |
|
148 |
def chat_with_file_contents(prompt, file_content, model_choice='gpt-3.5-turbo'):
|
|
|
135 |
for responses in openai.ChatCompletion.create(model=model, messages=conversation, stream=True):
|
136 |
results.append(str(responses.choices[0]))
|
137 |
#st.markdown(f'*{results}*')
|
138 |
+
result_textarea.markdown(f'*{results}*')
|
139 |
|
140 |
#result = "".join(results).strip()
|
141 |
#result = result.replace('\n','')
|
142 |
|
143 |
#return response
|
144 |
#return response['choices'][0]['message']['content']
|
145 |
+
return results
|
146 |
|
147 |
|
148 |
def chat_with_file_contents(prompt, file_content, model_choice='gpt-3.5-turbo'):
|