zilliztech / GPTCache

Semantic cache for LLMs. Fully integrated with LangChain and llama_index.
https://gptcache.readthedocs.io
MIT License
6.89k stars 480 forks source link

[Bug]: fail in chatComplete for gptcache.adapter openai #593

Open frank780117 opened 6 months ago

frank780117 commented 6 months ago

Current Behavior

When I use document on Bootcamp, the OpenAI -> Chat tag

when I run, show the error

You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.

please upgrade for this, thanks

Expected Behavior

No response

Steps To Reproduce

No response

Environment

No response

Anything else?

No response

SimFG commented 6 months ago

@frank780117 Because openai has made many adjustments to 1.x, the gptcache project has not yet been adapted. If you are interested in this, your contribution is very welcome.

Of course, there are other ways to deal with this problem, that is, try to use the get/put method. Try to use the get method to obtain the cache content before requesting openai. If it is not obtained, request openai, and then put the result of openai into the cache.

same issue: #576

Ravitwr commented 5 months ago

I want to work on this. Can it be assigned to me?