Skip to content

Commit d7d8f40

Browse files
committed
[SerperRM Bug]
valid_url_to_snippets.get(url, {}) get none value. call strip function will be fix it. just like url.strip("\'"). format code and commit.
1 parent 03e3af6 commit d7d8f40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

knowledge_storm/rm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,9 @@ def forward(self, query_or_queries: Union[str, List[str]], exclude_urls: List[st
537537
snippets = [organic.get("snippet")]
538538
if self.ENABLE_EXTRA_SNIPPET_EXTRACTION:
539539
snippets.extend(
540-
valid_url_to_snippets.get(url.strip("\'"), {}).get("snippets", [])
540+
valid_url_to_snippets.get(url.strip("'"), {}).get(
541+
"snippets", []
542+
)
541543
)
542544
collected_results.append(
543545
{

0 commit comments

Comments
 (0)