Skip to content

Commit

Permalink
Update google_serper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnychenxiwang authored Feb 20, 2024
1 parent 2263f4b commit dc831c4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pipeline/tool/google_serper.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Utilizing the following code snippet based on the algorithm proposed in the paper:
# Title: "FacTool: Factuality Detection in Generative AI--A Tool Augmented Framework for Multi-Task and Multi-Domain Scenarios"
# Author: Chern et al.
# Original code source: https://github.com/GAIR-NLP/factool/blob/main/factool/knowledge_qa/google_serper.py

import asyncio
import aiohttp

Expand Down Expand Up @@ -113,4 +118,4 @@ def execute(self, content):
search_outputs_for_claims = loop.run_until_complete(self.run([query_list]))
evidences = [[output['content'] for output in search_outputs_for_claim] for search_outputs_for_claim in
search_outputs_for_claims]
return evidences[0]
return evidences[0]

0 comments on commit dc831c4

Please sign in to comment.