fa45d8aa5f
- health_checklist.json: 192.168.1.122→node122
- ocr_client.py: docstring IP→node122
- docs/market-data-requirements.md: IP→node122
- 所有API调用通过ProxyHandler({})绕过系统代理
Privoxy对node122:18003返回500,直连正常
29 lines
758 B
Python
29 lines
758 B
Python
"""
|
|
Similar to init_guardrails.py, but for prompts.
|
|
"""
|
|
|
|
from typing import Dict, List, Optional
|
|
|
|
from litellm._logging import verbose_proxy_logger
|
|
|
|
|
|
def init_prompts(
|
|
all_prompts: List[Dict],
|
|
config_file_path: Optional[str] = None,
|
|
):
|
|
from litellm.types.prompts.init_prompts import PromptSpec
|
|
|
|
from .prompt_registry import IN_MEMORY_PROMPT_REGISTRY
|
|
|
|
prompt_list: List[PromptSpec] = []
|
|
|
|
for prompt in all_prompts:
|
|
initialized_prompt = IN_MEMORY_PROMPT_REGISTRY.initialize_prompt(
|
|
prompt=PromptSpec(**prompt),
|
|
config_file_path=config_file_path,
|
|
)
|
|
if initialized_prompt:
|
|
prompt_list.append(initialized_prompt)
|
|
|
|
verbose_proxy_logger.debug(f"\nPrompt List:{prompt_list}\n")
|