nexil 0.6.2

Provider-agnostic LLM toolkit — streaming, tool calls, tape storage, OAuth
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
pub mod anthropic;
pub mod openai;

use crate::adapter::ProviderAdapter;
use crate::clients::parsing::TransportKind;

pub fn adapter_for_transport(transport: TransportKind) -> &'static dyn ProviderAdapter {
    match transport {
        TransportKind::Messages => &anthropic::ANTHROPIC_ADAPTER,
        TransportKind::Completion | TransportKind::Responses => &openai::OPENAI_ADAPTER,
    }
}