Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
onuratakan committed Jun 13, 2024
1 parent 43b49f6 commit cea6846
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions gpt_computer_assistant/gui/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,25 +154,28 @@ def activate_dark_mode_():

settings_dialog.layout().addWidget(predefined_agents_button)

if is_predefined_agents_setting_active():
predefined_agents_button.setText("Disable Predefined Agents (Bad Results, Short Response Time)")

def deactivate_predefined_agents_():
deactivate_predefined_agents_setting()
the_main_window.update_from_thread("Disabled Predefined Agents (Bad Results, Short Response Time)")
settings_dialog.close()

predefined_agents_button.clicked.connect(deactivate_predefined_agents_)
else:

def activate_predefined_agents_():
activate_predefined_agents_setting()
the_main_window.update_from_thread("Enabled Predefined Agents (Good Results, Long Response Time)")
try:
import crewai
if is_predefined_agents_setting_active():
predefined_agents_button.setText("Disable Predefined Agents (Bad Results, Short Response Time)")

def deactivate_predefined_agents_():
deactivate_predefined_agents_setting()
the_main_window.update_from_thread("Disabled Predefined Agents (Bad Results, Short Response Time)")
settings_dialog.close()

predefined_agents_button.clicked.connect(activate_predefined_agents_)


predefined_agents_button.clicked.connect(deactivate_predefined_agents_)
else:

def activate_predefined_agents_():
activate_predefined_agents_setting()
the_main_window.update_from_thread("Enabled Predefined Agents (Good Results, Long Response Time)")
settings_dialog.close()

predefined_agents_button.clicked.connect(activate_predefined_agents_)

except:
predefined_agents_button.setText("Install gpt-computer-assistant[agentic]")



Expand Down

0 comments on commit cea6846

Please sign in to comment.