I am building a demo project where I need to allow selection of workspace before starting dialog.
Currently watson middleware takes workspace_id as a constructor parameter, but I need to set it on per-session basis.
message method of ConversationV1 in node-sdk accepts workspace_id as a parameter, so it shouldn't be a problem.
I see 2 ways to implement it:
1) add workspace_id property to each message and copy it to payload.
2) check if context.workpace_id exists and assign it to payload (setting workspace_id is out of scope for this library, but I can provide an example).
I think that using context property fits my use case better but per-message workspace_id could be useful too.
@germanattanasio Which way do you prefer? I could even implement both if you think that it is a good idea.
I am building a demo project where I need to allow selection of workspace before starting dialog.
Currently watson middleware takes workspace_id as a constructor parameter, but I need to set it on per-session basis. message method of ConversationV1 in node-sdk accepts workspace_id as a parameter, so it shouldn't be a problem.
I see 2 ways to implement it: 1) add workspace_id property to each message and copy it to payload.
2) check if context.workpace_id exists and assign it to payload (setting workspace_id is out of scope for this library, but I can provide an example).
I think that using context property fits my use case better but per-message workspace_id could be useful too.
@germanattanasio Which way do you prefer? I could even implement both if you think that it is a good idea.