Skip to content

Commit

Permalink
llm clear history
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick committed Jun 18, 2024
1 parent a98e016 commit ba23848
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/main/java/org/myrobotlab/service/LLM.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package org.myrobotlab.service;

import java.io.IOException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.LinkedHashMap;
Expand Down Expand Up @@ -357,6 +355,10 @@ public void attach(Attachable attachable) {
log.error("don't know how to attach a {}", attachable.getName());
}
}

public void clearHistory() {
userMessages.clear();
}

public static void main(String[] args) {
try {
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/resource/WebGui/app/service/js/LLMGui.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ angular.module("mrlapp.service.LLMGui", []).controller("LLMGuiCtrl", [
msg.send("save")
}

$scope.clearHistory = function () {
msg.send("clearHistory")
}

$scope.getResponse = function () {
$scope.saveValues()
msg.send("getResponse", $scope.text)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@
<tr>
<td>
</td>
<td><button class="btn btn-default" ng-click="saveValues()">save</button></td>
<td><button class="btn btn-default" ng-click="saveValues()">save</button>
<button class="btn btn-default" ng-click="clearHistory()">clear history</button>
</td>
<td>
<div ng-show="dirty">You must save configuration to make it persistent.</div>
</td>
Expand Down

0 comments on commit ba23848

Please sign in to comment.