SmartEndpoint.Metrics
Wisej.AI.SmartEndpoint Metrics
Namespace: Wisej.AI
Assembly: Wisej.AI (3.5.0.0)
Represents a collection of metrics related to token usage and call counts.
public class Metrics
This class is used to track and manipulate metrics such as input tokens, output tokens, and the number of calls.
Constructors
Metrics()

Initializes a new instance of the Metrics class.
Properties
CallCount

Int32: Gets the number of calls.
InputTokens

Int32: Gets the number of input tokens.
OutputTokens

Int32: Gets the number of output tokens.
Methods
Add(inputTokens, outputTokens, callCount)

Adds the specified number of input tokens, output tokens, and call count to the current metrics.
Returns: Metrics. The updated Metrics instance.
Add(usage)

Adds the metrics from another Metrics instance to the current metrics.
Returns: Metrics. The updated Metrics instance.
This method updates the current metrics by adding the values from another Metrics instance.
Reset()

Resets the input tokens, output tokens, and call count to 0.
Returns: Metrics. The updated Metrics instance.
Subtract(usage)

Subtracts the metrics from another Metrics instance from the current metrics.
Returns: Metrics. The updated Metrics instance.
This method updates the current metrics by subtracting the values from another Metrics instance.
Last updated