改进 输出结果
This commit is contained in:
parent
4ec57974a4
commit
cf6c92d3e3
2
.gitignore
vendored
2
.gitignore
vendored
@ -158,5 +158,5 @@ cython_debug/
|
||||
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
||||
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
||||
# option (not recommended) you can uncomment the following to ignore the entire `idea` folder.
|
||||
#.idea/
|
||||
.idea/
|
||||
|
||||
|
@ -64,7 +64,7 @@ class AIServer(proto.document_query_pb2_grpc.DocumentQuery):
|
||||
id=_chunk_id
|
||||
))
|
||||
|
||||
print(_chunk_content.document)
|
||||
# print(_chunk_content)
|
||||
|
||||
# _doc_content_full = _chunk_content.content
|
||||
document_text += "\n" + _chunk_content.content + "\n"
|
||||
@ -72,7 +72,8 @@ class AIServer(proto.document_query_pb2_grpc.DocumentQuery):
|
||||
# append
|
||||
sources.append({
|
||||
"text": _chunk_content.content,
|
||||
"document_id": _chunk_content.document.id
|
||||
"document_id": _chunk_content.document.id,
|
||||
"title": _chunk_content.document.title
|
||||
})
|
||||
|
||||
# doc_obj = Document(page_content=_doc_content_full, metadata={"source": "chunked content"})
|
||||
@ -86,6 +87,7 @@ class AIServer(proto.document_query_pb2_grpc.DocumentQuery):
|
||||
|
||||
output = search(document_text, question)
|
||||
|
||||
print(sources)
|
||||
print("完成。")
|
||||
return proto.document_query_pb2.QueryResponse(
|
||||
text=output,
|
||||
|
Loading…
Reference in New Issue
Block a user