@danhachuel/thunderbolt 0.3.87 → 0.3.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/main.py +14 -13
- package/package.json +1 -1
package/app/main.py
CHANGED
|
@@ -5473,28 +5473,29 @@ def _render_llm_card(settings: dict[str, Any], cards: list[dict[str, Any]], inde
|
|
|
5473
5473
|
if not isinstance(model_catalog, list):
|
|
5474
5474
|
model_catalog = []
|
|
5475
5475
|
current_model = str(card.get("model") or "").strip()
|
|
5476
|
-
manual_model = "__manual_model__"
|
|
5477
5476
|
discovered_models = [str(item).strip() for item in model_catalog if str(item).strip()]
|
|
5478
|
-
|
|
5477
|
+
default_models = [
|
|
5478
|
+
"gpt-4.1-mini",
|
|
5479
|
+
"gpt-4o-mini",
|
|
5480
|
+
"meta/llama-3.1-8b-instruct",
|
|
5481
|
+
"meta/llama-3.1-70b-instruct",
|
|
5482
|
+
"meta/llama-3.3-70b-instruct",
|
|
5483
|
+
"nvidia/llama-3.1-nemotron-70b-instruct",
|
|
5484
|
+
] if definition.code == "openai" else []
|
|
5485
|
+
options = ["__select_model__", *list(dict.fromkeys([*discovered_models, *default_models]))]
|
|
5479
5486
|
# Mantém modelos guardados mesmo quando a descoberta ainda não foi
|
|
5480
5487
|
# executada ou quando o provider deixou de os devolver temporariamente.
|
|
5481
5488
|
if current_model and current_model not in options:
|
|
5482
|
-
options.insert(
|
|
5483
|
-
options.append(manual_model)
|
|
5489
|
+
options.insert(1, current_model)
|
|
5484
5490
|
selected = st.selectbox(
|
|
5485
5491
|
"Modelo",
|
|
5486
5492
|
options,
|
|
5487
|
-
index=options.index(current_model) if current_model in options else
|
|
5488
|
-
format_func=lambda value: "
|
|
5489
|
-
help="Seleccione um modelo
|
|
5493
|
+
index=options.index(current_model) if current_model in options else 0,
|
|
5494
|
+
format_func=lambda value: "Seleccione um modelo" if value == "__select_model__" else value,
|
|
5495
|
+
help="Seleccione um modelo da lista ou actualize o catálogo a partir do endpoint do provider.",
|
|
5490
5496
|
key=f"llm_card_{card_id}_model_select",
|
|
5491
5497
|
)
|
|
5492
|
-
model =
|
|
5493
|
-
"Modelo manual",
|
|
5494
|
-
value=current_model if selected == manual_model and current_model not in discovered_models else "",
|
|
5495
|
-
help="ID do modelo usado pelo endpoint Chat Completions.",
|
|
5496
|
-
key=f"llm_card_{card_id}_model_manual",
|
|
5497
|
-
) if selected == manual_model else selected
|
|
5498
|
+
model = "" if selected == "__select_model__" else selected
|
|
5498
5499
|
base_url = str(card.get("base_url") or definition.default_base_url)
|
|
5499
5500
|
endpoint_col, action_col = st.columns([1.65, 1.05])
|
|
5500
5501
|
with endpoint_col:
|
package/package.json
CHANGED