cpee-llm 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +179 -1
  3. data/cpee-llm.gemspec +2 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e0d18f88f4bc0727522bc34d61c10df0e565d1eb07c741d5205cdf2028b1b8b
4
- data.tar.gz: 00e8d8cd775a32eed1a95b0b10497c506af54cfc20c9eafd37a1f0b971af5c78
3
+ metadata.gz: 646927187c9c5794a457b8f0d41fbc9d791c5727a9c70ab58201959aa6617097
4
+ data.tar.gz: c39a4b3375b52eb5d546bc909a56d0396a5b35ac4a568e368d827eed55b76818
5
5
  SHA512:
6
- metadata.gz: 7f687a3d87195bc7780ec21c21ad5b24dbbaf8b406c5268b41fe991a3bf47c4bcbf9298bb3cdf227d9e0be80aad852add68d868023ba03ff52f0db07d39207d1
7
- data.tar.gz: 00d10455ce802848328d76d9f6312260d6ffba07639348218dc91ef9d1720af07673f32d55599201eb3d3701fc4bed75c9a63d813bff39ca568720c6d3d5f7cf
6
+ metadata.gz: bbda644521022ad10e07229ff3d22b73dad79ab9fae820fcf148db6791d68a775261e40ced4f15691fe779e5d9d198fd6a7e812ab48cd21c9b65a4fd038be22f
7
+ data.tar.gz: 80cbabf613f66a03da91eceeda7541730c833acf573c63315f827309fe97614774334e5681a102b53dc5c61ae96020b0cae2a8b45ee70bf808d7941880dc4d15
data/README.md CHANGED
@@ -1,7 +1,185 @@
1
1
  # CPEE-LLM
2
2
 
3
- CPEE Conversational Agents
3
+ This gem realizes the 3 CPEE Conversational Agents
4
4
 
5
5
  * CM-A for creating models
6
6
  * EP-A for selecting endpoints
7
7
  * DF-A for creating and validating dataflow
