Files
rust-genai/examples/c01-openai.rs
Jeremy Chone 27f91b1554 . initial
2024-06-01 12:14:47 -07:00

13 lines
242 B
Rust

use genai::OpenAIClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// create new client
let api_key = std::env::var("OPENAI_API_KEY")?;
let oa_client = OpenAIClient::from_api_key(api_key);
//
Ok(())
}