Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
```rust title="Rust"
use log::{info, warn, error};
impl Plugin for MyPlugin {
fn initialize(&self) -> Result<()> {
info!("Initializing plugin: {}", self.name());
Ok(())
}
fn shutdown(&self) -> Result<()> {
info!("Shutting down plugin: {}", self.name());
Ok(())
}
}
#[async_trait]
impl DocumentExtractor for MyPlugin {
async fn extract_bytes(
&self,
content: &[u8],
mime_type: &str,
_config: &ExtractionConfig,
) -> Result<ExtractionResult> {
info!("Extracting {} ({} bytes)", mime_type, content.len());
let result = ExtractionResult::default();
if result.content.is_empty() {
warn!("Extraction resulted in empty content");
}
Ok(result)
}
}
```