| Crates.io | cogito-openai |
| lib.rs | cogito-openai |
| version | 0.3.0 |
| created_at | 2025-10-25 00:57:00.114784+00 |
| updated_at | 2025-12-02 23:17:52.335066+00 |
| description | OpenAI client implementation for Cogito |
| homepage | |
| repository | https://github.com/mdippery/cogito |
| max_upload_size | |
| id | 1899517 |
| size | 114,399 |
cogito-openai is an OpenAI provider that adheres to the Cogito specification.
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.
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.