< Summary

Information
Class: Intentum.AI.Models.LlmIntentModelExtensions
Assembly: Intentum.AI
File(s): /home/runner/work/Intentum/Intentum/src/Intentum.AI/Models/LlmIntentModelExtensions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 28
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 2
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity NPath complexity Sequence coverage
Infer(...)0%220%

File(s)

/home/runner/work/Intentum/Intentum/src/Intentum.AI/Models/LlmIntentModelExtensions.cs

#LineLine coverage
 1using Intentum.Core.Behavior;
 2using Intentum.Core.Intents;
 3
 4namespace Intentum.AI.Models;
 5
 6/// <summary>
 7/// Extension methods for <see cref="LlmIntentModel"/> to infer with <see cref="ToVectorOptions"/> (e.g. cap dimensions 
 8/// </summary>
 9public static class LlmIntentModelExtensions
 10{
 11    /// <summary>
 12    /// Infers intent using a behavior vector built with the given options (e.g. <see cref="ToVectorOptions.CapPerDimens
 13    /// Use to reduce embedding calls and memory for large event sets.
 14    /// </summary>
 15    /// <param name="model">The LLM intent model.</param>
 16    /// <param name="behaviorSpace">The observed behavior space.</param>
 17    /// <param name="toVectorOptions">Options for building the vector (cap/normalization); when null, same as <see cref=
 18    /// <param name="precomputedVector">Optional pre-computed vector; when non-null, <paramref name="toVectorOptions"/> 
 19    public static Intent Infer(
 20        this LlmIntentModel model,
 21        BehaviorSpace behaviorSpace,
 22        ToVectorOptions? toVectorOptions,
 23        BehaviorVector? precomputedVector = null)
 024    {
 025        var vector = precomputedVector ?? behaviorSpace.ToVector(toVectorOptions);
 026        return model.Infer(behaviorSpace, vector);
 027    }
 28}