// <auto-generated by typra-emitter>
// Code generated by Typra emitter; DO NOT EDIT.
#![allow(
unused_imports,
dead_code,
non_camel_case_types,
unused_variables,
clippy::all
)]
use super::super::agent::prompty::Prompty;
/// Extracts a clean, typed result from a raw LLM provider response.
#[async_trait::async_trait]
pub trait Processor: Send + Sync {
/// Extract a clean result from a raw LLM response
async fn process(
&self,
agent: &Prompty,
response: &serde_json::Value,
) -> Result<serde_json::Value, Box<dyn std::error::Error + Send + Sync>>;
/// Process a streaming response into a stream of StreamChunk items. Takes raw chunks from the executor and yields processed text, thinking, tool, or error chunks. Not all providers support streaming; the default implementation should signal lack of support.
async fn process_stream(
&self,
stream: &serde_json::Value,
) -> Result<serde_json::Value, Box<dyn std::error::Error + Send + Sync>> {
Err("not supported".into())
}
}