Skip to main content

Crate rosetta_aisp_llm

Crate rosetta_aisp_llm 

Source
Expand description

Rosetta AISP LLM Fallback

Provides LLM-powered fallback for AISP conversion when deterministic Rosetta mappings have low confidence. Uses Claude SDK for intelligent prose-to-symbol translation.

§Example

use rosetta_aisp_llm::{convert_with_fallback, ConversionOptionsExt};

let prose = "Define a type User with valid credentials";
let result = convert_with_fallback(prose, None).await;
println!("Output: {}", result.output);
println!("Used LLM: {}", result.used_fallback);

Structs§

AispConverter
AISP Converter
ClaudeFallback
Claude SDK fallback provider
ConversionOptions
Conversion options
ConversionOptionsExt
Extended conversion options with LLM fallback support
ConversionResult
Conversion result
LlmResult
LLM conversion result
RosettaStone
Rosetta Stone converter
TokenStats
Token statistics

Enums§

ConversionTier
Conversion tier

Traits§

LlmProvider
LLM provider trait for fallback conversions

Functions§

convert_with_fallback
Convert prose to AISP with optional LLM fallback