Skip to content

fix: correct import path and add missing logging in groq example#404

Open
majiayu000 wants to merge 1 commit intostanford-oval:mainfrom
majiayu000:fix/groq-example-import
Open

fix: correct import path and add missing logging in groq example#404
majiayu000 wants to merge 1 commit intostanford-oval:mainfrom
majiayu000:fix/groq-example-import

Conversation

@majiayu000
Copy link

Summary

  • Fix incorrect import statement in run_storm_wiki_groq.py
  • Add missing logging import and logger initialization
  • Remove incorrect VLLM server reference from docstring

Changes

  • Changed import lm; from lm import GroqModel to from knowledge_storm.lm import GroqModel
  • Added import logging and logger = logging.getLogger(__name__) to fix the undefined logger error
  • Removed misleading docstring about needing a VLLM server (this is a Groq-hosted model example)

Test plan

  • Import statement follows the same pattern as other example scripts (e.g., run_storm_wiki_mistral.py)
  • Script syntax is valid (tested with Python 3.11)
  • No changes to knowledge_storm/ directory, so CI format check should pass

Note: This addresses the same issue as PR #302, which has merge conflicts and has been stale since January 2025.

- Fix incorrect import statement: change `import lm; from lm import GroqModel`
  to `from knowledge_storm.lm import GroqModel`
- Add missing `import logging` and logger initialization
- Remove incorrect docstring about VLLM server (this is a Groq example)

This fixes the ImportError when running the groq example script.

Signed-off-by: majiayu000 <1835304752@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant