promptchine

Crates.iopromptchine
lib.rspromptchine
version0.1.0
created_at2025-12-07 17:53:23.150287+00
updated_at2025-12-07 17:53:23.150287+00
descriptionA simple prompt refinement and caching library using LLMs
homepage
repositoryhttps://github.com/hamzeghalebi/promptchine
max_upload_size
id1971996
size79,334
Hamze GHALEBI (hghalebi)

documentation

README

promptchine

A prompt refinement and caching library for Rust.

Install

[dependencies]
promptchine = { git = "https://github.com/yourusername/promptchine" }
tokio = { version = "1", features = ["full"] }

Usage

use promptchine::{Config, Prompter};

#[tokio::main]
async fn main() -> promptchine::Result<()> {
    let config = Config::from_env()?;
    let prompter = Prompter::new("your prompt", "cache_key", &config).await?;

    println!("{}", prompter.get());
    Ok(())
}

Configuration

Set GEMINI_API_KEY environment variable.

let config = Config::from_env()?
    .with_cache_dir("./cache")
    .with_model("gemini-2.0-flash");

License

MIT

Commit count: 0

cargo fmt