An LLM-powered knowledge curation system that researches a topic and generates a full-length report with citations.
Python agentic-ragdeep-researchemnlp2024knowledge-curationlarge-language-modelsnaaclnlpreport-generationretrieval-augmented-generation
Fix the Python complain when `anthropic` is not installed.
shaoyijia463634e640e5
diff --git a/src/lm.py b/src/lm.pyindex 600002f..60dff4d 100644--- a/src/lm.py+++ b/src/lm.py@@ -13,9 +13,9 @@ from dsp.modules.hf_client import send_hfvllm_request_v00, send_hftgi_request_v0from transformers import AutoTokenizertry:- import anthropic+ from anthropic import RateLimitErrorexcept ImportError:- pass+ RateLimitError = Noneclass OpenAIModel(dspy.OpenAI):@@ -193,7 +193,7 @@ class ClaudeModel(dspy.dsp.modules.lm.LM):@backoff.on_exception(backoff.expo,- (anthropic.RateLimitError,),+ (RateLimitError,),max_time=1000,max_tries=8,on_backoff=backoff_hdlr,