Hit

class Hit(val scope: String, val prompt: String, val matchedPrompt: String, val similarity: Double, val entryId: String, val timings: EventTimings, val saved: Double = 0.0, val currency: String? = null) : CacheEvent

A lookup that was served from the cache.

Constructors

Link copied to clipboard
constructor(scope: String, prompt: String, matchedPrompt: String, similarity: Double, entryId: String, timings: EventTimings, saved: Double = 0.0, currency: String? = null)

Properties

Link copied to clipboard

The unit saved is in, or null when the scope declares no prices.

Link copied to clipboard

Id of the entry that matched.

Link copied to clipboard

The cached prompt whose response was served — rarely identical to prompt.

Link copied to clipboard

The query prompt that was looked up.

Link copied to clipboard

What this one hit did not cost, in currency, or 0.0 when the scope declares no TokenPrices.

Link copied to clipboard
open override val scope: String

The scope the event happened in.

Link copied to clipboard

Similarity between prompt and matchedPrompt, in [-1.0, 1.0].

Link copied to clipboard

How long each stage of the lookup took.

Functions

Link copied to clipboard
open override fun toString(): String