Class BowireResponseMetricValue

Namespace
Kuestenlogik.Bowire.Benchmarking
Assembly
Kuestenlogik.Bowire.Benchmarking.dll

#621 — what one response gave a declared metric: its value, or why there is none.

public sealed record BowireResponseMetricValue : IEquatable<BowireResponseMetricValue>
Inheritance
BowireResponseMetricValue
Implements
Inherited Members

Constructors

BowireResponseMetricValue(string, double?, string?)

#621 — what one response gave a declared metric: its value, or why there is none.

public BowireResponseMetricValue(string Name, double? Value, string? Missing)

Parameters

Name string

The metric's name.

Value double?

The value; null when the response did not yield one.

Missing string

Why it did not, e.g. usage.prompt_tokens is missing.

Properties

Missing

Why it did not, e.g. usage.prompt_tokens is missing.

public string? Missing { get; init; }

Property Value

string

Name

The metric's name.

public string Name { get; init; }

Property Value

string

Value

The value; null when the response did not yield one.

public double? Value { get; init; }

Property Value

double?

Methods

Deconstruct(out string, out double?, out string?)

public void Deconstruct(out string Name, out double? Value, out string? Missing)

Parameters

Name string
Value double?
Missing string

Equals(BowireResponseMetricValue?)

public bool Equals(BowireResponseMetricValue? other)

Parameters

other BowireResponseMetricValue

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

EvaluateAll(IReadOnlyList<BowireResponseMetric>, string?, IReadOnlyDictionary<string, string>?, IReadOnlyDictionary<string, double>?)

Evaluate every metric against one response.

public static IReadOnlyList<BowireResponseMetricValue> EvaluateAll(IReadOnlyList<BowireResponseMetric> metrics, string? body, IReadOnlyDictionary<string, string>? headers, IReadOnlyDictionary<string, double>? rates)

Parameters

metrics IReadOnlyList<BowireResponseMetric>
body string
headers IReadOnlyDictionary<string, string>
rates IReadOnlyDictionary<string, double>

Returns

IReadOnlyList<BowireResponseMetricValue>

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(BowireResponseMetricValue?, BowireResponseMetricValue?)

public static bool operator ==(BowireResponseMetricValue? left, BowireResponseMetricValue? right)

Parameters

left BowireResponseMetricValue
right BowireResponseMetricValue

Returns

bool

operator !=(BowireResponseMetricValue?, BowireResponseMetricValue?)

public static bool operator !=(BowireResponseMetricValue? left, BowireResponseMetricValue? right)

Parameters

left BowireResponseMetricValue
right BowireResponseMetricValue

Returns

bool