llm-chain 0.13.0

A library for running chains of LLMs (such as ChatGPT) in series to complete complex tasks, such as text summation.
Documentation
1
2
3
4
5
6
7
8
9
use tera::Tera;

use crate::Parameters;

// Renders the given `template` using the `context` provided as `Parameters`.
// Returns a `Result` with a `String` containing the rendered template or an error.
pub fn render(template: &str, context: &Parameters) -> Result<String, tera::Error> {
    Tera::one_off(template, &context.to_tera(), false)
}