set_cache_limit

Function

Sets the maximum number of characters in the answer returned by an LLM during caching. If the character string returned exceeds this limit, it will not be cached.

Prototype

@classmethod
def set_cache_limit(cache_limit: int)

Parameters

Parameter

Data Type

Required/Optional

Description

cache_limit

Integer

Required

Maximum number of characters in each cached answer. The default value is 1 million. The value range is (0, 1000000].