use async_trait::async_trait;
use super::{Flow, Plugin, PluginContext};
use crate::canonical::{ChatRequest, ChatResponse};
pub struct WebSearchPlugin;
#[async_trait]
impl Plugin for WebSearchPlugin {
fn id(&self) -> &'static str {
"web"
}
async fn pre_request(
&self,
_ctx: &PluginContext,
_req: &mut ChatRequest,
_resp: &mut Option<ChatResponse>,
) -> anyhow::Result<Flow> {
anyhow::bail!(
"plugin 'web' (Web Search) is enabled but not yet implemented: configure a search \
backend and implement WebSearchPlugin::pre_request"
)
}
}