Skip to content

Commit 9b7e64f

Browse files
committed
Fix testings under ai_test feature
1 parent bd03407 commit 9b7e64f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

aiscript-vm/src/ai/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ pub struct ModelConfig {
6060
impl Default for ModelConfig {
6161
fn default() -> Self {
6262
ModelConfig {
63+
#[cfg(feature = "ai_test")]
64+
api_key: "".into(),
65+
#[cfg(not(feature = "ai_test"))]
6366
api_key: env::var("OPENAI_API_KEY")
6467
.expect("Expect `OPENAI_API_KEY` environment variable."),
6568
api_endpoint: Some(OPENAI_API_ENDPOINT.to_string()),

0 commit comments

Comments
 (0)