Fix chat defaults #46

Merged
Berack96 merged 5 commits from fix-chat-default-model into main 2025-10-27 12:41:50 +01:00

View File

@@ -79,6 +79,7 @@ class ChatManager:
with gr.Row():
provider = gr.Dropdown(
choices=self.inputs.list_models_names(),
value=self.inputs.team_leader_model.label,
type="index",
copilot-pull-request-reviewer[bot] commented 2025-10-24 18:38:23 +02:00 (Migrated from github.com)
Review

Setting value directly on a Gradio component after creation may not update the displayed default. Consider using the value parameter in the gr.Dropdown() constructor instead: value=self.inputs.team_leader_model.label.

Setting `value` directly on a Gradio component after creation may not update the displayed default. Consider using the `value` parameter in the `gr.Dropdown()` constructor instead: `value=self.inputs.team_leader_model.label`.
copilot-pull-request-reviewer[bot] commented 2025-10-24 18:38:23 +02:00 (Migrated from github.com)
Review

Setting value directly on a Gradio component after creation may not update the displayed default. Consider using the value parameter in the gr.Dropdown() constructor instead: value=self.inputs.strategy.label.

Setting `value` directly on a Gradio component after creation may not update the displayed default. Consider using the `value` parameter in the `gr.Dropdown()` constructor instead: `value=self.inputs.strategy.label`.
label="Modello da usare"
)
@@ -86,6 +87,7 @@ class ChatManager:
style = gr.Dropdown(
choices=self.inputs.list_strategies_names(),
value=self.inputs.strategy.label,
type="index",
label="Stile di investimento"
)
@@ -103,4 +105,4 @@ class ChatManager:
clear_btn.click(self.gradio_clear, inputs=None, outputs=[chat.chatbot, chat.chatbot_state])
save_btn.click(self.gradio_save, inputs=None, outputs=None)
load_btn.click(self.gradio_load, inputs=None, outputs=[chat.chatbot, chat.chatbot_state])
return interface
return interface