Skip to content

Commit

Permalink
set model parameters from ruleflow
Browse files Browse the repository at this point in the history
  • Loading branch information
pberlandier committed Sep 16, 2024
1 parent 317b24a commit 16cea68
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Binary file not shown.
Binary file not shown.
7 changes: 5 additions & 2 deletions customer-review-rules/rules/analyze customer review.rfl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
<TaskList>
<StartTask Identifier="task_0"/>
<RuleTask ExecutionMode="Fastpath" ExitCriteria="None" Identifier="determine review sentiment" Ordering="Literal">
<InitialActions Language="bal"><![CDATA[set the project id of 'the LLM service' to "2209af66-226e-400a-b72e-5efe778e0abb" ;
set the model id of 'the LLM service' to "google/flan-ul2" ;
set the repetition penalty of 'the LLM service' to 1.05 ;]]></InitialActions>
<RuleList>
<Rule Uuid="1754707d-4258-4b65-b759-0fbdf0e4d730"/>
<Rule Uuid="7cdfa6cd-5389-4ef1-8499-7191645db5a6"/>
Expand Down Expand Up @@ -54,12 +57,12 @@
<Data Name="node_2#width">128.70117</Data>
<Data Name="node_0#width">21.0</Data>
<Data Name="node_3#y">302.2189</Data>
<Data Name="node_4#x">64.3506</Data>
<Data Name="node_4#x">64.350586</Data>
<Data Name="node_4#y">207.31062</Data>
<Data Name="node_0#x">64.350586</Data>
<Data Name="node_0#y">10.5</Data>
<Data Name="node_1#x">64.350586</Data>
<Data Name="node_1#y">388.92004</Data>
<Data Name="node_1#y">388.92007</Data>
<Data Name="node_2#x">64.350586</Data>
<Data Name="node_2#y">105.05176</Data>
<Data Name="node_3#x">102.350586</Data>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
<name>run inference</name>
<uuid>7cdfa6cd-5389-4ef1-8499-7191645db5a6</uuid>
<locale>en_US</locale>
<definition><![CDATA[if
the sentiment of review is null
then
<definition><![CDATA[then
run inference on 'the LLM service' ;
set the sentiment of review to the sentiment from the output of 'the LLM service' ;
Expand Down
4 changes: 2 additions & 2 deletions customer-review-rules/rules/watsonx variables.var
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ilog.rules.studio.model.base:VariableSet xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ilog.rules.studio.model.base="http://ilog.rules.studio/model/base.ecore">
<name>watsonx variables</name>
<uuid>f2af8c4b-d764-49a9-b682-3b228d9f345a</uuid>
<variables name="url" type="java.lang.String" initialValue="&quot;https://eu-de.ml.cloud.ibm.com/ml/v1/text/generation?version=2023-05-29&quot;" verbalization="url"/>
<variables name="apikey" type="java.lang.String" initialValue="&quot;&lt;your-api-key>&quot;" verbalization="apikey"/>
<variables name="url" type="java.lang.String" initialValue="&quot;&lt;your-watsonx-instance-url>&quot;" verbalization="url"/>
<variables name="apikey" type="java.lang.String" initialValue="&quot;&lt;your-instance-api-key>&quot;" verbalization="apikey"/>
<variables name="llmService" type="com.ibm.odm.WatsonxAIRunner" initialValue="new com.ibm.odm.WatsonxAIRunner()" verbalization="the LLM service"/>
</ilog.rules.studio.model.base:VariableSet>

0 comments on commit 16cea68

Please sign in to comment.