Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.conversation.default_agent.IntentCache Class Reference

Public Member Functions

None __init__ (self, int capacity)
 
None clear (self)
 
IntentCacheValue|None get (self, IntentCacheKey key)
 
None put (self, IntentCacheKey key, IntentCacheValue value)
 

Public Attributes

 capacity
 

Detailed Description

LRU cache for intent recognition results.

Definition at line 152 of file default_agent.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.conversation.default_agent.IntentCache.__init__ (   self,
int  capacity 
)
Initialize cache.

Definition at line 155 of file default_agent.py.

Member Function Documentation

◆ clear()

None homeassistant.components.conversation.default_agent.IntentCache.clear (   self)
Clear the cache.

Definition at line 180 of file default_agent.py.

◆ get()

IntentCacheValue | None homeassistant.components.conversation.default_agent.IntentCache.get (   self,
IntentCacheKey  key 
)
Get value for cache or None.

Definition at line 160 of file default_agent.py.

◆ put()

None homeassistant.components.conversation.default_agent.IntentCache.put (   self,
IntentCacheKey  key,
IntentCacheValue  value 
)
Put a value in the cache, evicting the least recently used item if necessary.

Definition at line 169 of file default_agent.py.

Member Data Documentation

◆ capacity

homeassistant.components.conversation.default_agent.IntentCache.capacity

Definition at line 158 of file default_agent.py.


The documentation for this class was generated from the following file: