You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/reference/customtask/cmem_plugin_llm-ExecuteInstructions.md
+13-25Lines changed: 13 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,32 +35,30 @@ AI-powered text generation, analysis, and transformation tasks within Corporate
35
35
## Input/Output Behavior
36
36
37
37
After processing, each entity receives an additional path (default: `_instruction_output`)
38
-
containing the LLM response. Input/output ports are automatically configured based on
39
-
template variables:
38
+
containing the LLM response. For TEXT and JSON_MODE output formats, the response is stored
39
+
in this path. For STRUCTURED_OUTPUT, the Pydantic model fields are directly added to the
40
+
entity (the `_instruction_output` path is not used).
41
+
42
+
Input/output ports are automatically configured based on template variables:
40
43
41
44
-**No placeholders**: No input ports required
42
-
-**With placeholders**: Dynamic input ports created for each template variable
43
-
-**Port ordering**: Variables sorted alphabetically determine port order
45
+
-**With placeholders**: Single input port created for entity data
44
46
-**Schema handling**: Fixed schemas when using specific entity paths, flexible schemas otherwise
45
47
46
48
## Template System
47
49
48
50
Uses Jinja2 templating for dynamic prompts:
49
51
50
52
```jinja2
51
-
{{ variable }} # Entire entity as JSON
52
-
{{ variable.name }} # Specific entity property
53
-
{{ variable_a.title }} # Property from first additional input port
54
-
{{ variable_b.content }} # Property from second additional input port
53
+
{{ entity }} # Entire entity as JSON
54
+
{{ entity.name }} # Specific entity property
55
55
```
56
56
57
-
The followin template processing rule are implemented:
57
+
The following template processing rules are implemented:
58
58
59
59
1.**Variable Extraction**: Automatically detects template variables to configure input ports
60
-
2.**Entity Iteration**: Main processing iterates over first input port entities
61
-
3.**Additional Inputs**: Secondary ports provide context data for template rendering
62
-
4.**Consumption Modes**: Choose between first-entity or all-entities consumption from
63
-
additional ports
60
+
2.**Entity Iteration**: Processes entities from the single input port individually
61
+
3.**Single Entity Context**: Each entity is processed independently with its own template context
64
62
65
63
## Output Formats
66
64
@@ -167,7 +165,7 @@ An optional API key for authentication.
167
165
168
166
### Instruct Model
169
167
170
-
The identifier of the instruct model to use. Note that some provider do not support a model list endpoint. Just create a custom entry then. Available model IDs for some public providers can be found here: [Claude](https://docs.claude.com/en/docs/about-claude/models/overview), [OpenRouter](https://openrouter.ai/models), [Azure](https://learn.microsoft.com/en-us/azure/ai-foundry/foundry-models/concepts/models-sold-directly-by-azure).
168
+
The identifier of the instruct model to use. Note that some provider do not support a model list endpoint. Just create a custom entry then. Available model IDs for some public providers can be found here: [OpenAI](https://platform.openai.com/docs/models), [Claude](https://docs.claude.com/en/docs/about-claude/models/overview), [OpenRouter](https://openrouter.ai/models), [Azure](https://learn.microsoft.com/en-us/azure/ai-foundry/foundry-models/concepts/models-sold-directly-by-azure). **Note:** For STRUCTURED_OUTPUT format, only certain models support structured outputs. See [OpenAI Structured Outputs Guide](https://platform.openai.com/docs/guides/structured-outputs) for supported models.
171
169
172
170
- ID: `model`
173
171
- Datatype: `string`
@@ -221,7 +219,7 @@ The timeout for a single API request in seconds.
221
219
222
220
### Instruction Output Path
223
221
224
-
The entity path where the instruction result will be provided.
222
+
The entity path where the instruction result will be provided. Note: This parameter is not used when Output Format is set to STRUCTURED_OUTPUT. For structured outputs, only the Pydantic model fields are included in the output schema.
225
223
226
224
- ID: `instruction_output_path`
227
225
- Datatype: `string`
@@ -251,16 +249,6 @@ A list of messages comprising the conversation compatible with OpenAI chat compl
251
249
252
250
253
251
254
-
### Consume all entities from additional input ports
255
-
256
-
If enabled, all entities from additional input ports will be consumed. Otherwise, only the first entity of the additional ports will be used.
257
-
258
-
- ID: `consume_all_entities`
259
-
- Datatype: `boolean`
260
-
- Default Value: `false`
261
-
262
-
263
-
264
252
### Output Format
265
253
266
254
Specifying the format that the model must output. Possible values are `TEXT` - Standard text output, `STRUCTURED_OUTPUT` - output follows a given schema. Add your schema as Pydantic model in the parameter below, `JSON_MODE` - a more basic version of the structured outputs feature where you have to add your structure to the prompt template.
0 commit comments