Download lib/python3.11/site-packages/dashscope/utils/param_utils.py from michaelu0826/phantom_env: direct link, hf CLI and curl.
- Browser
- Download file 850 Bytes
-
https://huggingface.co/datasets/michaelu0826/phantom_env/resolve/main/lib/python3.11/site-packages/dashscope/utils/param_utils.py
- Command line
-
hf download hf://datasets/michaelu0826/phantom_env/lib/python3.11/site-packages/dashscope/utils/param_utils.py
-
curl -L -o param_utils.py https://huggingface.co/datasets/michaelu0826/phantom_env/resolve/main/lib/python3.11/site-packages/dashscope/utils/param_utils.py
850 Bytes
| # -*- coding: utf-8 -*- | |
| class ParamUtil: | |
| def should_modify_incremental_output(model_name: str) -> bool: | |
| """ | |
| Determine if increment_output parameter needs to be modified based on | |
| model name. | |
| Args: | |
| model_name (str): The name of the model to check | |
| Returns: | |
| bool: False if model contains 'tts', 'omni', or | |
| 'qwen-deep-research', True otherwise | |
| """ | |
| if not isinstance(model_name, str): | |
| return True | |
| model_name_lower = model_name.lower() | |
| # Check for conditions that return False | |
| if "tts" in model_name_lower: | |
| return False | |
| if "omni" in model_name_lower: | |
| return False | |
| if "qwen-deep-research" in model_name_lower: | |
| return False | |
| return True | |