Skip to content

Commit 2a02816

Browse files
authored
rename OpenAI env variable to be consistent with other env vars (#492)
also remove unnecessarily passing a body for is llm active route
1 parent ff290ee commit 2a02816

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/src/handlers/http/llm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ pub async fn make_llm_request(body: web::Json<AiPrompt>) -> Result<HttpResponse,
139139
}
140140
}
141141

142-
pub async fn is_llm_active(_body: web::Json<AiPrompt>) -> HttpResponse {
142+
pub async fn is_llm_active() -> HttpResponse {
143143
let is_active = matches!(&CONFIG.parseable.open_ai_key, Some(api_key) if api_key.len() > 3);
144144
HttpResponse::Ok()
145145
.content_type("application/json")

server/src/option.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ impl Server {
369369
.arg(
370370
Arg::new(Self::OPEN_AI_KEY)
371371
.long(Self::OPEN_AI_KEY)
372-
.env("OPENAI_API_KEY")
372+
.env("P_OPENAI_API_KEY")
373373
.value_name("STRING")
374374
.required(false)
375375
.help("Set OpenAI key to enable llm feature"),

0 commit comments

Comments
 (0)