use-ai-prompt 0.0.1

AI prompt metadata primitives for RustUse.
Documentation
  • Coverage
  • 1.12%
    1 out of 89 items documented1 out of 37 items with examples
  • Size
  • Source code size: 11.82 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.24 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-ai
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-ai-prompt

AI prompt metadata primitives for RustUse.

Experimental

use-ai-prompt is experimental while use-ai remains below 0.3.0.

Example

use use_ai_prompt::{PromptFormat, PromptName, PromptTemplate, PromptText};

let name = PromptName::new("support-triage")?;
let text = PromptText::new("Classify the support request")?;
let template = PromptTemplate::new(name, text, PromptFormat::Markdown);

assert_eq!(template.name().as_str(), "support-triage");
assert_eq!(template.text().value(), "Classify the support request");
assert_eq!(template.format(), PromptFormat::Markdown);
# Ok::<(), use_ai_prompt::AiPromptError>(())

Scope

  • Prompt names, identifiers, text, variables, parts, instructions, formats, and status labels.
  • Prompt template metadata only.

Non-goals

  • Rendering prompts, calling models, loading files, executing tools, or enforcing policies.

License

Licensed under either Apache-2.0 or MIT.