Remove unused code and comments
This commit is contained in:
parent
0cc0d8b556
commit
fb3e4b88c5
1 changed files with 0 additions and 17 deletions
|
|
@ -161,23 +161,6 @@ class ChatService(Service):
|
||||||
file_responses.append(msg)
|
file_responses.append(msg)
|
||||||
if msg.type == "start":
|
if msg.type == "start":
|
||||||
break
|
break
|
||||||
if "source_documents" in raw_output:
|
|
||||||
markdown_table = ""
|
|
||||||
doc_dicts = []
|
|
||||||
for doc in raw_output["source_documents"]:
|
|
||||||
doc_dict = doc.dict()
|
|
||||||
metadata = doc_dict.pop("metadata", {})
|
|
||||||
metadata["page_content"] = doc.page_content
|
|
||||||
doc_dicts.append(metadata)
|
|
||||||
markdown_table = list_of_dicts_to_markdown_table(doc_dicts)
|
|
||||||
file_responses.append(
|
|
||||||
FileResponse(
|
|
||||||
message=None,
|
|
||||||
type="file",
|
|
||||||
data=markdown_table,
|
|
||||||
data_type="Document",
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
response = ChatResponse(
|
response = ChatResponse(
|
||||||
message=result,
|
message=result,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue