cogito-openai

Crates.iocogito-openai
lib.rscogito-openai
version0.3.0
created_at2025-10-25 00:57:00.114784+00
updated_at2025-12-02 23:17:52.335066+00
descriptionOpenAI client implementation for Cogito
homepage
repositoryhttps://github.com/mdippery/cogito
max_upload_size
id1899517
size114,399
Michael Dippery (mdippery)

documentation

https://docs.rs/cogito-openai

README

cogito-openai

cogito-openai is an OpenAI provider that adheres to the Cogito specification.

Usage

use cogito::client::{AIClient, AIRequest, AIResponse};
use cogito_openai::OpenAIModel;
use cogito_openai::client::{OpenAIClient, OpenAIRequest};
use hypertyper::prelude::*;

let auth = Auth::from_env("OPENAI_API_KEY")?;
let factory = HttpClientFactory::new(env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
let client = OpenAIClient::new(auth, factory);
let request = OpenAIRequest::default().model(OpenAIModel::Gpt5).input("Write me a haiku.");
let response = client.send(&request).await?.result();

See the Cogito docs and Hypertyper docs for more information.

License

Cogito is licensed under the terms of the Apache 2.0 license. Please see the LICENSE file accompanying this source code or visit apache.org for more information on licensing.

Commit count: 0

cargo fmt