Spaces:
Running
Running
Commit
·
b6cdc6a
1
Parent(s):
5abcb47
to enable streaming feature in openai response
Browse files- streamlit_app.py +2 -1
streamlit_app.py
CHANGED
@@ -51,7 +51,8 @@ def generate_llm_response(prompt_input):
|
|
51 |
messages=[
|
52 |
{"role": "system", "content": system_content},
|
53 |
] + st.session_state.messages,
|
54 |
-
temperature=temperature
|
|
|
55 |
)
|
56 |
return completion.choices[0].message.content
|
57 |
|
|
|
51 |
messages=[
|
52 |
{"role": "system", "content": system_content},
|
53 |
] + st.session_state.messages,
|
54 |
+
temperature=temperature,
|
55 |
+
stream=True
|
56 |
)
|
57 |
return completion.choices[0].message.content
|
58 |
|