MCPcopy
hub / github.com/Huanshere/VideoLingo / load_key

Function load_key

core/utils/config_utils.py:14–26  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

12# -----------------------
13
14def load_key(key):
15 with lock:
16 with open(CONFIG_PATH, 'r', encoding='utf-8') as file:
17 data = yaml.load(file)
18
19 keys = key.split('.')
20 value = data
21 for k in keys:
22 if isinstance(value, dict) and k in value:
23 value = value[k]
24 else:
25 raise KeyError(f"Key '{k}' not found in configuration")
26 return value
27
28def update_key(key, new_value):
29 with lock:

Callers 15

mainFunction · 0.90
ask_gptFunction · 0.90
azure_ttsFunction · 0.90
openai_ttsFunction · 0.90
split_by_markFunction · 0.90
load_nlp_model.pyFile · 0.90
init_nlpFunction · 0.90
translateFunction · 0.90
process_input_fileFunction · 0.90
record_and_update_configFunction · 0.90
text_processing_sectionFunction · 0.85
process_textFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected