public void CreateIntent()
        {
            #region CreateIntent

            CreateIntent request = new CreateIntent()
            {
                Intent = "Test_SDK_NET",
                Description = null,
                Examples = new List<CreateExample>()
                {
                    new CreateExample()
                    {
                        Text = "Test Create Example"
                    }
                }
            };
            
            #endregion

            ConversationService service = new ConversationService(_userName, _password);
            service.Endpoint = _endpoint;

            var results = service.CreateIntent(_workspace, request);

            Assert.IsNotNull(results);
        }
Beispiel #2
0
        private void CreateIntent()
        {
            Console.WriteLine(string.Format("\nCalling CreateIntent({0}, {1})...", _createdWorkspaceId, _createdIntent));
            CreateIntent intent = new CreateIntent()
            {
                Intent      = _createdIntent,
                Description = _createdIntentDescription
            };

            var result = _conversation.CreateIntent(_createdWorkspaceId, intent);

            if (result != null)
            {
                Console.WriteLine("intent: {0} | description: {1}", result.IntentName, result.Description);
            }
            else
            {
                Console.WriteLine("Result is null.");
            }
        }