Jamster3000 / Joan-smart-assistant

A smart assistant built purly in python. Uses different machine learning models to keep up speed and efficiency for lower resourced devices.
1 stars 0 forks source link

using caching for commonly used functions #20

Closed Jamster3000 closed 6 months ago

Jamster3000 commented 6 months ago

If you have repeated function calls with the same input, you can use caching to store the results of the function calls and avoid unnecessary computations. For example, you can use the lru_cache decorator from the functools library to cache the results of the find_intent and find_matched_keywords functions.

This is of course to look into and not a solution