redis_openai_agents.CachedRunResult#
- class CachedRunResult(response, cache_hit=False, similarity=0.0, original_result=None)[source]#
Result from a cached run.
- Parameters:
response (str)
cache_hit (bool)
similarity (float)
original_result (Any | None)
- response#
The response string (from cache or LLM)
- Type:
str
- cache_hit#
Whether the response came from cache
- Type:
bool
- similarity#
Similarity score if from cache (1.0 = exact match)
- Type:
float
- original_result#
The original SDK result (if not from cache)
- Type:
Any | None
- __init__(response, cache_hit=False, similarity=0.0, original_result=None)#
- Parameters:
response (str)
cache_hit (bool)
similarity (float)
original_result (Any | None)
- Return type:
None
Methods
__init__(response[, cache_hit, similarity, ...])Attributes