Crate mockforge_template_expansion

Crate mockforge_template_expansion 

Source
Expand description

Template expansion utilities for request context variables

This crate provides Send-safe template expansion that does NOT use rng(). It is completely isolated from the templating module in mockforge-core to avoid Send issues in async contexts.

The key difference from mockforge-core::templating is that this crate only performs simple string replacements based on request context, and does not use any random number generation or other non-Send types.

Important: This crate does NOT depend on mockforge-core to avoid bringing rng() into scope. RequestContext is duplicated here.

Structs§

RequestContext
Request context for prompt template expansion

Functions§

expand_prompt_template
Expand template variables in a prompt string using request context
expand_templates_in_json
Expand template variables in a JSON value recursively using request context