8
+
9
+ # Installation
10
+
11
+ ```bash
12
+ gem install --user cpee-llm
13
+ mkdir ~/run
14
+ cd ~/run
15
+ cpee-llm new cllm # scaffold; you maybe need to add installed bins to PATH
16
+ cd cllm
17
+ vim cpee-llm.conf # only add the connect adapters you need
18
+ vim connect_gemini # add your key
19
+ vim connect_gpt # add your key
20
+ vim connect_morpheus # add your key, and change url of you morpheus hosting
21
+ # connect adapters can be added or deleted as you wish, see rubyllm for
22
+ # possible config options. The myllm variable always contains the requested
23
+ # model.
24
+ ./cpee-llm start
25
+ ```
26
+
27
+ These commands install and scaffold a sample server. In the same directory you
28
+ see a set of sample connectors.
29
+
30
+ # Supported LLMs
31
+
32
+ We support all LLMs that https://rubyllm.org supports. Check it out.
33
+
34
+ ---
35
+
36
+ # 1. Text → Process Model
37
+
38
+ ```http
39
+ POST https://cpee.org/llm/
40
+ ```
41
+
42
+ Converts a textual process description into a process model or adapts an existing model.
43
+
44
+ ## Parameters
45
+
46
+ | Parameter | Type | Description |
47
+ |------------|------|-------------|
48
+ | rpst_xml | text/xml | Existing CPEE XML model |
49
+ | user_input | text/plain | Natural language process description |
50
+ | llm | text/plain | LLM identifier |
51
+ | prompt_type | text/plain | `generate_noendpoints` or `adapt_noendpoints` |
52
+ | temperature | text/plain (optional) | Defaults to 0 |
53
+
54
+ **Important:** Parameter order matters.
55
+
56
+ rpst\_ xml contains the content of the `<description>` tag from the CPEE testset
57
+
58
+ ### Empty RPST Example
59
+
60
+ ```xml
61
+ <description xmlns="http://cpee.org/ns/description/1.0"/>
62
+ ```
63
+
64
+ ## Response
65
+
66
+ ```json
67
+ {
68
+ "user_input": "...",
69
+ "used_llm": "...",
70
+ "input_cpee": "...",
71
+ "input_intermediate": "...",
72
+ "output_intermediate": "...",
73
+ "output_cpee": "...",
74
+ "status": "..."
75
+ }
76
+ ```
77
+
78
+ ### Key Outputs
79
+
80
+ - `output_intermediate` → generated process model in Mermaid .js format
81
+ - `output_cpee` → CPEE XML process model
82
+
83
+ ## cURL Example
84
+
85
+ ```bash
86
+ curl -X POST https://cpee.org/llm/ \
87
+ -H 'Content-Type:multipart/form-data' \
88
+ -F "rpst_xml=@cpee_empty_example;type=text/xml" \
89
+ -F "user_input=Create task A after dismissal review.;type=text/plain" \
90
+ -F "llm=gemini-2.5-flash-lite;type=text/plain" \
91
+ -F "prompt_type=generate_noendpoints;type=text/plain"
92
+ ```
93
+
94
+ ---
95
+
96
+ # 2. Process Model → Text
97
+
98
+
99
+ ```http
100
+ POST https://cpee.org/llm/text/llm/
101
+ ```
102
+
103
+ Generates a textual process description from a process model.
104
+
105
+ ## Parameters
106
+
107
+ | Parameter | Type |
108
+ |-----------|------|
109
+ | rpst_xml | text/xml |
110
+ | llm | string |
111
+
112
+ ## Response
113
+
114
+ ```json
115
+ {
116
+ "input_cpee": "...",
117
+ "input_intermediate": "...",
118
+ "output_text": "...",
119
+ "status": "..."
120
+ }
121
+ ```
122
+
123
+ ### Key Output
124
+
125
+ - `output_text` → Generated process description
126
+
127
+ ## cURL Example
128
+
129
+ ```bash
130
+ curl -X POST https://cpee.org/llm/text/llm/ \
131
+ -H 'Content-Type:multipart/form-data' \
132
+ -F "rpst_xml=@cpee_example;type=text/xml" \
133
+ -F "llm=gemini-2.5-flash-lite"
134
+ ```
135
+
136
+ ---
137
+
138
+ # 3. Generic Functionality
139
+
140
+ ```http
141
+ POST https://cpee.org/llm/generic/
142
+ ```
143
+
144
+ Performs arbitrary LLM tasks using a system prompt and user input.
145
+
146
+ ## Parameters
147
+
148
+ | Parameter | Type |
149
+ |-----------|------|
150
+ | llm | text/plain |
151
+ | user_input | text/plain |
152
+ | system_prompt | text/plain |
153
+ | format | text/plain (`true`/`false`) |
154
+ | temperature | text/plain (optional) |
155
+
156
+ ## Response
157
+
158
+ ```json
159
+ {
160
+ "user_input": "...",
161
+ "used_llm": "...",
162
+ "system_prompt": "...",
163
+ "llm_response": "...",
164
+ "status": "..."
165
+ }
166
+ ```
167
+
168
+ ### Notes
169
+
170
+ - `format=true` requests JSON output (guarantees valid JSON but not any specific structure).
171
+
172
+ List of supporteb providers: https://rubyllm.com/chat/#getting-structured-output
173
+
174
+ ## cURL Example
175
+
176
+ ```bash
177
+ curl -X POST https://cpee.org/llm/generic/ \
178
+ -H 'Content-Type:multipart/form-data' \
179
+ -F "llm=mistralai/Ministral-3-14B-Reasoning-2512;type=text/plain" \
180
+ -F "user_input=The MPON sends the dismissal to the MPOO.;type=text/plain" \
181
+ -F "system_prompt=Return the list of tasks.;type=text/plain" \
182
+ -F "format=false;type=text/plain"
183
+ ```
184
+
185
+ ---
data/cpee-llm.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee-llm"
3
- s.version = "1.0.2"
3
+ s.version = "1.0.4"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0-or-later"
6
6
  s.summary = "CPEE Conversational Agents"
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.bindir = 'tools'
14
14
  s.executables = ['cpee-llm']
15
15
 
16
- s.required_ruby_version = '>=3.4'
16
+ s.required_ruby_version = '>=3.2'
17
17
 
18
18
  s.authors = ['Nataliia Klievtsova', 'Matthias Ehrendorfer', 'Juergen eTM Mangler']
19
19
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee-llm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nataliia Klievtsova
@@ -157,7 +157,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
157
157
  requirements:
158
158
  - - ">="
159
159
  - !ruby/object:Gem::Version
160
- version: '3.4'
160
+ version: '3.2'
161
161
  required_rubygems_version: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - ">="