Fix chat defaults (#46)
* Aggiornato il gestore della chat per impostare i valori predefiniti per il modello e la strategia nel dropdown.
This commit was merged in pull request #46.
This commit is contained in:
committed by
GitHub
parent
830d1933b1
commit
93174afc81
@@ -79,6 +79,7 @@ class ChatManager:
|
|||||||
with gr.Row():
|
with gr.Row():
|
||||||
provider = gr.Dropdown(
|
provider = gr.Dropdown(
|
||||||
choices=self.inputs.list_models_names(),
|
choices=self.inputs.list_models_names(),
|
||||||
|
value=self.inputs.team_leader_model.label,
|
||||||
type="index",
|
type="index",
|
||||||
label="Modello da usare"
|
label="Modello da usare"
|
||||||
)
|
)
|
||||||
@@ -86,6 +87,7 @@ class ChatManager:
|
|||||||
|
|
||||||
style = gr.Dropdown(
|
style = gr.Dropdown(
|
||||||
choices=self.inputs.list_strategies_names(),
|
choices=self.inputs.list_strategies_names(),
|
||||||
|
value=self.inputs.strategy.label,
|
||||||
type="index",
|
type="index",
|
||||||
label="Stile di investimento"
|
label="Stile di investimento"
|
||||||
)
|
)
|
||||||
@@ -103,4 +105,4 @@ class ChatManager:
|
|||||||
clear_btn.click(self.gradio_clear, inputs=None, outputs=[chat.chatbot, chat.chatbot_state])
|
clear_btn.click(self.gradio_clear, inputs=None, outputs=[chat.chatbot, chat.chatbot_state])
|
||||||
save_btn.click(self.gradio_save, inputs=None, outputs=None)
|
save_btn.click(self.gradio_save, inputs=None, outputs=None)
|
||||||
load_btn.click(self.gradio_load, inputs=None, outputs=[chat.chatbot, chat.chatbot_state])
|
load_btn.click(self.gradio_load, inputs=None, outputs=[chat.chatbot, chat.chatbot_state])
|
||||||
return interface
|
return interface
|
||||||
|
|||||||
Reference in New Issue
Block a user