zilliztech / GPTCache

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

Add the 'hit callback' func #542

Closed SimFG closed 10 months ago

sre-ci-robot commented 10 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SimFG

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/zilliztech/GPTCache/blob/dev/OWNERS)~~ [SimFG] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
codecov[bot] commented 10 months ago

Codecov Report

Merging #542 (8ca4b88) into dev (be57ba2) will increase coverage by 0.00%. Report is 2 commits behind head on dev. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/zilliztech/GPTCache/pull/542/graphs/tree.svg?width=650&height=150&src=pr&token=E30WxqBeJJ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zilliztech)](https://app.codecov.io/gh/zilliztech/GPTCache/pull/542?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zilliztech) ```diff @@ Coverage Diff @@ ## dev #542 +/- ## ======================================= Coverage 92.91% 92.92% ======================================= Files 97 97 Lines 4249 4253 +4 ======================================= + Hits 3948 3952 +4 Misses 301 301 ``` | [Files Changed](https://app.codecov.io/gh/zilliztech/GPTCache/pull/542?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zilliztech) | Coverage Δ | | |---|---|---| | [gptcache/adapter/adapter.py](https://app.codecov.io/gh/zilliztech/GPTCache/pull/542?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zilliztech#diff-Z3B0Y2FjaGUvYWRhcHRlci9hZGFwdGVyLnB5) | `83.04% <100.00%> (+0.30%)` | :arrow_up: | | [gptcache/utils/\_\_init\_\_.py](https://app.codecov.io/gh/zilliztech/GPTCache/pull/542?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=zilliztech#diff-Z3B0Y2FjaGUvdXRpbHMvX19pbml0X18ucHk=) | `89.34% <100.00%> (ø)` | |