Spaces:
Runtime error
Runtime error
Download query_utils.py from niloydebbarma/allycat: direct link, hf CLI and curl.
- Browser
- Download file 358 Bytes
-
https://huggingface.co/spaces/niloydebbarma/allycat/resolve/main/query_utils.py
- Command line
-
hf download hf://spaces/niloydebbarma/allycat/query_utils.py
-
curl -L -o query_utils.py https://huggingface.co/spaces/niloydebbarma/allycat/resolve/main/query_utils.py
358 Bytes
| def tweak_query(query : str, model : str): | |
| """ | |
| for qwen3 models, turn off thinking | |
| """ | |
| # Check if the model is qwen3 | |
| if 'qwen3' in model: | |
| # Check if the query contains '/no_think' | |
| if '/no_think' not in query: | |
| # Append '/no_think' to the query | |
| query += '\n/no_think' | |
| return query |