Refactor codebase for consistency and readability
- Standardize array and vector formatting for clarity. - Adjust spacing and indentation in examples and TUI code. - Ensure proper newline usage across files (e.g., LICENSE, TOML files, etc.). - Simplify `.to_string()` and `.ok()` calls for brevity.
This commit is contained in:
@@ -16,10 +16,16 @@ impl Provider for MyCustomProvider {
|
||||
}
|
||||
|
||||
async fn chat(&self, session: &Session, model: &Model) -> Result<String, anyhow::Error> {
|
||||
println!("Custom provider received chat request for model: {}", model.name);
|
||||
println!(
|
||||
"Custom provider received chat request for model: {}",
|
||||
model.name
|
||||
);
|
||||
// In a real implementation, you would send the session data to an API.
|
||||
let message_count = session.get_messages().len();
|
||||
Ok(format!("This is a custom response. You have {} messages in your session.", message_count))
|
||||
Ok(format!(
|
||||
"This is a custom response. You have {} messages in your session.",
|
||||
message_count
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user