mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-13 07:02:34 +00:00
feat: implement support for You Pro modes (#399)
* Implement support for You Pro modes: Default, Agent, Custom with various 3rd party models and Research * Update list of You modes/models depending on user having subscription * add default value for chatMode
This commit is contained in:
parent
acbe550810
commit
12cf5198f8
7 changed files with 132 additions and 11 deletions
|
|
@ -1,5 +1,7 @@
|
|||
package ee.carlrobert.codegpt.settings.service.you;
|
||||
|
||||
import ee.carlrobert.llm.client.you.completion.YouCompletionCustomModel;
|
||||
import ee.carlrobert.llm.client.you.completion.YouCompletionMode;
|
||||
import java.util.Objects;
|
||||
|
||||
public class YouSettingsState {
|
||||
|
|
@ -7,6 +9,8 @@ public class YouSettingsState {
|
|||
private String email = "";
|
||||
private boolean displayWebSearchResults = true;
|
||||
private boolean useGPT4Model;
|
||||
private YouCompletionMode chatMode = YouCompletionMode.DEFAULT;
|
||||
private YouCompletionCustomModel customModel;
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
|
|
@ -32,6 +36,22 @@ public class YouSettingsState {
|
|||
this.useGPT4Model = useGPT4Model;
|
||||
}
|
||||
|
||||
public YouCompletionMode getChatMode() {
|
||||
return chatMode;
|
||||
}
|
||||
|
||||
public void setChatMode(YouCompletionMode chatMode) {
|
||||
this.chatMode = chatMode;
|
||||
}
|
||||
|
||||
public YouCompletionCustomModel getCustomModel() {
|
||||
return customModel;
|
||||
}
|
||||
|
||||
public void setCustomModel(YouCompletionCustomModel customModel) {
|
||||
this.customModel = customModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
|
|
@ -43,11 +63,13 @@ public class YouSettingsState {
|
|||
YouSettingsState that = (YouSettingsState) o;
|
||||
return displayWebSearchResults == that.displayWebSearchResults
|
||||
&& useGPT4Model == that.useGPT4Model
|
||||
&& Objects.equals(email, that.email);
|
||||
&& Objects.equals(email, that.email)
|
||||
&& chatMode == that.chatMode
|
||||
&& customModel == that.customModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(displayWebSearchResults, useGPT4Model, email);
|
||||
return Objects.hash(displayWebSearchResults, useGPT4Model, email, chatMode, customModel);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue