GetCachedSignature retrieves a cached signature for a given model group and text. Returns empty string if not found or expired.
(modelName, text string)
| 157 | // GetCachedSignature retrieves a cached signature for a given model group and text. |
| 158 | // Returns empty string if not found or expired. |
| 159 | func GetCachedSignature(modelName, text string) string { |
| 160 | signature, errSignature := GetCachedSignatureRequired(context.Background(), modelName, text) |
| 161 | if errSignature != nil { |
| 162 | return "" |
| 163 | } |
| 164 | return signature |
| 165 | } |
| 166 | |
| 167 | // GetCachedSignatureRequired retrieves a cached signature for request-time paths. |
| 168 | func GetCachedSignatureRequired(ctx context.Context, modelName, text string) (string, error) { |