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.',
|
||||
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($) {
|
||||
const response = await $.http.post('/api/v1/sessions/chat', {
|
||||
session_id: '',
|
||||
session_id: $.step.parameters.sessionId,
|
||||
messages: [
|
||||
{
|
||||
role: 'user',
|
||||
|
Reference in New Issue
Block a user