keyFor static method
Computes a cache key from the prompt, model and temperature.
Implementation
static String keyFor(
String prompt, {
required String model,
double? temperature,
}) {
return crypto.sha256
.convert(utf8.encode('$model|${temperature ?? 0}|$prompt'))
.toString();
}