systemprompt-api 0.2.0

HTTP API server and gateway for systemprompt.io OS
Documentation
1
2
3
4
5
6
7
8
9
10
use axum::extract::Extension;
use axum::response::IntoResponse;

use crate::routes::stream::create_sse_stream;
use systemprompt_events::ANALYTICS_BROADCASTER;
use systemprompt_models::RequestContext;

pub async fn analytics_stream(Extension(req_ctx): Extension<RequestContext>) -> impl IntoResponse {
    create_sse_stream(req_ctx, &ANALYTICS_BROADCASTER, "Analytics").await
}