Open selmanays opened 1 year ago
All the queries (in the session) are cached with Streamlit so the exact same queries are not run twice. But doing that for similar queries is quite hard because we can't exactly define what "similar queries" mean. Two questions may look quite similar but the answers may be completely different.
you can use gptcache
What if GPT records the responses in a database and pulls the response from the database instead of sending new requests to OpenAI for similar queries?