Skip to content

Commit 2eb91ce

Browse files
committed
initial cached_llm_action placeholder
1 parent b944cf9 commit 2eb91ce

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/dur_mvp/utils.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,23 @@ def effect_to_tag(term):
274274
out[tag] = {"max_pct": max_pct, "examples": examples}
275275
return out
276276

277+
# ==== Placeholder for Openai LLM mode ====
278+
def cached_llm_action(*args, **kwargs):
279+
"""
280+
Placeholder for LLM-based action text generation.
281+
282+
This stub keeps the DUR pipeline working in environments
283+
where we don't actually call an LLM (e.g., Kaggle without API keys).
284+
It returns a generic action string and a False review flag.
285+
"""
286+
text = (
287+
"LLM-generated action text is disabled in this environment. "
288+
"Please review this interaction in standard clinical references."
289+
)
290+
needs_review = False
291+
return text, needs_review
292+
293+
277294
# ==== From notebook cell 23 ====
278295
def generate_action_text(tag, drug_a, drug_b, driver, ex_a, ex_b, policy: ActionGenPolicy):
279296
"""

0 commit comments

Comments
 (0)