AppFlowy/frontend/rust-lib/flowy-ai/tests/util/mod.rs
Nathan.fooo 6ba7fc0317
feat: openai and stabilityai integration (#3439)
* chore: create trait

* test: add tests

* chore: remove log

* chore: disable log
2023-09-21 12:41:52 +08:00

9 lines
295 B
Rust

use flowy_ai::config::OpenAISetting;
// To run the OpenAI test, you need to create a .env file in the flowy-ai folder.
// Use the format: OPENAI_API_KEY=your_api_key
pub fn get_openai_config() -> Option<OpenAISetting> {
dotenv::from_filename(".env").ok()?;
OpenAISetting::from_env().ok()
}