Skip to content

Commit 3a13e4f

Browse files
authored
Merge pull request #424 from AndreiLuis/master
Adjustment in MessageContext of Assistant_V2
2 parents ae93f5f + fb6c29a commit 3a13e4f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

examples/IBM.Watson.Assistant.v2.Examples/ServiceExample.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
using IBM.Cloud.SDK.Core.Authentication.Iam;
2020
using IBM.Watson.Assistant.v2.Model;
21+
using System.Collections.Generic;
2122
using System;
2223

2324
namespace IBM.Watson.Assistant.v2.Examples
@@ -106,12 +107,15 @@ public void MessageWithContext()
106107
IamAuthenticator authenticator = new IamAuthenticator(
107108
apikey: "{apikey}");
108109

109-
AssistantService service = new AssistantService("2019-02-28", authenticator);
110+
AssistantService service = new AssistantService("2020-04-01", authenticator);
110111
service.SetServiceUrl("{serviceUrl}");
111112

112113
MessageContextSkills skills = new MessageContextSkills();
113114
MessageContextSkill skill = new MessageContextSkill();
114-
skill.UserDefined.Add("account_number", "123456");
115+
Dictionary<string, object> userDefinedDictionary = new Dictionary<string, object>();
116+
117+
userDefinedDictionary.Add("account_number", "123456");
118+
skill.UserDefined = userDefinedDictionary;
115119
skills.Add("main skill", skill);
116120

117121
var result = service.Message(

0 commit comments

Comments
 (0)