Skip to content

Commit

Permalink
remove unused fields in Message classes
Browse files Browse the repository at this point in the history
  • Loading branch information
markpollack committed Aug 10, 2023
1 parent 8189459 commit 0f26819
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,18 @@

public class AssistantPromptTemplate extends PromptTemplate {

private boolean example = false;

public AssistantPromptTemplate(String template) {
super(template);
}

public AssistantPromptTemplate(String template, boolean example) {
super(template);
this.example = example;
}

@Override
public Prompt create() {
return new Prompt(new AssistantMessage(render()));
}

@Override
public Prompt create(Map<String, Object> model) {
return new Prompt(new AssistantMessage(render(model), this.example));
return new Prompt(new AssistantMessage(render(model)));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,12 @@
*/
public class AssistantMessage extends AbstractMessage {

private boolean example = false;

public AssistantMessage(String content) {
super(MessageType.ASSISTANT, content);
}

public AssistantMessage(String content, boolean example) {
super(MessageType.ASSISTANT, content);
this.example = example;
}

public AssistantMessage(String content, boolean example, Map<String, Object> properties) {
public AssistantMessage(String content, Map<String, Object> properties) {
super(MessageType.ASSISTANT, content, properties);
this.example = example;
}

public boolean isExample() {
return example;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,12 @@

public class FunctionMessage extends AbstractMessage {

private String functionName;

public FunctionMessage(String content, String functionName) {
public FunctionMessage(String content) {
super(MessageType.SYSTEM, content);
this.functionName = functionName;
}

public FunctionMessage(String content, String functionName, Map<String, Object> properties) {
public FunctionMessage(String content, Map<String, Object> properties) {
super(MessageType.SYSTEM, content, properties);
this.functionName = functionName;
}

public String getFunctionName() {
return functionName;
}

}

0 comments on commit 0f26819

Please sign in to comment.