more progress
This commit is contained in:
parent
6cedd587c6
commit
8c8e65f552
4 changed files with 10 additions and 2 deletions
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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":
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -473,6 +473,7 @@ function GUI(props: GUIProps) {
|
|||
<HeaderButtonWithText
|
||||
onClick={() => {
|
||||
setUsingFastModel((prev) => !prev);
|
||||
client?.changeDefaultModel();
|
||||
}}
|
||||
text={usingFastModel ? "gpt-3.5-turbo" : "gpt-4"}
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue