Spaces:
Runtime error
Runtime error
minor change in message display
Browse files
app.py
CHANGED
|
@@ -16,6 +16,7 @@ from langchain.chains import RetrievalQA
|
|
| 16 |
import json
|
| 17 |
from documents import read_documents_from_file, create_faq_documents
|
| 18 |
|
|
|
|
| 19 |
OPENAI_API_KEY = st.secrets["OPENAI_API_KEY"]
|
| 20 |
|
| 21 |
# Get all the filenames from the docs folder
|
|
@@ -169,7 +170,7 @@ if st.session_state.clicked:
|
|
| 169 |
st.chat_message("assistant").write_stream(response_stream)
|
| 170 |
with st.expander("Kontext ansehen"):
|
| 171 |
for citation in response["context"]:
|
| 172 |
-
st.write(
|
| 173 |
st.write(str(citation.metadata['source']))
|
| 174 |
st.write(str("---")*20)
|
| 175 |
with st.sidebar:
|
|
@@ -185,7 +186,7 @@ if prompt := st.chat_input():
|
|
| 185 |
st.chat_message("assistant").write_stream(response_stream)
|
| 186 |
with st.expander("Kontext ansehen"):
|
| 187 |
for citation in response["context"]:
|
| 188 |
-
st.write(
|
| 189 |
st.write(str(citation.metadata['source']))
|
| 190 |
st.write(str("---")*20)
|
| 191 |
with st.sidebar:
|
|
|
|
| 16 |
import json
|
| 17 |
from documents import read_documents_from_file, create_faq_documents
|
| 18 |
|
| 19 |
+
create_faq_documents()
|
| 20 |
OPENAI_API_KEY = st.secrets["OPENAI_API_KEY"]
|
| 21 |
|
| 22 |
# Get all the filenames from the docs folder
|
|
|
|
| 170 |
st.chat_message("assistant").write_stream(response_stream)
|
| 171 |
with st.expander("Kontext ansehen"):
|
| 172 |
for citation in response["context"]:
|
| 173 |
+
st.write(str(citation.page_content))
|
| 174 |
st.write(str(citation.metadata['source']))
|
| 175 |
st.write(str("---")*20)
|
| 176 |
with st.sidebar:
|
|
|
|
| 186 |
st.chat_message("assistant").write_stream(response_stream)
|
| 187 |
with st.expander("Kontext ansehen"):
|
| 188 |
for citation in response["context"]:
|
| 189 |
+
st.write(str(citation.page_content))
|
| 190 |
st.write(str(citation.metadata['source']))
|
| 191 |
st.write(str("---")*20)
|
| 192 |
with st.sidebar:
|