langtest.prompts.PromptManager#
- class PromptManager(*args, **kwargs)#
Bases:
object
- __init__()#
Methods
__init__
()add_prompt
(name, prompt_config)Add a prompt template to the prompt manager.
from_prompt_configs
(prompt_configs)Create a prompt manager from a dictionary of prompt configurations.
get_prompt
([name, hub])Get a prompt template based on the name.
reset
()Reset the prompt manager to its initial state.
Attributes
default_state
get_prompt_shot
prompt_configs
- add_prompt(name: str, prompt_config: dict)#
Add a prompt template to the prompt manager.
- classmethod from_prompt_configs(prompt_configs: dict)#
Create a prompt manager from a dictionary of prompt configurations.
- get_prompt(name: str | None = None, hub: str | None = None)#
Get a prompt template based on the name.
- reset()#
Reset the prompt manager to its initial state.