Spaces:
Running
Running
Enable unsupported params drop by LiteLLM (GPT-5 doesn't support temp below 1)
Browse files
src/slidedeckai/helpers/llm_helper.py
CHANGED
|
@@ -13,6 +13,8 @@ try:
|
|
| 13 |
import litellm
|
| 14 |
from litellm import completion
|
| 15 |
|
|
|
|
|
|
|
| 16 |
# Ask LiteLLM to suppress debug information if possible
|
| 17 |
try:
|
| 18 |
litellm.suppress_debug_info = True
|
|
@@ -28,7 +30,7 @@ except ImportError:
|
|
| 28 |
LLM_PROVIDER_MODEL_REGEX = re.compile(r'\[(.*?)\](.*)')
|
| 29 |
OLLAMA_MODEL_REGEX = re.compile(r'[a-zA-Z0-9._:-]+$')
|
| 30 |
# 128 characters long, only containing alphanumeric characters, hyphens, and underscores
|
| 31 |
-
API_KEY_REGEX = re.compile(r'^[a-zA-Z0-9_-]{6,
|
| 32 |
|
| 33 |
|
| 34 |
logger = logging.getLogger(__name__)
|
|
|
|
| 13 |
import litellm
|
| 14 |
from litellm import completion
|
| 15 |
|
| 16 |
+
litellm.drop_params = True
|
| 17 |
+
|
| 18 |
# Ask LiteLLM to suppress debug information if possible
|
| 19 |
try:
|
| 20 |
litellm.suppress_debug_info = True
|
|
|
|
| 30 |
LLM_PROVIDER_MODEL_REGEX = re.compile(r'\[(.*?)\](.*)')
|
| 31 |
OLLAMA_MODEL_REGEX = re.compile(r'[a-zA-Z0-9._:-]+$')
|
| 32 |
# 128 characters long, only containing alphanumeric characters, hyphens, and underscores
|
| 33 |
+
API_KEY_REGEX = re.compile(r'^[a-zA-Z0-9_-]{6,200}$')
|
| 34 |
|
| 35 |
|
| 36 |
logger = logging.getLogger(__name__)
|