diff --git a/documentation/admin_workflow.MD b/documentation/ADMIN_WORKFLOW.MD similarity index 95% rename from documentation/admin_workflow.MD rename to documentation/ADMIN_WORKFLOW.MD index 9ce84dc..828ebb2 100644 --- a/documentation/admin_workflow.MD +++ b/documentation/ADMIN_WORKFLOW.MD @@ -17,7 +17,7 @@ Backend includes the ability to dynamically create Assistants, Rag Connections, "host": "my-weaviate-instance.svc:8080", "apiKey" : "ABCDE12345" }, - "embeddingType": "noimc", + "embeddingType": "nomic", "name": "Example Rag Connection", "description": "Example of a rag connection" } diff --git a/src/main/java/com/redhat/composer/config/retriever/embeddingModel/EmbeddingModelFactory.java b/src/main/java/com/redhat/composer/config/retriever/embeddingModel/EmbeddingModelFactory.java index 7d4ee6b..2f6fb6c 100644 --- a/src/main/java/com/redhat/composer/config/retriever/embeddingModel/EmbeddingModelFactory.java +++ b/src/main/java/com/redhat/composer/config/retriever/embeddingModel/EmbeddingModelFactory.java @@ -9,7 +9,7 @@ public class EmbeddingModelFactory { @Inject NomicLocalEmbeddingModelClient nomicEmbeddingClient; - public static final String NOMIC_EMBEDDING = "noimc"; + public static final String NOMIC_EMBEDDING = "nomic"; public static final String DEFAULT_EMBEDDING = NOMIC_EMBEDDING; diff --git a/src/main/java/com/redhat/composer/model/request/LLMRequest.java b/src/main/java/com/redhat/composer/model/request/LLMRequest.java index f25569a..1b46b59 100644 --- a/src/main/java/com/redhat/composer/model/request/LLMRequest.java +++ b/src/main/java/com/redhat/composer/model/request/LLMRequest.java @@ -8,6 +8,9 @@ public class LLMRequest { + private String name; + private String description; + private String modelType = StreamingModelFactory.DEFAULT_MODEL; private String url; @@ -18,13 +21,31 @@ public class LLMRequest { public LLMRequest() { } - public LLMRequest(String modelType, String url, String apiKey, String modelName) { + public LLMRequest(String name, String description, String modelType, String url, String apiKey, String modelName) { + this.name = name; + this.description = description; this.modelType = modelType; this.url = url; this.apiKey = apiKey; this.modelName = modelName; } + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return this.description; + } + + public void setDescription(String description) { + this.description = description; + } + public String getModelType() { return this.modelType; } @@ -57,6 +78,16 @@ public void setModelName(String modelName) { this.modelName = modelName; } + public LLMRequest name(String name) { + setName(name); + return this; + } + + public LLMRequest description(String description) { + setDescription(description); + return this; + } + public LLMRequest modelType(String modelType) { setModelType(modelType); return this; @@ -84,18 +115,19 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(modelType, url, apiKey, modelName); + return Objects.hash(name, description, modelType, url, apiKey, modelName); } @Override public String toString() { return "{" + - " modelType='" + getModelType() + "'" + + " name='" + getName() + "'" + + ", description='" + getDescription() + "'" + + ", modelType='" + getModelType() + "'" + ", url='" + getUrl() + "'" + ", apiKey='" + getApiKey() + "'" + ", modelName='" + getModelName() + "'" + "}"; } - } \ No newline at end of file diff --git a/src/main/java/com/redhat/composer/services/AssistantInfoService.java b/src/main/java/com/redhat/composer/services/AssistantInfoService.java index f946b8b..83857c4 100644 --- a/src/main/java/com/redhat/composer/services/AssistantInfoService.java +++ b/src/main/java/com/redhat/composer/services/AssistantInfoService.java @@ -66,6 +66,8 @@ public List getRetrieverConnections() { public LLMConnectionEntity createLLMConnection(LLMRequest request) { LLMConnectionEntity entity = new LLMConnectionEntity(); + entity.setName(request.getName()); + entity.setDescription(request.getDescription()); entity.setUrl(request.getUrl()); entity.setApiKey(request.getApiKey()); entity.setModelName(request.getModelName());