getValue

suspend fun <T : Any> getValue(key: AIAgentStorageKey<T>): T(source)

Retrieves the non-null value associated with the given key from the storage. If the key does not exist in the storage, a NoSuchElementException is thrown.

Return

The value associated with the key, of type T.

Parameters

key

The key of type AIAgentStorageKey used to identify the value in the storage.

Throws

if the key does not exist in the storage.