You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched existing ideas and did not find a similar one
I added a very descriptive title
I've clearly described the feature request and motivation for it
Feature request
Adding the kwargs to the cache function in BaseChatModel (update, lookup, ...).
Motivation
In order to control the cache retention and privacy of the data we want to be able to tie for example some userId or tenantId to SQL row that contains the cash of a call.
Being able to pass the tenant_id and user_id in the call to invoke and have the caching function pick it up would enable that.
It would also enable a lot more customization for a very small cost. In addition most of the function pass the kwargs so it is surprising that it is not passed to cache functions.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Checked
Feature request
Adding the kwargs to the cache function in BaseChatModel (update, lookup, ...).
Motivation
In order to control the cache retention and privacy of the data we want to be able to tie for example some userId or tenantId to SQL row that contains the cash of a call.
Being able to pass the tenant_id and user_id in the call to invoke and have the caching function pick it up would enable that.
It would also enable a lot more customization for a very small cost. In addition most of the function pass the kwargs so it is surprising that it is not passed to cache functions.
Proposal (If applicable)
Change the calls to update, lookups, ... See PR
Beta Was this translation helpful? Give feedback.
All reactions