Skip to content

clear_cache

clear_cache(which=None)

Forget the replies the reply cache kept, so the next identical requests reach the model again.

Parameters

Name Type Description Default
which optional None (default): the cache in this process's memory (cache_replies=True). "disk": the shared file cache_replies="disk" uses (in the user's cache folder, functai/replies.sqlite). A folder or .sqlite path: that file. None

Examples

import functai
from functai import *
# not run: it deletes the replies kept on this machine
functai.clear_cache()            # this process's memory
functai.clear_cache("disk")      # the replies kept across runs