roder-core 0.2.1

Agentic software development tools and SDKs for Roder.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use futures::{Stream, StreamExt, stream};
use roder_api::inference::{CompletionMetadata, InferenceEvent, InferenceEventStream};

/// Every synthetic tool response must obey the same terminal contract as a
/// provider response; tool calls alone cannot make EOF a successful outcome.
pub(super) fn completed(
    events: impl Stream<Item = anyhow::Result<InferenceEvent>> + Send + 'static,
) -> InferenceEventStream {
    Box::pin(events.chain(stream::iter([Ok(InferenceEvent::Completed(
        CompletionMetadata {
            stop_reason: Some("tool_calls".into()),
            provider_response_id: None,
        },
    ))])))
}