-
Notifications
You must be signed in to change notification settings - Fork 416
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
raise error messages when optional dependencies are missing
- Loading branch information
Showing
5 changed files
with
44 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = '0.0.6' | ||
__version__ = '0.0.7' | ||
from .agent import Agent | ||
from .multi_agent_hub import MultiAgentHub | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
try: | ||
import gradio as gr | ||
if gr.__version__ < '4.0': | ||
raise ImportError('Incompatible "gradio" version detected. ' | ||
'Please install the correct version with: pip install "gradio>=4.0"') | ||
except (ModuleNotFoundError, AttributeError): | ||
raise ImportError('Requirement "gradio" not installed. ' | ||
'Please install it by: pip install -U "gradio>=4.0"') | ||
|
||
try: | ||
assert gr.__version__ >= '4.0' | ||
import modelscope_studio as mgr # noqa | ||
except ModuleNotFoundError: | ||
raise ImportError('Requirement "modelscope-studio" not installed. ' | ||
'Please install it by: pip install -U "modelscope-studio>=0.2.1"') | ||
except Exception as e: | ||
raise ImportError('The dependencies for GUI support are not installed. ' | ||
'Please install the required dependencies by running: pip install qwen-agent[gui]') from e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters