cognate-core 0.1.0

Core traits, types, and HTTP client abstractions for the Cognate LLM framework
Documentation

Cognate Core — HTTP client, traits, and base types for LLM providers.

This crate provides the foundational abstractions for building provider-agnostic LLM applications with type-safe interfaces and zero-cost abstractions.

Quick start

use cognate_core::{Provider, Request, Message};

async fn run<P: Provider>(provider: &P) -> cognate_core::Result<()> {
    let response = provider
        .complete(
            Request::new()
                .with_model("gpt-4o-mini")
                .with_message(Message::user("Hello!")),
        )
        .await?;
    println!("{}", response.content());
    Ok(())
}