model update, demo
This commit is contained in:
parent
fafa6633e9
commit
1462e1817e
10 changed files with 37 additions and 43 deletions
|
|
@ -50,7 +50,7 @@ import jakarta.inject.Inject;
|
|||
* @author rsoika
|
||||
*
|
||||
*/
|
||||
public class CognitoPlugin extends org.imixs.ai.rag.RAGIndexPlugin {
|
||||
public class CognitoPlugin extends org.imixs.ai.rag.workflow.RAGIndexPlugin {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(CognitoPlugin.class.getName());
|
||||
|
||||
|
|
@ -18,7 +18,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.imixs.ai.rag.RAGService;
|
||||
import org.imixs.ai.rag.index.IndexService;
|
||||
import org.imixs.workflow.ItemCollection;
|
||||
import org.imixs.workflow.WorkflowKernel;
|
||||
import org.imixs.workflow.engine.WorkflowService;
|
||||
|
|
@ -54,7 +54,7 @@ import jakarta.inject.Inject;
|
|||
* @author rsoika
|
||||
*
|
||||
*/
|
||||
public class OrderPlugin extends org.imixs.ai.rag.RAGIndexPlugin {
|
||||
public class OrderPlugin extends org.imixs.ai.rag.workflow.RAGIndexPlugin {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(OrderPlugin.class.getName());
|
||||
public static final String LINK_PROPERTY = "$workitemref";
|
||||
|
|
@ -63,7 +63,7 @@ public class OrderPlugin extends org.imixs.ai.rag.RAGIndexPlugin {
|
|||
private WorkflowService workflowService;
|
||||
|
||||
@Inject
|
||||
private RAGService ragService;
|
||||
private IndexService ragService;
|
||||
|
||||
@Override
|
||||
public ItemCollection run(ItemCollection workitem, ItemCollection event) throws PluginException {
|
||||
|
|
@ -81,7 +81,7 @@ public class OrderPlugin extends org.imixs.ai.rag.RAGIndexPlugin {
|
|||
|
||||
// read optional configuration form the model or imixs.properties....
|
||||
List<ItemCollection> ragIndexDefinitions = workflowService.evalWorkflowResultXML(event, "dynamixs-ai",
|
||||
RAGService.RAG_INDEX, workitem, false);
|
||||
IndexService.RAG_INDEX, workitem, false);
|
||||
|
||||
try {
|
||||
// INDEX Mode?
|
||||
|
|
@ -96,7 +96,10 @@ public class OrderPlugin extends org.imixs.ai.rag.RAGIndexPlugin {
|
|||
promptTemplate = chronicleTextBuilder.build();
|
||||
workitem.setItemValue("ai.chronicle.summary", promptTemplate);
|
||||
indexDefinition.setItemValue("promptTemplate", embedTemplate(promptTemplate));
|
||||
ragService.createIndex(ragIndexDefinitions, workitem, event);
|
||||
|
||||
loadPromptDefinition(indexDefinition, event);
|
||||
|
||||
ragService.indexWorkitem(indexDefinition, workitem);
|
||||
}
|
||||
}
|
||||
} catch (AdapterException e) {
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<imixs:value><![CDATA[org.imixs.marty.profile.MailPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.IntervalPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.SplitAndJoinPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.ai.rag.RAGIndexPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.ai.rag.workflow.RAGIndexPlugin]]></imixs:value>
|
||||
</imixs:item>
|
||||
<open-bpmn:auto-align>true</open-bpmn:auto-align>
|
||||
</bpmn2:extensionElements>
|
||||
|
|
@ -1050,9 +1050,6 @@ Betrag: <itemvalue>_amount</itemvalue> (Brutto € <itemvalue>_amount_brutto</it
|
|||
<dc:Bounds height="20.0" width="100.0" x="776.7044067382812" y="457.10797119140625"/>
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="participant_hnZfjA" id="BPMNShape_K70UMQ">
|
||||
<dc:Bounds height="210.0" width="800.0" x="0.0" y="0.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="event_l2Ew0A" id="BPMNShape_migdOg">
|
||||
<dc:Bounds height="36.0" width="36.0" x="687.0" y="317.0"/>
|
||||
<bpmndi:BPMNLabel id="BPMNLabel_4plqLg">
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
<imixs:item name="txtplugins" type="xs:string">
|
||||
<imixs:value><![CDATA[org.imixs.workflow.office.plugins.WorkitemLinkPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[ai.dynamixs.OrderPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.ai.rag.RAGIndexPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.ResultPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.RulePlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.marty.profile.ProfilePlugin]]></imixs:value>
|
||||
|
|
@ -37,7 +36,6 @@
|
|||
<imixs:value><![CDATA[org.imixs.marty.profile.MailPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.IntervalPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.SplitAndJoinPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[ai.dynamixs.cognition.CognitoPlugin]]></imixs:value>
|
||||
</imixs:item>
|
||||
<open-bpmn:auto-align>true</open-bpmn:auto-align>
|
||||
</bpmn2:extensionElements>
|
||||
|
|
@ -1597,7 +1595,7 @@ Product Details:
|
|||
<bpmn2:incoming>sequenceFlow_4DWhfA</bpmn2:incoming>
|
||||
<bpmn2:incoming>sequenceFlow_5oxu0g</bpmn2:incoming>
|
||||
<bpmn2:outgoing>sequenceFlow_4DUFiA</bpmn2:outgoing>
|
||||
<bpmn2:signalEventDefinition id="signalEventDefinition_LBYytA" signalRef="signal_4"/>
|
||||
<bpmn2:signalEventDefinition id="signalEventDefinition_LBYytA" signalRef="signal_6"/>
|
||||
</bpmn2:intermediateCatchEvent>
|
||||
<bpmn2:task id="task_HL0KNA" imixs:processid="1110" name="Product RETRIEVAL">
|
||||
<bpmn2:extensionElements>
|
||||
|
|
@ -2639,11 +2637,12 @@ Create a short briefing (3-5 bullet points):
|
|||
</bpmn2:association>
|
||||
</bpmn2:process>
|
||||
<bpmn2:signal id="signal_3" name="org.imixs.ai.workflow.OpenAIAPIAdapter"/>
|
||||
<bpmn2:signal id="signal_4" name="org.imixs.ai.rag.RAGRetrievalAdapter"/>
|
||||
<bpmn2:signal id="signal_4" name="org.imixs.ai.rag.workflow.RAGRetrievalAdapter"/>
|
||||
<bpmn2:message id="message_1" name="Message 1">
|
||||
<bpmn2:documentation id="documentation_lq3hSg"/>
|
||||
</bpmn2:message>
|
||||
<bpmn2:signal id="signal_5" name="org.imixs.ai.workflow.ImixsAIAssistantAdapter"/>
|
||||
<bpmn2:signal id="signal_6" name="org.imixs.archive.documents.OCRDocumentAdapter"/>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane bpmnElement="Collaboration_1" id="BPMNPlane_Process_1">
|
||||
<bpmndi:BPMNShape bpmnElement="Participant_1" id="BPMNShape_Participant_1" isHorizontal="true">
|
||||
|
|
@ -2806,9 +2805,9 @@ Create a short briefing (3-5 bullet points):
|
|||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="event_oOnn8A" id="BPMNShape_5MzWQg">
|
||||
<dc:Bounds height="36.0" width="36.0" x="1006.0" y="710.0"/>
|
||||
<dc:Bounds height="36.0" width="36.0" x="1007.0" y="707.0"/>
|
||||
<bpmndi:BPMNLabel id="BPMNLabel_tnZNmw">
|
||||
<dc:Bounds height="20.0" width="100.0" x="974.0" y="749.0"/>
|
||||
<dc:Bounds height="20.0" width="100.0" x="975.0" y="746.0"/>
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="event_YGXi9A" id="BPMNShape_yo3tuA">
|
||||
|
|
@ -3122,8 +3121,8 @@ Create a short briefing (3-5 bullet points):
|
|||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge bpmnElement="association_7W3CFQ" id="BPMNEdge_H9YzPg" sourceElement="BPMNShape_x00nYw" targetElement="BPMNShape_uok76A">
|
||||
<di:waypoint x="1078.0" y="400.0"/>
|
||||
<di:waypoint x="1078.0" y="399.0"/>
|
||||
<di:waypoint x="1065.0" y="399.0"/>
|
||||
<di:waypoint x="1078.0" y="377.0"/>
|
||||
<di:waypoint x="1065.0" y="377.0"/>
|
||||
<di:waypoint x="1065.0" y="353.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_AUsmbQ" id="BPMNEdge_xuojvg" sourceElement="BPMNShape_LHVlgA" targetElement="BPMNShape_qvXTpw">
|
||||
|
|
@ -3156,7 +3155,7 @@ Create a short briefing (3-5 bullet points):
|
|||
<di:waypoint x="1738.0" y="260.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_1TkjsQ" id="BPMNEdge_k0IlIw" sourceElement="BPMNShape_5MzWQg" targetElement="BPMNShape_Task_9">
|
||||
<di:waypoint x="1024.0" y="746.0"/>
|
||||
<di:waypoint x="1024.0" y="743.0"/>
|
||||
<di:waypoint x="1024.0" y="773.0"/>
|
||||
<di:waypoint x="1115.0" y="773.0"/>
|
||||
<di:waypoint x="1115.0" y="800.0"/>
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
<imixs:value><![CDATA[org.imixs.marty.profile.MailPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.IntervalPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.workflow.engine.plugins.SplitAndJoinPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.ai.rag.RAGIndexPlugin]]></imixs:value>
|
||||
<imixs:value><![CDATA[org.imixs.ai.rag.workflow.RAGIndexPlugin]]></imixs:value>
|
||||
</imixs:item>
|
||||
<open-bpmn:auto-align>true</open-bpmn:auto-align>
|
||||
</bpmn2:extensionElements>
|
||||
|
|
@ -1016,7 +1016,6 @@ result.isValid=true;
|
|||
</imixs:item>
|
||||
</bpmn2:extensionElements>
|
||||
<bpmn2:documentation id="documentation_405Wvg"><![CDATA[RAG Test]]></bpmn2:documentation>
|
||||
<bpmn2:signalEventDefinition id="signalEventDefinition_OmSXlg" signalRef="signal_4"/>
|
||||
<bpmn2:incoming>sequenceFlow_ppv0Qw</bpmn2:incoming>
|
||||
<bpmn2:incoming>sequenceFlow_crpgGw</bpmn2:incoming>
|
||||
<bpmn2:outgoing>sequenceFlow_N5KIRQ</bpmn2:outgoing>
|
||||
|
|
@ -1311,8 +1310,6 @@ Betrag: <itemvalue>_amount</itemvalue> (Brutto € <itemvalue>_amount_brutto</it
|
|||
<open-bpmn:auto-align/>
|
||||
</bpmn2:extensionElements>
|
||||
</bpmn2:process>
|
||||
<bpmn2:signal id="signal_3" name="org.imixs.workflow.wopi.WopiTemplateAdapter"/>
|
||||
<bpmn2:signal id="signal_4" name="org.imixs.ai.rag.RAGRetrievalAdapter"/>
|
||||
<bpmn2:message id="message_1" name="Message 1">
|
||||
<bpmn2:documentation id="documentation_lq3hSg"/>
|
||||
</bpmn2:message>
|
||||
|
|
@ -1409,9 +1406,9 @@ Betrag: <itemvalue>_amount</itemvalue> (Brutto € <itemvalue>_amount_brutto</it
|
|||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="IntermediateCatchEvent_10" id="BPMNShape_IntermediateCatchEvent_16">
|
||||
<dc:Bounds height="36.0" width="36.0" x="683.0" y="427.0"/>
|
||||
<dc:Bounds height="36.0" width="36.0" x="733.0" y="423.0"/>
|
||||
<bpmndi:BPMNLabel id="BPMNLabel_92" labelStyle="BPMNLabelStyle_1">
|
||||
<dc:Bounds height="20.0" width="100.0" x="652.7044067382812" y="462.10797119140625"/>
|
||||
<dc:Bounds height="20.0" width="100.0" x="702.7044067382812" y="458.10797119140625"/>
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="event_BKE6jw" id="BPMNShape_0qOF2w">
|
||||
|
|
@ -1488,10 +1485,8 @@ Betrag: <itemvalue>_amount</itemvalue> (Brutto € <itemvalue>_amount_brutto</it
|
|||
<bpmndi:BPMNLabel id="BPMNLabel_88"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge bpmnElement="SequenceFlow_42" id="BPMNEdge_SequenceFlow_43" sourceElement="BPMNShape_IntermediateCatchEvent_16" targetElement="BPMNShape_Task_9">
|
||||
<di:waypoint x="701.0" y="427.0"/>
|
||||
<di:waypoint x="701.0" y="394.0"/>
|
||||
<di:waypoint x="735.0" y="394.0"/>
|
||||
<di:waypoint x="735.0" y="360.0"/>
|
||||
<di:waypoint x="751.0" y="423.0"/>
|
||||
<di:waypoint x="751.0" y="360.0"/>
|
||||
<bpmndi:BPMNLabel id="BPMNLabel_94"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape bpmnElement="message_1" id="BPMNShape_5X9D7w">
|
||||
|
|
@ -1514,9 +1509,9 @@ Betrag: <itemvalue>_amount</itemvalue> (Brutto € <itemvalue>_amount_brutto</it
|
|||
<di:waypoint x="386.0" y="335.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape bpmnElement="event_qTIbqA" id="BPMNShape_0OS0TQ">
|
||||
<dc:Bounds height="36.0" width="36.0" x="553.0" y="317.0"/>
|
||||
<dc:Bounds height="36.0" width="36.0" x="555.0" y="317.0"/>
|
||||
<bpmndi:BPMNLabel id="BPMNLabel_S00mag">
|
||||
<dc:Bounds height="20.0" width="100.0" x="521.0" y="356.0"/>
|
||||
<dc:Bounds height="20.0" width="100.0" x="523.0" y="356.0"/>
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="dataObject_axJA7Q" id="BPMNShape_3PbNFQ">
|
||||
|
|
@ -1526,19 +1521,21 @@ Betrag: <itemvalue>_amount</itemvalue> (Brutto € <itemvalue>_amount_brutto</it
|
|||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge bpmnElement="association_JGXYyg" id="BPMNEdge_bHPaEg" sourceElement="BPMNShape_0OS0TQ" targetElement="BPMNShape_3PbNFQ">
|
||||
<di:waypoint x="571.0" y="353.0"/>
|
||||
<di:waypoint x="571.0" y="387.0"/>
|
||||
<di:waypoint x="573.0" y="353.0"/>
|
||||
<di:waypoint x="573.0" y="387.0"/>
|
||||
<di:waypoint x="571.0" y="387.0"/>
|
||||
<di:waypoint x="571.0" y="420.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape bpmnElement="event_y0smQw" id="BPMNShape_JqPTSA">
|
||||
<dc:Bounds height="36.0" width="36.0" x="423.0" y="427.0"/>
|
||||
<dc:Bounds height="36.0" width="36.0" x="422.0" y="427.0"/>
|
||||
<bpmndi:BPMNLabel id="BPMNLabel_CUZv5A">
|
||||
<dc:Bounds height="20.0" width="100.0" x="391.0" y="466.0"/>
|
||||
<dc:Bounds height="20.0" width="100.0" x="390.0" y="466.0"/>
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_4DUFiA" id="BPMNEdge_SHExwQ" sourceElement="BPMNShape_JqPTSA" targetElement="BPMNShape_Task_5">
|
||||
<di:waypoint x="441.0" y="427.0"/>
|
||||
<di:waypoint x="440.0" y="427.0"/>
|
||||
<di:waypoint x="440.0" y="394.0"/>
|
||||
<di:waypoint x="441.0" y="394.0"/>
|
||||
<di:waypoint x="441.0" y="360.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape bpmnElement="event_qb0xXA" id="BPMNShape_TZlLTw">
|
||||
|
|
@ -1555,10 +1552,10 @@ Betrag: <itemvalue>_amount</itemvalue> (Brutto € <itemvalue>_amount_brutto</it
|
|||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_crpgGw" id="BPMNEdge_8QT0JQ" sourceElement="BPMNShape_Task_5" targetElement="BPMNShape_0OS0TQ">
|
||||
<di:waypoint x="496.0" y="335.0"/>
|
||||
<di:waypoint x="553.0" y="335.0"/>
|
||||
<di:waypoint x="555.0" y="335.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_N5KIRQ" id="BPMNEdge_q8K0wQ" sourceElement="BPMNShape_0OS0TQ" targetElement="BPMNShape_Task_9">
|
||||
<di:waypoint x="589.0" y="335.0"/>
|
||||
<di:waypoint x="591.0" y="335.0"/>
|
||||
<di:waypoint x="696.0" y="335.0"/>
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge bpmnElement="sequenceFlow_HCxYvw" id="BPMNEdge_HrTn1A" sourceElement="BPMNShape_Task_9" targetElement="BPMNShape_Pgpsrw">
|
||||
|
|
|
|||
|
|
@ -518,7 +518,8 @@ result.isValid=true;
|
|||
<imixs:item name="txtactivityresult" type="xs:string">
|
||||
<imixs:value><![CDATA[<item name="comment" ignore="true"/>
|
||||
<validation name="required">false</validation>
|
||||
<ml-config name="status">suggest</ml-config>]]></imixs:value>
|
||||
<ml-config name="status">suggest</ml-config>
|
||||
<item name="process">Finance</item>]]></imixs:value>
|
||||
</imixs:item>
|
||||
<imixs:item name="txtname" type="xs:string">
|
||||
<imixs:value><![CDATA[Speichern]]></imixs:value>
|
||||
|
|
@ -1074,7 +1075,7 @@ result.isValid=true;
|
|||
</imixs:item>
|
||||
<imixs:item name="txtactivityresult" type="xs:string">
|
||||
<imixs:value><![CDATA[<item name="comment" ignore="true"/>
|
||||
<item name="process">Management</item>]]></imixs:value>
|
||||
<item name="process">Finance</item>]]></imixs:value>
|
||||
</imixs:item>
|
||||
<imixs:item name="txtname" type="xs:string">
|
||||
<imixs:value><![CDATA[Speichern]]></imixs:value>
|
||||
|
|
@ -2509,9 +2510,6 @@ if ( workitem.getItemValueString('txtcomment')==='') {
|
|||
<dc:Bounds height="20.0" width="100.0" x="193.0" y="223.0"/>
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape bpmnElement="participant_mrZq8Q" id="BPMNShape_Q21pog">
|
||||
<dc:Bounds height="210.0" width="800.0" x="0.0" y="0.0"/>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge bpmnElement="SequenceFlow_8" id="BPMNEdge_SequenceFlow_9" sourceElement="BPMNShape_EventBasedGateway_2" targetElement="BPMNShape_IntermediateCatchEvent_7">
|
||||
<di:waypoint x="500.0" y="505.0"/>
|
||||
<di:waypoint x="527.0" y="505.0"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue