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§
- Request
Context - 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