MCPcopy
hub / github.com/WEIFENG2333/VideoCaptioner / validate_llm

Function validate_llm

videocaptioner/cli/validators.py:83–104  ·  view source on GitHub ↗

Validate LLM configuration (required for optimize, LLM translate, split).

(config: dict)

Source from the content-addressed store, hash-verified

81
82
83def validate_llm(config: dict) -> bool:
84 """Validate LLM configuration (required for optimize, LLM translate, split)."""
85 api_key = get(config, "llm.api_key")
86 model = get(config, "llm.model")
87
88 if not api_key:
89 output.config_missing_error(
90 "LLM API key",
91 "llm.api_key",
92 "OPENAI_API_KEY",
93 "--api-key",
94 )
95 return False
96 if not model:
97 output.config_missing_error(
98 "LLM model",
99 "llm.model",
100 "OPENAI_MODEL",
101 "--model",
102 )
103 return False
104 return True
105
106
107def validate_whisper_api(config: dict) -> bool:

Callers 3

runFunction · 0.90
validate_subtitleFunction · 0.85
validate_dubbingFunction · 0.85

Calls 1

getFunction · 0.90

Tested by

no test coverage detected