evolving_ideas.prompts.builder

evolving_ideas.prompts.builder

Attributes

Classes

PromptBuilder

Builds prompts by formatting a named template with dynamic context.

Module Contents

evolving_ideas.prompts.builder.logger
class evolving_ideas.prompts.builder.PromptBuilder(store: evolving_ideas.prompts.template_store.PromptTemplateStore | None = None)

Builds prompts by formatting a named template with dynamic context.

store
build(name: str, context: dict) str

Build a prompt by formatting a template with the given context.

Parameters:
  • name (str) – The name of the template

  • context (dict) – The context to format the template with

Returns:

Formatted context

Return type:

str