diff options
-rw-r--r-- | continuedev/src/continuedev/core/autopilot.py | 7 | ||||
-rw-r--r-- | continuedev/src/continuedev/server/gui.py | 2 | ||||
-rw-r--r-- | extension/react-app/src/hooks/ContinueGUIClientProtocol.ts | 2 | ||||
-rw-r--r-- | extension/react-app/src/tabs/gui.tsx | 1 |
4 files changed, 10 insertions, 2 deletions
diff --git a/continuedev/src/continuedev/core/autopilot.py b/continuedev/src/continuedev/core/autopilot.py index 2ed77e4d..0b4b9b12 100644 --- a/continuedev/src/continuedev/core/autopilot.py +++ b/continuedev/src/continuedev/core/autopilot.py @@ -46,8 +46,11 @@ class Autopilot(ContinueBaseModel): return list(map(lambda x: {"name": x.name, "description": x.description}, self.continue_sdk.config.slash_commands)) or [] async def change_default_model(self): - # TODO: Implement this - temp = self.continue_sdk.config.slash_commands + print("Changing default model") + if self.continue_sdk.config.default_model == "gpt-4": + self.continue_sdk.config.default_model == "gpt-3.5-turbo" # not quite correct + else: + self.continue_sdk.config.default_model == "gpt-4" # not quite correct async def clear_history(self): self.history = History.from_empty() diff --git a/continuedev/src/continuedev/server/gui.py b/continuedev/src/continuedev/server/gui.py index 53a5f16b..9b36c704 100644 --- a/continuedev/src/continuedev/server/gui.py +++ b/continuedev/src/continuedev/server/gui.py @@ -77,6 +77,8 @@ class GUIProtocolServer(AbstractGUIProtocolServer): self.on_reverse_to_index(data["index"]) elif message_type == "retry_at_index": self.on_retry_at_index(data["index"]) + elif message_type == "change_default_model": + self.on_change_default_model() elif message_type == "clear_history": self.on_clear_history() elif message_type == "delete_at_index": diff --git a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts index 824bb086..6d9d1fdd 100644 --- a/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts +++ b/extension/react-app/src/hooks/ContinueGUIClientProtocol.ts @@ -13,6 +13,8 @@ abstract class AbstractContinueGUIClientProtocol { callback: (commands: { name: string; description: string }[]) => void ): void; + abstract changeDefaultModel(): void; + abstract sendClear(): void; abstract retryAtIndex(index: number): void; diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx index cbc0e8af..15121010 100644 --- a/extension/react-app/src/tabs/gui.tsx +++ b/extension/react-app/src/tabs/gui.tsx @@ -473,6 +473,7 @@ function GUI(props: GUIProps) { <HeaderButtonWithText onClick={() => { setUsingFastModel((prev) => !prev); + client?.changeDefaultModel(); }} text={usingFastModel ? "gpt-3.5-turbo" : "gpt-4"} > |