Skip to content
This repository has been archived by the owner on Sep 25, 2024. It is now read-only.

[feature request]: Add caching for request results #55

Open
hgaogao opened this issue Dec 11, 2023 · 3 comments
Open

[feature request]: Add caching for request results #55

hgaogao opened this issue Dec 11, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed need more discussion

Comments

@hgaogao
Copy link
Contributor

hgaogao commented Dec 11, 2023

  • It is recommended to implement caching for request results, avoiding the need to send requests every time. This is particularly beneficial when dealing with a large number of tags, as it prevents fetching all tags with each grouping.
  • Adopting this approach ensures that user actions are not overwritten, providing a safeguard for their interactions.
  • Consider offering an option to re-sort all tags (Maybe not, because Ungroup All can already achieve the goal)
@MichaelYuhe
Copy link
Owner

I have no experience in the caching OpenAI results before, I'll try to learn and finish that.
If there can be an option to sort group it will be great.

@MichaelYuhe MichaelYuhe added enhancement New feature or request help wanted Extra attention is needed labels Dec 11, 2023
@jt-wang
Copy link
Contributor

jt-wang commented Dec 11, 2023

@hgaogao @MichaelYuhe:

Cache is possible by

  1. intercept the request
  2. Check the body with cache

Some materials https://developer.chrome.com/docs/workbox/modules/workbox-routing and https://web.dev/learn/pwa/serving

Though I use OpenAI API every day to boost my workflow, I still receive only below $2 invoice every month. Cache sounds like more a good-to-have feature, but really interesting. Let me know if you want it so much and I can contribute.

@MichaelYuhe
Copy link
Owner

The best way to save credits: don't use gpt-4 :D
I think this feature needs more discussion since it may have much work to do, and maybe conflicted with #35? I have no idea if the cache ways are the same for different models or other classify solutions

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request help wanted Extra attention is needed need more discussion
Projects
None yet
Development

No branches or pull requests

3 participants