Closed soulzhao closed 1 year ago
@soulzhao the issue should has been fixed in the latest version, so you can try to upgrade the GPTCache
@soulzhao if the answer has resolved your issue, i will close the issue. If you encounter other problems, welcome to open a new issue.
This is happening in the latest version of GPT cache too, I'm using version 0.1.37
Update: I am using mongoDB as cache base, and qdrant db as vector base, adding code snippet for your reference:
openai_embedding = AzureOpenAIEmbedding()
db_parameters = get_db_parameters() # returns mongo DB credentials
cache_base = CacheBase(
"mongo",
mongo_host=db_parameters["host"],
dbname="gptcache",
ssl=db_parameters["ssl"],
**db_parameters["ssl_cert_param"],
)
vector_base = VectorBase(
"qdrant",
port=Settings.QDRANT_PORT,
prefer_grpc=False,
https=True,
api_key=Settings.QDRANT_API_KEY,
prefix=None,
timeout=None,
host=Settings.QDRANT_HOST,
collection_name=Settings.GPT_CACHE_EMBEDDING_COLLECTION,
location=None, # this is necessary, otherwise it tries to set up connection with local qdrant db setup.
dimension=openai_embedding.dimension,
)
data_manager = get_data_manager(cache_base=cache_base, vector_base=vector_base)
cache.init(
cache_enable_func=cache_enable_func,
pre_embedding_func=pre_embedding_function,
embedding_func=openai_embedding.to_embeddings,
data_manager=data_manager,
similarity_evaluation=KReciprocalEvaluation(vectordb=vector_base, max_distance=1, positive=True),
config=Config(similarity_threshold=Settings.GPT_CACHE_SIMILARITY_THRESHOLD),
)
@amarCerta i will checkout it, and if you can, please give me your test demo code
@SimFG Please resolve this issue as it is causing my system to fail continuously, and I am unable to rely on it because I have to keep clearing the cache when the issue occurs.
@rahulsunil2 Thank you for your attention, I am confirming this problem, because I have a lot of work recently, which causes a bit slow to solve the problem.
@rahulsunil2 Updating to the latest version should have fixed it. I'm so sorry thay I didn't read the @soulzhao comment in the issue carefully. If the error is not resolved, please contact me in time.
The bug has been fixed in version 0.1.38. If you come across a new bug, welcome to report it.
Thanks a lot for your prompt response @SimFG
Current Behavior
class SSDataManager(DataManager): """Generate SSDataManage to manager the data.
Expected Behavior
No response
Steps To Reproduce
Environment
No response
Anything else?
No response