apingali Claude Sonnet 4.6 commited on
Commit
a6762b3
·
1 Parent(s): 7cb4609

feat(drive-and-save): add llm config block

Browse files

Append llm: block to config.yaml with zerogpu_model_id, hf_model_id,
gpu_seconds, recommendation_max_sentences, and medical_disclaimer.
Add test_config_has_llm_block to verify the block is present and valid.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (2) hide show
  1. config.yaml +7 -0
  2. test_core.py +11 -0
config.yaml CHANGED
@@ -27,3 +27,10 @@ funnel:
27
  ui:
28
  approx_label: true
29
  disclaimer: "Published negotiated rates, not quotes — your out-of-pocket depends on your plan."
 
 
 
 
 
 
 
 
27
  ui:
28
  approx_label: true
29
  disclaimer: "Published negotiated rates, not quotes — your out-of-pocket depends on your plan."
30
+
31
+ llm:
32
+ zerogpu_model_id: "microsoft/Phi-4-mini-instruct" # env ZEROGPU_MODEL_ID overrides
33
+ hf_model_id: "microsoft/Phi-4-mini-instruct" # serverless fallback (needs an Inference Provider; local-dev only)
34
+ gpu_seconds: 45 # env ZEROGPU_DURATION_SECONDS overrides (env wins)
35
+ recommendation_max_sentences: 3
36
+ medical_disclaimer: "This compares published negotiated prices, not your out-of-pocket cost, and is not medical advice."
test_core.py CHANGED
@@ -230,3 +230,14 @@ def test_build_demo_returns_blocks():
230
  import gradio as gr
231
  demo = app_module.build_demo()
232
  assert isinstance(demo, gr.Blocks)
 
 
 
 
 
 
 
 
 
 
 
 
230
  import gradio as gr
231
  demo = app_module.build_demo()
232
  assert isinstance(demo, gr.Blocks)
233
+
234
+
235
+ # ---------------------------------------------------------------------------
236
+ # Part I — llm config + module
237
+ # ---------------------------------------------------------------------------
238
+
239
+ def test_config_has_llm_block():
240
+ cfg = core.load_config()
241
+ assert cfg["llm"]["zerogpu_model_id"]
242
+ assert cfg["llm"]["recommendation_max_sentences"] >= 1
243
+ assert "not medical advice" in cfg["llm"]["medical_disclaimer"]