diff --git a/documentation/admin_workflow.MD b/documentation/admin_workflow.MD
new file mode 100644
index 0000000..9ce84dc
--- /dev/null
+++ b/documentation/admin_workflow.MD
@@ -0,0 +1,24 @@
+# Admin Workflow
+
+Backend includes the ability to dynamically create Assistants, Rag Connections, and LLM Connections
+
+## Content Retriever(RAG) Connction
+
+### Weaviate Example
+
+```json
+{
+ "baseRetrieverRequest": {
+ "contentRetrieverType": "weaviate",
+ "textKey": "source",
+ "metadata": ["source","page_number", "title"],
+ "index": "my_custom_index",
+ "scheme": "http",
+ "host": "my-weaviate-instance.svc:8080",
+ "apiKey" : "ABCDE12345"
+ },
+ "embeddingType": "noimc",
+ "name": "Example Rag Connection",
+ "description": "Example of a rag connection"
+}
+```
diff --git a/pom.xml b/pom.xml
index f7015d1..4601695 100644
--- a/pom.xml
+++ b/pom.xml
@@ -16,6 +16,8 @@
true
3.3.1
0.35.0
+ 0.21.0.CR1
+ 1.6.2
@@ -63,6 +65,11 @@
langchain4j-weaviate
${langchain4j.version}
+
dev.langchain4j
langchain4j-open-ai
@@ -76,7 +83,7 @@
io.quarkiverse.langchain4j
quarkus-langchain4j-hugging-face
- 0.18.0
+ ${quarkus.langchain4j.version}
io.quarkus
@@ -120,6 +127,18 @@
rest-assured
test
+
+ org.mapstruct
+ mapstruct
+ ${org.mapstruct.version}
+ provided
+
+
+ org.mapstruct
+ mapstruct-processor
+ ${org.mapstruct.version}
+ provided
+
diff --git a/src/main/java/com/redhat/composer/api/AssistantAdminAPI.java b/src/main/java/com/redhat/composer/api/AssistantAdminAPI.java
index f27df6b..68ec838 100644
--- a/src/main/java/com/redhat/composer/api/AssistantAdminAPI.java
+++ b/src/main/java/com/redhat/composer/api/AssistantAdminAPI.java
@@ -39,7 +39,7 @@ public List getLLMs() {
@POST
@Path("retrieverConnection")
public RetrieverConnectionEntity createRetrieverConnection(RetrieverRequest request) {
- return assistantService.creaRetrieverConnectionEntity(request);
+ return assistantService.createRetrieverConnectionEntity(request);
}
@GET
diff --git a/src/main/java/com/redhat/composer/api/EmbeddingAPI.java b/src/main/java/com/redhat/composer/api/EmbeddingAPI.java
index 6a1fceb..6fa0da2 100644
--- a/src/main/java/com/redhat/composer/api/EmbeddingAPI.java
+++ b/src/main/java/com/redhat/composer/api/EmbeddingAPI.java
@@ -5,7 +5,6 @@
import io.quarkus.security.Authenticated;
import jakarta.inject.Inject;
import jakarta.ws.rs.Consumes;
-import jakarta.ws.rs.GET;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
diff --git a/src/main/java/com/redhat/composer/api/VectorRetriverAPI.java b/src/main/java/com/redhat/composer/api/VectorRetriverAPI.java
index 0d27115..9bfe3e7 100644
--- a/src/main/java/com/redhat/composer/api/VectorRetriverAPI.java
+++ b/src/main/java/com/redhat/composer/api/VectorRetriverAPI.java
@@ -6,8 +6,9 @@
import com.redhat.composer.model.request.RetrieverRequest;
import com.redhat.composer.model.response.SourceResponse;
import com.redhat.composer.services.RetrieveService;
-import com.redhat.composer.util.MapperUtil;
+import com.redhat.composer.util.mappers.MapperUtil;
+import dev.langchain4j.rag.content.Content;
import io.quarkus.security.Authenticated;
import jakarta.inject.Inject;
import jakarta.ws.rs.POST;
@@ -24,10 +25,13 @@ public class VectorRetriverAPI {
@Inject
RetrieveService retrieveService;
+ @Inject
+ MapperUtil mapperUtil;
+
@POST
@Path("/sources")
public List retrieveSources(RetrieverRequest request, @QueryParam("message") String message) {
- return retrieveService.retrieveContent(request, message).stream().map(MapperUtil::toSourceResponse).toList();
+ return retrieveService.retrieveContent(request, message).stream().map(VectorRetriverAPI::toSourceResponse).toList();
}
@POST
@@ -39,7 +43,11 @@ public List