codebridge-ai
Version:
Complete fullstack AI coding platform with AST-based code integration and local LLM support. Now with comprehensive web technology support (HTML/CSS/JS) plus JavaScript, Python, Rust, and C++.
21 lines • 870 B
JSON
{
"timestamp": "2025-08-02T16:16:37.548Z",
"model": "starcoder2:3b",
"language": "rust",
"scenario": "basic-safety",
"task": "Add Result type for safe division and handle zero",
"originalCode": "fn divide(a: f64, b: f64) -> f64 {\n a / b\n}",
"rawResponse": "\n\n```rust\nfn divide(a: f64, b: f64) -> Result<f64> {\n if b == 0.0 {\n return Err(\"Division by zero\") \n } else { \n Ok(a / b)\n }\n}\n```",
"improvedCode": "fn divide(a: f64, b: f64) -> Result<f64> {\n if b == 0.0 {\n return Err(\"Division by zero\") \n } else { \n Ok(a / b)\n }\n}",
"duration": 794,
"success": true,
"qualityMetrics": {
"hasCode": true,
"hasResultType": true,
"hasProperErrorHandling": true,
"score": 0.6923076923076924,
"rawScore": 0.9000000000000001,
"maxScore": 1.3
},
"error": null
}