Skip to content

Can GPTcache to refer the previous cache record? #384

Closed Answered by SimFG
terryweijian asked this question in Q&A
Discussion options

You must be logged in to vote

@terryweijian yes, we don't check the existed data when inserting the data to cache, which is a good idea. I will improve about this part in a few days.

For better solving your problem, I simply adjusted the program, but I don't seem to have encountered the problem you mentioned. I used the openai model, the default onnx embedding model and the traditional database uses sqlite. I guess the problem is caused by the unstable embedding model. And you can remove all history data and retry it. Below is my sample code:

import time

from langchain.llms import OpenAI

from gptcache import Cache, cache
from gptcache.adapter.api import init_similar_cache
from gptcache.adapter.langchain_models impor…

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
4 replies
@terryweijian
Comment options

@terryweijian
Comment options

@terryweijian
Comment options

@SimFG
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by SimFG
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@terryweijian
Comment options

@SimFG
Comment options

@terryweijian
Comment options

@SimFG
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants