Skip to content

Commit

Permalink
Merge pull request #236 from zhoucheng89/main
Browse files Browse the repository at this point in the history
Fix SerperRM bug.
  • Loading branch information
shaoyijia authored Oct 27, 2024
2 parents 18d0258 + d7d8f40 commit dcfa2bd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion knowledge_storm/rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,9 @@ def forward(self, query_or_queries: Union[str, List[str]], exclude_urls: List[st
snippets = [organic.get("snippet")]
if self.ENABLE_EXTRA_SNIPPET_EXTRACTION:
snippets.extend(
valid_url_to_snippets.get(url, {}).get("snippets", [])
valid_url_to_snippets.get(url.strip("'"), {}).get(
"snippets", []
)
)
collected_results.append(
{
Expand Down

0 comments on commit dcfa2bd

Please sign in to comment.