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

Admin assistant new fields #12

Merged
merged 2 commits into from
Dec 2, 2024
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
128 changes: 95 additions & 33 deletions src/main/java/com/redhat/composer/model/mongo/AssistantEntity.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
package com.redhat.composer.model.mongo;

import java.util.List;
import java.util.Objects;

import org.apache.commons.lang3.builder.EqualsBuilder;
Expand All @@ -8,115 +10,175 @@


@MongoEntity(collection = "assistant")
public class AssistantEntity extends BaseEntity {
public class AssistantEntity extends BaseEntity
{

String name;
String description;
String displayName;
String userPrompt;



ObjectId llmConnectionId;
List<String> exampleQuestions;

ObjectId llmConnectionId;
ObjectId retrieverConnectionId;



public AssistantEntity() {
public AssistantEntity()
{
}

public AssistantEntity(String name, String description, String displayName, ObjectId llmConnectionId, ObjectId retrieverConnectionId) {
public AssistantEntity(String name, String description, String displayName, String userPrompt,
List<String> exampleQuestions, ObjectId llmConnectionId, ObjectId retrieverConnectionId)
{
this.name = name;
this.description = description;
this.displayName = displayName;
this.userPrompt = userPrompt;
this.exampleQuestions = exampleQuestions;
this.llmConnectionId = llmConnectionId;
this.retrieverConnectionId = retrieverConnectionId;
}

public String getName() {
public String getName()
{
return this.name;
}

public void setName(String name) {
public void setName(String name)
{
this.name = name;
}

public String getDescription() {
public String getDescription()
{
return this.description;
}

public void setDescription(String description) {
public void setDescription(String description)
{
this.description = description;
}

public String getDisplayName() {
public String getDisplayName()
{
return this.displayName;
}

public void setDisplayName(String displayName) {
public void setDisplayName(String displayName)
{
this.displayName = displayName;
}

public ObjectId getLlmConnectionId() {

public List<String> getExampleQuestions()
{
return exampleQuestions;
}

public void setExampleQuestions(List<String> exampleQuestions)
{
this.exampleQuestions = exampleQuestions;
}

public String getUserPrompt()
{
return userPrompt;
}

public void setUserPrompt(String userPrompt)
{
this.userPrompt = userPrompt;
}

public ObjectId getLlmConnectionId()
{
return this.llmConnectionId;
}

public void setLlmConnectionId(ObjectId llmConnectionId) {
public void setLlmConnectionId(ObjectId llmConnectionId)
{
this.llmConnectionId = llmConnectionId;
}

public ObjectId getRetrieverConnectionId() {
public ObjectId getRetrieverConnectionId()
{
return this.retrieverConnectionId;
}

public void setRetrieverConnectionId(ObjectId retrieverConnectionId) {
public void setRetrieverConnectionId(ObjectId retrieverConnectionId)
{
this.retrieverConnectionId = retrieverConnectionId;
}

public AssistantEntity name(String name) {
public AssistantEntity name(String name)
{
setName(name);
return this;
}

public AssistantEntity description(String description) {
public AssistantEntity description(String description)
{
setDescription(description);
return this;
}

public AssistantEntity displayName(String displayName) {
public AssistantEntity displayName(String displayName)
{
setDisplayName(displayName);
return this;
}

public AssistantEntity llmConnectionId(ObjectId llmConnectionId) {
public AssistantEntity userPrompt(String userPrompt)
{
setUserPrompt(userPrompt);
return this;
}

public AssistantEntity exampleQuestions(List<String> exampleQuestions)
{
setExampleQuestions(exampleQuestions);
return this;
}


public AssistantEntity llmConnectionId(ObjectId llmConnectionId)
{
setLlmConnectionId(llmConnectionId);
return this;
}

public AssistantEntity retrieverConnectionId(ObjectId retrieverConnectionId) {
public AssistantEntity retrieverConnectionId(ObjectId retrieverConnectionId)
{
setRetrieverConnectionId(retrieverConnectionId);
return this;
}

@Override
public boolean equals(Object o) {
return EqualsBuilder.reflectionEquals(this, o);
public boolean equals(Object o)
{
return EqualsBuilder.reflectionEquals(this, o);
}

@Override
public int hashCode() {
return Objects.hash(name, description, displayName, llmConnectionId, retrieverConnectionId);
public int hashCode()
{
return Objects.hash(name, description, displayName, userPrompt, exampleQuestions, llmConnectionId,
retrieverConnectionId);
}

@Override
public String toString() {
public String toString()
{
return "{" +
" name='" + getName() + "'" +
", description='" + getDescription() + "'" +
", displayName='" + getDisplayName() + "'" +
", llmConnectionId='" + getLlmConnectionId() + "'" +
", retrieverConnectionId='" + getRetrieverConnectionId() + "'" +
"}";
" name='" + getName() + "'" +
", description='" + getDescription() + "'" +
", displayName='" + getDisplayName() + "'" +
", userPrompt='" + getUserPrompt() + "'" +
", exampleQuestions='" + getExampleQuestions() + "'" +
", llmConnectionId='" + getLlmConnectionId() + "'" +
", retrieverConnectionId='" + getRetrieverConnectionId() + "'" +
"}";
}

}
Loading
Loading