mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
chatbot connection
This commit is contained in:
+3
-2
@@ -78,9 +78,10 @@ public class ChatbotPresenter {
|
||||
return service;
|
||||
}
|
||||
|
||||
String promptChatbot() throws NotLoggedInException {
|
||||
public String promptChatbot(String project, String netlist, String prompt) throws NotLoggedInException {
|
||||
if (!CloudPresenter.Instance.isLoggedIn())
|
||||
throw new NotLoggedInException();
|
||||
return null;
|
||||
return getService().promptChatbot(CloudPresenter.Instance.getCurrentUsername(), CloudPresenter.Instance.getCurrentToken(),
|
||||
CloudPresenter.Instance.getMachineId(), project, netlist, prompt);
|
||||
}
|
||||
}
|
||||
|
||||
+5
-1
@@ -291,6 +291,10 @@ public class CloudPresenter {
|
||||
return ConfigurationManager.getInstance().readString(USERNAME_KEY, null);
|
||||
}
|
||||
|
||||
public String getCurrentToken() {
|
||||
return ConfigurationManager.getInstance().readString(TOKEN_KEY, null);
|
||||
}
|
||||
|
||||
public void updatePassword(String oldPassword, String newPassword) throws CloudException {
|
||||
String username = ConfigurationManager.getInstance().readString(USERNAME_KEY, null);
|
||||
|
||||
@@ -416,7 +420,7 @@ public class CloudPresenter {
|
||||
return properties;
|
||||
}
|
||||
|
||||
private String getMachineId() {
|
||||
public String getMachineId() {
|
||||
if (machineId == null) {
|
||||
try {
|
||||
InetAddress ip = InetAddress.getLocalHost();
|
||||
|
||||
Reference in New Issue
Block a user