ValidatePartialIntent.cs 1.1 KB

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (c) Meta Platforms, Inc. and affiliates.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the license found in the
  6. * LICENSE file in the root directory of this source tree.
  7. */
  8. using System;
  9. using Meta.Conduit;
  10. namespace Meta.WitAi
  11. {
  12. /// <summary>
  13. /// Triggers a method to be executed if it matches a voice command's intent
  14. /// </summary>
  15. [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
  16. public class ValidatePartialIntent : ConduitActionAttribute
  17. {
  18. /// <summary>
  19. /// Triggers a method to be executed if it matches a voice command's intent
  20. /// </summary>
  21. /// <param name="intent">The name of the intent to match</param>
  22. /// <param name="minConfidence">The minimum confidence value (0-1) needed to match</param>
  23. /// <param name="maxConfidence">The maximum confidence value(0-1) needed to match</param>
  24. public ValidatePartialIntent(string intent, float minConfidence = DEFAULT_MIN_CONFIDENCE, float maxConfidence = DEFAULT_MAX_CONFIDENCE) : base(intent, minConfidence, maxConfidence, true)
  25. {
  26. }
  27. }
  28. }