How to handle LLM rate limits in the pipeline?", Body "As we add more agents, rate limits could be an issue. Suggestions? #5
Replies: 1 comment
-
|
we can implement a caching layer in llm_providers.py using a lightweight database like SQLite or a key-value store like Redis for frequently repeated prompts. Here’s a claude generated SQLite-based approach, but i am leaning more towards using postGres: def get_cached_response(prompt, provider): def cache_response(prompt, provider, response): def get_llm_response(provider, prompt): |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Scaling issues?
Beta Was this translation helpful? Give feedback.
All reactions