Skip to content

armgit / storm

Public Imported from GitHub
0

An LLM-powered knowledge curation system that researches a topic and generates a full-length report with citations.

[SerperRM Bug] valid_url_to_snippets.get(url, {}) get none value. call strip function will be fix it. just like url.strip("\'")

Eminem03e3af689490
diff --git a/knowledge_storm/rm.py b/knowledge_storm/rm.py
index ec57d79..19c64e0 100644
--- a/knowledge_storm/rm.py
+++ b/knowledge_storm/rm.py
@@ -537,7 +537,7 @@ class SerperRM(dspy.Retrieve):
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(
{