Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gpt3 prefix #1366

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/main/java/org/myrobotlab/service/Gpt3.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class Gpt3 extends Service<Gpt3Config> implements TextListener, TextPubli
private String currentChannelName;

private String currentChannelType;

public Gpt3(String n, String id) {
super(n, id);
}
Expand All @@ -85,6 +85,10 @@ public Response getResponse(String text) {
sleep();
responseText = "Ok, I will go to sleep";
}

if (c.prefix != null) {
text = c.prefix + " " + text;
}

if (!c.sleeping) {

Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/myrobotlab/service/config/Gpt3Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public class Gpt3Config extends ServiceConfig {
public String engine = "gpt-3.5-turbo"; // "text-davinci-003"
public String wakeWord = "wake";
public String sleepWord = "sleep";
/**
* static prefix to send to gpt3
* e.g. " talk like a pirate when responding, "
*/
public String prefix = null;

@Override
public Plan getDefault(Plan plan, String name) {
Expand Down
Binary file removed src/main/resources/resource/WebXr.png
Binary file not shown.