mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-28 01:32:17 +00:00
refactor: move _NON_CHAT_MODES to module-level constant
This commit is contained in:
parent
a78fa80824
commit
500b2a4903
1 changed files with 13 additions and 12 deletions
|
|
@ -32,6 +32,19 @@ ILLEGAL_DISPLAY_PARAMS = [
|
|||
|
||||
MINIMAL_DISPLAY_PARAMS = ["model", "mode_error"]
|
||||
|
||||
_NON_CHAT_MODES = {
|
||||
"image_generation",
|
||||
"image_edit",
|
||||
"video_generation",
|
||||
"embedding",
|
||||
"rerank",
|
||||
"audio_transcription",
|
||||
"audio_speech",
|
||||
"ocr",
|
||||
"search",
|
||||
"moderation",
|
||||
}
|
||||
|
||||
|
||||
def _get_process_rss_mb() -> Optional[float]:
|
||||
"""
|
||||
|
|
@ -366,18 +379,6 @@ def _update_litellm_params_for_health_check(
|
|||
- updates the `voice` param with the `health_check_voice` for `audio_speech` mode if it exists Doc: https://docs.litellm.ai/docs/proxy/health#text-to-speech-models
|
||||
- for Bedrock models with region routing (bedrock/region/model), strips the litellm routing prefix but preserves the model ID
|
||||
"""
|
||||
_NON_CHAT_MODES = {
|
||||
"image_generation",
|
||||
"image_edit",
|
||||
"video_generation",
|
||||
"embedding",
|
||||
"rerank",
|
||||
"audio_transcription",
|
||||
"audio_speech",
|
||||
"ocr",
|
||||
"search",
|
||||
"moderation",
|
||||
}
|
||||
_mode = model_info.get("mode", None)
|
||||
litellm_params["messages"] = _get_random_llm_message()
|
||||
if _mode not in _NON_CHAT_MODES:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue