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.

Patch `LitellmModel`.

shaoyijia73bddddc3f25
diff --git a/knowledge_storm/lm.py b/knowledge_storm/lm.py
index c0c66ad..bc2b443 100644
--- a/knowledge_storm/lm.py
+++ b/knowledge_storm/lm.py
@@ -37,7 +37,7 @@ with warnings.catch_warnings():
litellm.drop_params = True
litellm.telemetry = False
-from litellm.caching.caching import Cache
+from litellm.caching import Cache
disk_cache_dir = os.path.join(Path.home(), ".storm_local_cache")
litellm.cache = Cache(disk_cache_dir=disk_cache_dir, type="disk")
@@ -190,7 +190,10 @@ def _inspect_history(lm, n: int = 1):
class LitellmModel(LM):
- """A wrapper class for dspy.OpenAI."""
+ """A wrapper class for LiteLLM.
+
+ Check out https://docs.litellm.ai/docs/providers for usage details.
+ """
def __init__(
self,