feat: Introduce optional session ID for helix app
This commit is contained in:
@@ -13,11 +13,20 @@ export default defineAction({
|
|||||||
description: 'Prompt to start the chat with.',
|
description: 'Prompt to start the chat with.',
|
||||||
variables: true,
|
variables: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Session ID',
|
||||||
|
key: 'sessionId',
|
||||||
|
type: 'string',
|
||||||
|
required: false,
|
||||||
|
description:
|
||||||
|
'ID of the chat session to continue. Leave empty to start a new chat.',
|
||||||
|
variables: true,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
async run($) {
|
async run($) {
|
||||||
const response = await $.http.post('/api/v1/sessions/chat', {
|
const response = await $.http.post('/api/v1/sessions/chat', {
|
||||||
session_id: '',
|
session_id: $.step.parameters.sessionId,
|
||||||
messages: [
|
messages: [
|
||||||
{
|
{
|
||||||
role: 'user',
|
role: 'user',
|
||||||
|
Reference in New Issue
Block a user