github zilliztech/GPTCache 0.1.24
v0.1.24

latest releases: 0.1.44, 0.1.43, 0.1.42...
18 months ago

🎉 Introduction to new functions of GPTCache

  1. Support the langchain embedding
from gptcache.embedding import LangChain
from langchain.embeddings.openai import OpenAIEmbeddings

test_sentence = 'Hello, world.'
embeddings = OpenAIEmbeddings(model="your-embeddings-deployment-name")
encoder = LangChain(embeddings=embeddings)
embed = encoder.to_embeddings(test_sentence)
  1. Add gptcache client
from gptcache import Client

client = Client()
client.put("Hi", "Hi back")
ans = client.get("Hi")
  1. Support pgvector as vector store
from gptcache.manager import manager_factory

data_manager = manager_factory("sqlite,pgvector", vector_params={"dimension": 10})
  1. Add the GPTCache server doc

reference: https://github.com/zilliztech/GPTCache/blob/main/docs/usage.md#Build-GPTCache-server

What's Changed

Full Changelog: 0.1.23...0.1.24

Don't miss a new GPTCache release

NewReleases is sending notifications on new releases.