Skip to content

Commit

Permalink
Merge pull request #33 from gomate-community/pipeline
Browse files Browse the repository at this point in the history
feature@rag baseline
  • Loading branch information
yanqiangmiffy authored Jun 25, 2024
2 parents cc2bb8a + f5c6b15 commit 413f67b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gomate/applications/rag.py
Original file line number Diff line number Diff line change
@@ -53,6 +53,7 @@ def add_document(self, file_path):

def chat(self, question: str = '', top_k: int = 5):
contents = self.retriever.retrieve(query=question, top_k=top_k)
contents=self.reranker.rerank(query=question,documents=[content['text'] for content in contents])
content = '\n'.join([content['text'] for content in contents])
print(contents)
response, history = self.llm.chat(question, [], content)

0 comments on commit 413f67b

Please sign in to comment.