stanford-oval / storm

An LLM-powered knowledge curation system that researches a topic and generates a full-length report with citations.
https://storm-project.stanford.edu
MIT License
4.89k stars 488 forks source link

NameError: name 'anthropic' is not defined #42

Open klimentij opened 2 months ago

klimentij commented 2 months ago

I run

python examples/run_storm_wiki_gpt.py \
    --output_dir output \
    --do-research \
    --do-generate-outline \
    --do-generate-article \
    --do-polish-article

and get

Traceback (most recent call last):
  File "/Users/klim/storm/examples/run_storm_wiki_gpt.py", line 27, in <module>
    from lm import OpenAIModel
  File "/Users/klim/storm/./src/lm.py", line 111, in <module>
    class ClaudeModel(dspy.dsp.modules.lm.LM):
  File "/Users/klim/storm/./src/lm.py", line 196, in ClaudeModel
    (anthropic.RateLimitError,),
     ^^^^^^^^^
NameError: name 'anthropic' is not defined

Update

Fixed by

pip install anthropic

Please update requirements.txt

Octobot222 commented 2 months ago

When Github gets back to me ill resolve the issue, i apoligize in advance!

Sent from my T-Mobile 5G Device Get Outlook for Androidhttps://aka.ms/AAb9ysg


From: Klimentij Bulygin @.> Sent: Wednesday, May 1, 2024 7:20:29 PM To: stanford-oval/storm @.> Cc: Subscribed @.***> Subject: [stanford-oval/storm] NameError: name 'anthropic' is not defined (Issue #42)

I run

python examples/run_storm_wiki_gpt.py \ --output_dir output \ --do-research \ --do-generate-outline \ --do-generate-article \ --do-polish-article

and get

Traceback (most recent call last): File "/Users/klim/storm/examples/run_storm_wiki_gpt.py", line 27, in from lm import OpenAIModel File "/Users/klim/storm/./src/lm.py", line 111, in class ClaudeModel(dspy.dsp.modules.lm.LM): File "/Users/klim/storm/./src/lm.py", line 196, in ClaudeModel (anthropic.RateLimitError,), ^^^^^^^^^ NameError: name 'anthropic' is not defined

— Reply to this email directly, view it on GitHubhttps://github.com/stanford-oval/storm/issues/42, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BHVMWDVTXGIAUVTCLY4WQ73ZAGBE3AVCNFSM6AAAAABHCYFMWCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI3TIMZYGI4TCNY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

shaoyijia commented 2 months ago

Thanks! Just fixed this with commit 463634e. anthropic is only needed when using ClaudeModel.