Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /BerriAI_litellm /litellm /proxy /prompts /init_prompts.py
| """ | |
| Similar to init_guardrails.py, but for prompts. | |
| """ | |
| from typing import Final | |
| from litellm._logging import verbose_proxy_logger | |
| def init_prompts( | |
| all_prompts: list[dict], | |
| config_file_path: str | None = None, | |
| ): | |
| from litellm.types.prompts.init_prompts import PromptSpec | |
| from .prompt_registry import IN_MEMORY_PROMPT_REGISTRY | |
| prompt_list: Final[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("\nPrompt List:%s\n", prompt_list) | |
Xet Storage Details
- Size:
- 748 Bytes
- Xet hash:
- cdc7cda48efc92b4c245077c5fff4596a57075a0ddd0cfa5c2252bb9bfc0e591
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.