redis_openai_agents.CacheResult#
- class CacheResult(response, similarity, metadata=None)[source]#
Result from a cache lookup.
- Parameters:
response (str)
similarity (float)
metadata (dict[str, Any] | None)
- response#
The cached LLM response
- Type:
str
- similarity#
Similarity score (1.0 = exact match)
- Type:
float
- metadata#
Optional metadata stored with the entry
- Type:
dict[str, Any] | None
- __init__(response, similarity, metadata=None)#
- Parameters:
response (str)
similarity (float)
metadata (dict[str, Any] | None)
- Return type:
None
Methods
__init__(response, similarity[, metadata])Attributes