mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -04:00
[workchat] prepare the workflow framework (#218138)
## Summary Setup the foundations of the workflow framework, adding types and initial implementation. ## Examples ### Looping over some input to call the LLM **workflow** ```typescript { id: 'my_test_workflow', name: 'Just a test workflow', type: 'graph', inputs: [ { name: 'input', type: 'array', required: true, }, ], steps: [ { id: 'mainLoop', type: NodeType.loop, configuration: { inputList: 'input', itemVar: 'prompt', output: { source: 'output', destination: 'results', }, steps: [ { id: 'step1', type: NodeType.prompt, configuration: { prompt: 'How much is {prompt}? Please just output the result without anything else', output: 'output', }, }, ], }, }, ], outputs: [ { name: 'results', ref: 'results', }, ], } ``` **Running** ```ts workchatFramework.workflows.run({ id: 'my_test_workflow', inputs: { input: ['3 + 3', '7 - 1', '4 * 6'] }, request, }) ``` **Output** ```ts { runId: '6f254746-57fc-4fd3-8bfa-25014725f53f', output: { results: [ '6', '6', '24' ] } } ``` --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
afc004a520
commit
29a81d8972
169 changed files with 6023 additions and 5 deletions
|
@ -819,6 +819,13 @@
|
|||
"state",
|
||||
"type"
|
||||
],
|
||||
"onechat_workflow": [
|
||||
"access_control",
|
||||
"access_control.public",
|
||||
"categories",
|
||||
"user_id",
|
||||
"workflow_id"
|
||||
],
|
||||
"osquery-manager-usage-metric": [
|
||||
"count",
|
||||
"errors"
|
||||
|
|
|
@ -2749,6 +2749,27 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"onechat_workflow": {
|
||||
"dynamic": false,
|
||||
"properties": {
|
||||
"access_control": {
|
||||
"properties": {
|
||||
"public": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"categories": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"user_id": {
|
||||
"type": "keyword"
|
||||
},
|
||||
"workflow_id": {
|
||||
"type": "keyword"
|
||||
}
|
||||
}
|
||||
},
|
||||
"osquery-manager-usage-metric": {
|
||||
"properties": {
|
||||
"count": {
|
||||
|
|
|
@ -195,3 +195,4 @@ pageLoadAssetSize:
|
|||
wciIndexSource: 40000
|
||||
wciSalesforce: 25000
|
||||
workchatApp: 25000
|
||||
workchatFramework: 25000
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue