SYMBOL INDEX (1038 symbols across 197 files) FILE: docs/_exts/docgen2.py class DocGen (line 13) | class DocGen: method __init__ (line 14) | def __init__( method title_bar (line 27) | def title_bar(input_str): method section_bar (line 31) | def section_bar(input_str): method get_filename (line 35) | def get_filename(input_str): method cap (line 47) | def cap(input_str): method model_name (line 53) | def model_name(self, input_str: str): method get_module_and_libs (line 56) | def get_module_and_libs(self, module_dir, is_root): method generate (line 79) | def generate(self): FILE: docs/_exts/index_con.py class IndexCon (line 4) | class IndexCon: method __init__ (line 6) | def __init__(self, source, output): method preprocess (line 11) | def preprocess(self): FILE: docs/bootcamp/streamlit/gptcache-streamlit-audio/audio.py function initialize_configuration (line 14) | def initialize_configuration(): function api_call (line 29) | def api_call(audio_bytes, open_ai_key): function main (line 38) | def main(): FILE: docs/bootcamp/streamlit/gptcache-streamlit-image/imagen.py function initialize_configuration (line 19) | def initialize_configuration(): function api_call (line 34) | def api_call(text_input, open_ai_key): function main (line 52) | def main(): FILE: examples/adapter/api.py function run_basic (line 7) | def run_basic(): function run_similar_match (line 14) | def run_similar_match(): FILE: examples/adapter/langchain_llms.py function run_llm (line 18) | def run_llm(): function get_msg (line 37) | def get_msg(data, **_): function run_chat_model (line 41) | def run_chat_model(): FILE: examples/benchmark/benchmark_sqlite_faiss_onnx.py function run (line 13) | def run(): FILE: examples/context_process/selective_context.py function response_text (line 15) | def response_text(openai_resp): function cache_init (line 23) | def cache_init(): function base_request (line 40) | def base_request(): FILE: examples/context_process/summarization_context.py function response_text (line 12) | def response_text(openai_resp): function cache_init (line 16) | def cache_init(): function base_request (line 33) | def base_request(): FILE: examples/data_manager/map_manager.py function run (line 8) | def run(): FILE: examples/data_manager/scalar_store.py function mock_embeddings (line 13) | def mock_embeddings(data, **kwargs): function run (line 17) | def run(): FILE: examples/data_manager/vector_store.py function mock_embeddings (line 11) | def mock_embeddings(data, **kwargs): function run (line 15) | def run(): FILE: examples/embedding/default.py function run (line 6) | def run(): FILE: examples/embedding/onnx.py function run (line 9) | def run(): FILE: examples/embedding/paddlenlp.py function run (line 9) | def run(): FILE: examples/embedding/random.py function mock_embeddings (line 11) | def mock_embeddings(data, **kwargs): function run (line 15) | def run(): FILE: examples/eviction/distributed_eviction.py function get_data_manager_example (line 9) | def get_data_manager_example(): function get_manager_example_redis_only (line 33) | def get_manager_example_redis_only(): function manager_factory_example (line 57) | def manager_factory_example(): FILE: examples/integrate/dolly/basic_usage.py function dolly_base_usage (line 11) | def dolly_base_usage(): function dolly_from_hugggingface (line 34) | def dolly_from_hugggingface(): FILE: examples/integrate/langchain/langchain_llms_mock.py function run (line 14) | def run(): FILE: examples/integrate/langchain/langchain_qa_chain.py function get_content_func (line 12) | def get_content_func(data, **_): FILE: examples/integrate/llama_cpp/basic_usage.py function llama_cpp_base_usage (line 10) | def llama_cpp_base_usage(): function llama_cpp_stream_usage (line 28) | def llama_cpp_stream_usage(): FILE: examples/integrate/openai/basic_usage.py function response_text (line 11) | def response_text(openai_resp): function cache_init (line 15) | def cache_init(): function base_request (line 22) | def base_request(): function stream_request (line 39) | def stream_request(): function similar_request (line 67) | def similar_request(): FILE: examples/integrate/openai/readme.py function response_text (line 7) | def response_text(openai_resp): FILE: examples/session/session.py function run_session (line 10) | def run_session(): function run_custom_session (line 25) | def run_custom_session(): FILE: examples/similarity_evaluation/exact_match.py function run (line 6) | def run(): FILE: examples/similarity_evaluation/onnx.py function run (line 8) | def run(): FILE: examples/similarity_evaluation/search_distance.py function run (line 8) | def run(): FILE: examples/similarity_evaluation/sequence_match.py function run (line 10) | def run(): FILE: examples/vqa_demo.py function parse_args (line 22) | def parse_args(): FILE: gptcache/adapter/adapter.py function adapt (line 12) | def adapt(llm_handler, cache_data_convert, update_cache_callback, *args,... function aadapt (line 289) | async def aadapt( function _summarize_input (line 546) | def _summarize_input(text, text_length): function cache_health_check (line 562) | def cache_health_check(vectordb, cache_dict): FILE: gptcache/adapter/api.py function _cache_data_converter (line 47) | def _cache_data_converter(cache_data): function _update_cache_callback_none (line 52) | def _update_cache_callback_none( function _llm_handle_none (line 59) | def _llm_handle_none(*llm_args, **llm_kwargs) -> None: # pylint: disabl... function _update_cache_callback (line 64) | def _update_cache_callback( function put (line 71) | def put(prompt: str, data: Any, **kwargs) -> None: function get (line 105) | def get(prompt: str, **kwargs) -> Any: function init_similar_cache (line 134) | def init_similar_cache( function init_similar_cache_from_config (line 194) | def init_similar_cache_from_config(config_dir: str, cache_obj: Optional[... function _get_model (line 260) | def _get_model(model_src, model_config=None): function _get_eval (line 290) | def _get_eval(strategy, kws=None): function _get_pre_func (line 314) | def _get_pre_func(pre_process): function _get_pre_context_function (line 318) | def _get_pre_context_function(pre_context_process, kws=None): function _get_post_func (line 329) | def _get_post_func(post_process): FILE: gptcache/adapter/base.py class BaseCacheLLM (line 5) | class BaseCacheLLM(metaclass=ABCMeta): method fill_base_args (line 63) | def fill_base_args(cls, **kwargs): FILE: gptcache/adapter/diffusers.py class StableDiffusionPipeline (line 19) | class StableDiffusionPipeline(diffusers.StableDiffusionPipeline): method _llm_handler (line 44) | def _llm_handler(self, *llm_args, **llm_kwargs): method __call__ (line 50) | def __call__(self, *args, **kwargs): function _construct_resp_from_cache (line 67) | def _construct_resp_from_cache(img_64): FILE: gptcache/adapter/dolly.py class Dolly (line 13) | class Dolly: method __init__ (line 44) | def __init__(self, dolly_pipeline: Any): method from_model (line 48) | def from_model(cls, model: str, **kwargs): method __call__ (line 52) | def __call__(self, prompt: str, **kwargs): function _cache_data_convert (line 62) | def _cache_data_convert(cache_data): function _update_cache_callback (line 66) | def _update_cache_callback(llm_data, update_cache_func, *args, **kwargs)... FILE: gptcache/adapter/langchain_models.py class LangChainLLMs (line 28) | class LangChainLLMs(LLM): method _llm_type (line 55) | def _llm_type(self) -> str: method _identifying_params (line 59) | def _identifying_params(self) -> Mapping[str, Any]: method __str__ (line 62) | def __str__(self) -> str: method _call (line 65) | def _call( method _acall (line 88) | async def _acall(self, prompt: str, stop: Optional[List[str]] = None, method generate (line 92) | def generate( method agenerate (line 102) | async def agenerate( method __call__ (line 112) | def __call__( class LangChainChat (line 128) | class LangChainChat(BaseChatModel): method _llm_type (line 150) | def _llm_type(self) -> str: method _generate (line 157) | def _generate( method _agenerate (line 181) | async def _agenerate( method generate (line 205) | def generate( method agenerate (line 215) | async def agenerate( method _identifying_params (line 226) | def _identifying_params(self): method _combine_llm_outputs (line 229) | def _combine_llm_outputs(self, llm_outputs: List[Optional[dict]]) -> d... method get_num_tokens (line 232) | def get_num_tokens(self, text: str) -> int: method get_num_tokens_from_messages (line 235) | def get_num_tokens_from_messages(self, messages: List[BaseMessage]) ->... method __call__ (line 238) | def __call__(self, messages: Any, stop: Optional[List[str]] = None, **... function _cache_data_convert (line 246) | def _cache_data_convert(cache_data): function _update_cache_callback (line 250) | def _update_cache_callback( function _cache_msg_data_convert (line 257) | def _cache_msg_data_convert(cache_data): function _update_cache_msg_callback (line 271) | def _update_cache_msg_callback( FILE: gptcache/adapter/llama_cpp.py class Llama (line 13) | class Llama(llama_cpp.Llama): method __call__ (line 33) | def __call__( function _construct_resp_from_cache (line 67) | def _construct_resp_from_cache(return_message): function _construct_stream_resp_from_cache (line 83) | def _construct_stream_resp_from_cache(return_message): FILE: gptcache/adapter/minigpt4.py class MiniGPT4 (line 19) | class MiniGPT4: # pragma: no cover method __init__ (line 38) | def __init__(self, chat, return_hit): method from_pretrained (line 43) | def from_pretrained(cls, cfg_path, gpu_id=0, options=None, return_hit... method _llm_handler (line 56) | def _llm_handler(self, image, question): method __call__ (line 67) | def __call__(self, image, question, *args, **kwargs): FILE: gptcache/adapter/openai.py class ChatCompletion (line 31) | class ChatCompletion(openai.ChatCompletion, BaseCacheLLM): method _llm_handler (line 57) | def _llm_handler(cls, *llm_args, **llm_kwargs): method _allm_handler (line 68) | async def _allm_handler(cls, *llm_args, **llm_kwargs): method _update_cache_callback (line 79) | def _update_cache_callback( method create (line 109) | def create(cls, *args, **kwargs): method acreate (line 134) | async def acreate(cls, *args, **kwargs): function async_iter (line 161) | async def async_iter(input_list): class Completion (line 166) | class Completion(openai.Completion, BaseCacheLLM): method _llm_handler (line 186) | def _llm_handler(cls, *llm_args, **llm_kwargs): method _allm_handler (line 197) | async def _allm_handler(cls, *llm_args, **llm_kwargs): method _cache_data_convert (line 208) | def _cache_data_convert(cache_data): method _update_cache_callback (line 212) | def _update_cache_callback( method create (line 219) | def create(cls, *args, **kwargs): method acreate (line 230) | async def acreate(cls, *args, **kwargs): class Audio (line 241) | class Audio(openai.Audio): method transcribe (line 264) | def transcribe(cls, model: str, file: Any, *args, **kwargs): method translate (line 293) | def translate(cls, model: str, file: Any, *args, **kwargs): class Image (line 322) | class Image(openai.Image): method _llm_handler (line 345) | def _llm_handler(cls, *llm_args, **llm_kwargs): method create (line 352) | def create(cls, *args, **kwargs): class Moderation (line 386) | class Moderation(openai.Moderation, BaseCacheLLM): method _llm_handler (line 403) | def _llm_handler(cls, *llm_args, **llm_kwargs): method _cache_data_convert (line 414) | def _cache_data_convert(cls, cache_data): method _update_cache_callback (line 418) | def _update_cache_callback( method create (line 425) | def create(cls, *args, **kwargs): function _construct_resp_from_cache (line 451) | def _construct_resp_from_cache(return_message, saved_token): function _construct_stream_resp_from_cache (line 468) | def _construct_stream_resp_from_cache(return_message, saved_token): function _construct_text_from_cache (line 499) | def _construct_text_from_cache(return_text): function _construct_image_create_resp_from_cache (line 515) | def _construct_image_create_resp_from_cache(image_data, response_format,... function _construct_audio_text_from_cache (line 549) | def _construct_audio_text_from_cache(return_text): function _num_tokens_from_messages (line 556) | def _num_tokens_from_messages(messages): FILE: gptcache/adapter/replicate.py class Client (line 11) | class Client(replicate.client.Client): method run (line 44) | def run(self, model_version: str, **kwargs): FILE: gptcache/adapter/stability_sdk.py class StabilityInference (line 22) | class StabilityInference(client.StabilityInference): method _llm_handler (line 61) | def _llm_handler(self, *llm_args, **llm_kwargs): method generate (line 67) | def generate(self, *args, **kwargs): function _construct_resp_from_cache (line 100) | def _construct_resp_from_cache(img_64, height, width): class MockArtifact (line 114) | class MockArtifact: class MockAnswer (line 120) | class MockAnswer: FILE: gptcache/client.py class Client (line 14) | class Client: method __init__ (line 30) | def __init__(self, uri: str = "http://localhost:8000"): method _put (line 33) | async def _put(self, question: str, answer: str): method _get (line 46) | async def _get(self, question: str): method put (line 58) | def put(self, question: str, answer: str): method get (line 68) | def get(self, question: str): FILE: gptcache/config.py class Config (line 6) | class Config: method __init__ (line 37) | def __init__( FILE: gptcache/core.py class Cache (line 19) | class Cache: method __init__ (line 34) | def __init__(self): method init (line 46) | def init( method import_data (line 90) | def import_data(self, questions: List[Any], answers: List[Any], sessio... method flush (line 106) | def flush(self): method set_openai_key (line 115) | def set_openai_key(): method set_azure_openai_key (line 122) | def set_azure_openai_key(): FILE: gptcache/embedding/__init__.py function Cohere (line 35) | def Cohere(model="large", api_key=None): function OpenAI (line 39) | def OpenAI(model="text-embedding-ada-002", api_key=None): function Huggingface (line 43) | def Huggingface(model="distilbert-base-uncased"): function SBERT (line 47) | def SBERT(model="all-MiniLM-L6-v2"): function Onnx (line 51) | def Onnx(model="GPTCache/paraphrase-albert-onnx"): function FastText (line 55) | def FastText(model="en", dim=None): function Data2VecAudio (line 59) | def Data2VecAudio(model="facebook/data2vec-audio-base-960h"): function Timm (line 63) | def Timm(model="resnet50", device="default"): function ViT (line 67) | def ViT(model="google/vit-base-patch16-384"): function LangChain (line 71) | def LangChain(embeddings, dimension=0): function Rwkv (line 75) | def Rwkv(model="sgugger/rwkv-430M-pile"): function PaddleNLP (line 79) | def PaddleNLP(model="ernie-3.0-medium-zh"): function UForm (line 83) | def UForm(model="unum-cloud/uform-vl-multilingual", embedding_type="text"): FILE: gptcache/embedding/base.py class BaseEmbedding (line 4) | class BaseEmbedding(metaclass=ABCMeta): method to_embeddings (line 10) | def to_embeddings(self, data, **kwargs): method dimension (line 15) | def dimension(self) -> int: FILE: gptcache/embedding/cohere.py class Cohere (line 11) | class Cohere(BaseEmbedding): method __init__ (line 29) | def __init__(self, model: str = "large", api_key: str = None): method to_embeddings (line 38) | def to_embeddings(self, data, **_): method dimension (line 53) | def dimension(self): method dim_dict (line 64) | def dim_dict(): FILE: gptcache/embedding/data2vec.py class Data2VecAudio (line 15) | class Data2VecAudio(BaseEmbedding): method __init__ (line 30) | def __init__(self, model_name = "facebook/data2vec-audio-base-960h"): method to_embeddings (line 36) | def to_embeddings(self, data, **_): method load_audio (line 52) | def load_audio(self, audio_path, target_sr): method dimension (line 61) | def dimension(self): FILE: gptcache/embedding/fasttext.py class FastText (line 12) | class FastText(BaseEmbedding): method __init__ (line 30) | def __init__(self, model: str = "en", dim: int = None): method to_embeddings (line 38) | def to_embeddings(self, data, **_): method dimension (line 51) | def dimension(self): FILE: gptcache/embedding/huggingface.py class Huggingface (line 13) | class Huggingface(BaseEmbedding): method __init__ (line 33) | def __init__(self, model: str = "distilbert-base-uncased"): method to_embeddings (line 48) | def to_embeddings(self, data, **_): method post_proc (line 65) | def post_proc(self, token_embeddings, inputs): method dimension (line 76) | def dimension(self): FILE: gptcache/embedding/langchain.py class LangChain (line 11) | class LangChain(BaseEmbedding): method __init__ (line 32) | def __init__(self, embeddings: Embeddings, dimension: int = 0): method to_embeddings (line 38) | def to_embeddings(self, data, **kwargs): method dimension (line 43) | def dimension(self) -> int: FILE: gptcache/embedding/onnx.py class Onnx (line 19) | class Onnx(BaseEmbedding): method __init__ (line 32) | def __init__(self, model="GPTCache/paraphrase-albert-onnx"): method to_embeddings (line 43) | def to_embeddings(self, data, **_): method post_proc (line 64) | def post_proc(self, token_embeddings, attention_mask): method dimension (line 76) | def dimension(self): FILE: gptcache/embedding/openai.py class OpenAI (line 12) | class OpenAI(BaseEmbedding): method __init__ (line 30) | def __init__(self, model: str = "text-embedding-ada-002", api_key: str... method to_embeddings (line 49) | def to_embeddings(self, data, **_): method dimension (line 61) | def dimension(self): method dim_dict (line 72) | def dim_dict(): FILE: gptcache/embedding/paddlenlp.py class PaddleNLP (line 13) | class PaddleNLP(BaseEmbedding): method __init__ (line 29) | def __init__(self, model: str = "ernie-3.0-medium-zh"): method to_embeddings (line 38) | def to_embeddings(self, data, **_): method post_proc (line 55) | def post_proc(self, token_embeddings, inputs): method dimension (line 66) | def dimension(self): FILE: gptcache/embedding/rwkv.py class Rwkv (line 11) | class Rwkv(BaseEmbedding): method __init__ (line 28) | def __init__(self, model: str = "sgugger/rwkv-430M-pile"): method to_embeddings (line 41) | def to_embeddings(self, data, **_): method dimension (line 55) | def dimension(self): FILE: gptcache/embedding/sbert.py class SBERT (line 10) | class SBERT(BaseEmbedding): method __init__ (line 26) | def __init__(self, model: str = "all-MiniLM-L6-v2"): method to_embeddings (line 31) | def to_embeddings(self, data, **_): method dimension (line 48) | def dimension(self): FILE: gptcache/embedding/string.py function to_embeddings (line 1) | def to_embeddings(data, **_): FILE: gptcache/embedding/timm.py class Timm (line 16) | class Timm(BaseEmbedding): method __init__ (line 34) | def __init__(self, model: str = "resnet18", device: str = "default"): method to_embeddings (line 48) | def to_embeddings(self, data, skip_preprocess: bool = False, **_): method post_proc (line 67) | def post_proc(self, features): method preprocess (line 78) | def preprocess(self, image_path): method dimension (line 96) | def dimension(self): FILE: gptcache/embedding/uform.py class UForm (line 14) | class UForm(BaseEmbedding): method __init__ (line 36) | def __init__(self, model: Union[str, TritonClient] = "unum-cloud/uform... method to_embeddings (line 49) | def to_embeddings(self, data: Any, **_): method dimension (line 67) | def dimension(self): FILE: gptcache/embedding/vit.py class ViT (line 13) | class ViT(BaseEmbedding): method __init__ (line 39) | def __init__(self, model: str = "google/vit-base-patch16-384"): method to_embeddings (line 47) | def to_embeddings(self, data, **__): method preprocess (line 65) | def preprocess(self, data): method dimension (line 71) | def dimension(self): FILE: gptcache/manager/data_manager.py class DataManager (line 25) | class DataManager(metaclass=ABCMeta): method save (line 29) | def save(self, question, answer, embedding_data, **kwargs): method import_data (line 33) | def import_data( method get_scalar_data (line 43) | def get_scalar_data(self, res_data, **kwargs) -> CacheData: method hit_cache_callback (line 46) | def hit_cache_callback(self, res_data, **kwargs): method search (line 50) | def search(self, embedding_data, **kwargs): method flush (line 57) | def flush(self): method add_session (line 61) | def add_session(self, res_data, session_id, pre_embedding_data): method list_sessions (line 65) | def list_sessions(self, session_id, key): method delete_session (line 69) | def delete_session(self, session_id): method report_cache (line 72) | def report_cache( method close (line 84) | def close(self): class MapDataManager (line 88) | class MapDataManager(DataManager): method __init__ (line 107) | def __init__(self, data_path, max_size, get_data_container=None): method init (line 115) | def init(self): method save (line 126) | def save(self, question, answer, embedding_data, **kwargs): method import_data (line 133) | def import_data( method get_scalar_data (line 154) | def get_scalar_data(self, res_data, **kwargs) -> CacheData: method search (line 166) | def search(self, embedding_data, **kwargs): method flush (line 172) | def flush(self): method add_session (line 181) | def add_session(self, res_data, session_id, pre_embedding_data): method list_sessions (line 184) | def list_sessions(self, session_id=None, key=None): method delete_session (line 193) | def delete_session(self, session_id): method close (line 200) | def close(self): function normalize (line 204) | def normalize(vec): class SSDataManager (line 210) | class SSDataManager(DataManager): method __init__ (line 223) | def __init__( method _clear (line 249) | def _clear(self, marked_keys): method save (line 254) | def save(self, question, answer, embedding_data, **kwargs): method _process_answer_data (line 277) | def _process_answer_data(self, answers: Union[Answer, List[Answer]]): method _process_question_data (line 288) | def _process_question_data(self, question: Union[str, Question]): method import_data (line 300) | def import_data( method get_scalar_data (line 340) | def get_scalar_data(self, res_data, **kwargs) -> Optional[CacheData]: method hit_cache_callback (line 366) | def hit_cache_callback(self, res_data, **kwargs): method search (line 369) | def search(self, embedding_data, **kwargs): method flush (line 374) | def flush(self): method add_session (line 378) | def add_session(self, res_data, session_id, pre_embedding_data): method list_sessions (line 381) | def list_sessions(self, session_id=None, key=None): method delete_session (line 389) | def delete_session(self, session_id): method report_cache (line 393) | def report_cache( method close (line 411) | def close(self): FILE: gptcache/manager/eviction/__init__.py function EvictionBase (line 10) | def EvictionBase(name: str, **kwargs): FILE: gptcache/manager/eviction/base.py class EvictionBase (line 5) | class EvictionBase(metaclass=ABCMeta): method put (line 11) | def put(self, objs: List[Any]): method get (line 15) | def get(self, obj: Any): method policy (line 20) | def policy(self) -> str: FILE: gptcache/manager/eviction/distributed_cache.py class DistributedEviction (line 8) | class DistributedEviction(EvictionBase, ABC): method put (line 14) | def put(self, objs: List[str]): method get (line 18) | def get(self, obj: str): method policy (line 23) | def policy(self) -> str: class NoOpEviction (line 27) | class NoOpEviction(EvictionBase): method policy (line 34) | def policy(self) -> str: method __init__ (line 37) | def __init__(self, **kwargs): method put (line 40) | def put(self, objs: List[str]): method get (line 43) | def get(self, obj: str): FILE: gptcache/manager/eviction/manager.py class EvictionBase (line 7) | class EvictionBase: method __init__ (line 12) | def __init__(self): method get (line 19) | def get( FILE: gptcache/manager/eviction/memory_cache.py function popitem_wrapper (line 8) | def popitem_wrapper(func, wrapper_func, clean_size): class MemoryCacheEviction (line 20) | class MemoryCacheEviction(EvictionBase): method __init__ (line 35) | def __init__( method put (line 57) | def put(self, objs: List[Any]): method get (line 61) | def get(self, obj: Any): method policy (line 65) | def policy(self) -> str: FILE: gptcache/manager/eviction/redis_eviction.py class RedisCacheEviction (line 14) | class RedisCacheEviction(DistributedEviction, ABC): method __init__ (line 40) | def __init__(self, method _create_key (line 61) | def _create_key(self, key: str) -> str: method put (line 64) | def put(self, objs: List[str], expire=False): method get (line 69) | def get(self, obj: str): method policy (line 82) | def policy(self) -> str: FILE: gptcache/manager/eviction_manager.py class EvictionManager (line 1) | class EvictionManager: method __init__ (line 16) | def __init__(self, scalar_storage, vector_base): method check_evict (line 21) | def check_evict(self): method delete (line 31) | def delete(self): method rebuild (line 39) | def rebuild(self): method soft_evict (line 45) | def soft_evict(self, marked_keys): FILE: gptcache/manager/factory.py function manager_factory (line 11) | def manager_factory(manager="map", function get_data_manager (line 134) | def get_data_manager( FILE: gptcache/manager/object_data/__init__.py function ObjectBase (line 10) | def ObjectBase(name: str, **kwargs): FILE: gptcache/manager/object_data/base.py class ObjectBase (line 5) | class ObjectBase(ABC): method put (line 11) | def put(self, obj: Any) -> str: method get (line 15) | def get(self, obj: str) -> Any: method get_access_link (line 19) | def get_access_link(self, obj: str) -> str: method delete (line 23) | def delete(self, to_delete: List[str]): FILE: gptcache/manager/object_data/local_storage.py class LocalObjectStorage (line 9) | class LocalObjectStorage(ObjectBase): method __init__ (line 13) | def __init__(self, local_root: str): method put (line 17) | def put(self, obj: Any) -> str: method get (line 23) | def get(self, obj: str) -> Any: method get_access_link (line 30) | def get_access_link(self, obj: str, _: int = 3600): method delete (line 33) | def delete(self, to_delete: List[str]): FILE: gptcache/manager/object_data/manager.py class ObjectBase (line 4) | class ObjectBase: method __init__ (line 35) | def __init__(self): method get (line 41) | def get(name, **kwargs): FILE: gptcache/manager/object_data/s3_storage.py class S3Storage (line 14) | class S3Storage(ObjectBase): method __init__ (line 18) | def __init__(self, bucket: str, path_prefix: str, access_key: str, sec... method put (line 28) | def put(self, obj: Any) -> str: method get (line 33) | def get(self, obj: str) -> Any: method get_access_link (line 40) | def get_access_link(self, obj: str, expires: int = 3600) -> str: method delete (line 54) | def delete(self, to_delete: List[str]): FILE: gptcache/manager/scalar_data/__init__.py function CacheBase (line 10) | def CacheBase(name: str, **kwargs): FILE: gptcache/manager/scalar_data/base.py class DataType (line 10) | class DataType(IntEnum): class Answer (line 17) | class Answer: class QuestionDep (line 29) | class QuestionDep: method from_dict (line 39) | def from_dict(cls, d: Dict): class Question (line 44) | class Question: method from_dict (line 53) | def from_dict(cls, d: Dict): class CacheData (line 61) | class CacheData: method __init__ (line 73) | def __init__( class CacheStorage (line 99) | class CacheStorage(metaclass=ABCMeta): method create (line 105) | def create(self): method batch_insert (line 109) | def batch_insert(self, all_data: List[CacheData]): method get_data_by_id (line 113) | def get_data_by_id(self, key): method mark_deleted (line 117) | def mark_deleted(self, keys): method clear_deleted_data (line 121) | def clear_deleted_data(self): method get_ids (line 125) | def get_ids(self, deleted=True): method count (line 129) | def count(self, state: int = 0, is_all: bool = False): method flush (line 132) | def flush(self): method add_session (line 136) | def add_session(self, question_id, session_id, session_question): method list_sessions (line 140) | def list_sessions(self, session_id, key): method delete_session (line 144) | def delete_session(self, keys): method report_cache (line 148) | def report_cache( method close (line 160) | def close(self): FILE: gptcache/manager/scalar_data/dynamo_storage.py class DynamoStorage (line 18) | class DynamoStorage(CacheStorage): method __init__ (line 41) | def __init__( method create (line 61) | def create(self): method batch_insert (line 110) | def batch_insert(self, all_data: List[CacheData]) -> List[str]: method get_data_by_id (line 151) | def get_data_by_id(self, key: str) -> Optional[CacheData]: method mark_deleted (line 183) | def mark_deleted(self, keys: str): method clear_deleted_data (line 197) | def clear_deleted_data(self): method get_ids (line 239) | def get_ids(self, deleted: bool = True) -> List[str]: method count (line 266) | def count(self, state: int = 0, is_all: bool = False) -> int: method add_session (line 296) | def add_session(self, question_id: str, session_id: str, session_quest... method list_sessions (line 308) | def list_sessions(self, session_id = None, key = None) -> List[str]: method delete_session (line 353) | def delete_session(self, keys: List[str]): method report_cache (line 389) | def report_cache( method close (line 418) | def close(self): method _does_table_already_exist_and_is_active (line 421) | def _does_table_already_exist_and_is_active(self, table_name: str) -> ... method _wait_until_table_exists (line 428) | def _wait_until_table_exists(self, table_name: str): method _response_item_to_cache_data (line 437) | def _response_item_to_cache_data(self, question_resp: Dict) -> Optiona... method _fetch_all_pages (line 450) | def _fetch_all_pages(self, scan_fn) -> List[Dict]: method _question_text (line 474) | def _question_text(self, question) -> str: method _generate_id (line 477) | def _generate_id(self): method _strip_all_props_with_none_values (line 489) | def _strip_all_props_with_none_values(self, obj: Dict) -> Dict: method _serialize_deleted_value (line 496) | def _serialize_deleted_value(self, value: bool, suffix_value = randint... method _serialize_answer (line 507) | def _serialize_answer(self, answer: Answer) -> Dict: method _serialize_question_deps (line 510) | def _serialize_question_deps(self, dep: QuestionDep) -> Dict: method _deserialize_deleted_value (line 513) | def _deserialize_deleted_value(self, value: str) -> bool: method _deserialize_question_dep (line 516) | def _deserialize_question_dep(self, dep: Dict) -> QuestionDep: method _deserialize_answer (line 519) | def _deserialize_answer(self, answer: Dict) -> Answer: FILE: gptcache/manager/scalar_data/manager.py class CacheBase (line 17) | class CacheBase: method __init__ (line 58) | def __init__(self): method get (line 64) | def get(name, **kwargs): FILE: gptcache/manager/scalar_data/mongo.py function get_models (line 22) | def get_models(): class MongoStorage (line 112) | class MongoStorage(CacheStorage): method __init__ (line 159) | def __init__( method create (line 184) | def create(self): method _insert (line 187) | def _insert(self, data: CacheData): method batch_insert (line 233) | def batch_insert(self, all_data: List[CacheData]): method get_data_by_id (line 239) | def get_data_by_id(self, key) -> Optional[CacheData]: method mark_deleted (line 263) | def mark_deleted(self, keys): method clear_deleted_data (line 266) | def clear_deleted_data(self): method get_ids (line 274) | def get_ids(self, deleted: bool = True): method count (line 279) | def count(self, state: int = 0, is_all: bool = False): method add_session (line 284) | def add_session(self, question_id, session_id, session_question): method list_sessions (line 291) | def list_sessions(self, session_id=None, key=None): method delete_session (line 300) | def delete_session(self, keys): method count_answers (line 303) | def count_answers(self): method report_cache (line 306) | def report_cache( method close (line 325) | def close(self): FILE: gptcache/manager/scalar_data/redis_storage.py function get_models (line 23) | def get_models(global_key: str, redis_connection: Redis): class RedisCacheStorage (line 159) | class RedisCacheStorage(CacheStorage): method __init__ (line 201) | def __init__( method init_eviction_params (line 226) | def init_eviction_params(self, policy, maxmemory, maxmemory_samples, t... method create (line 235) | def create(self): method _insert (line 238) | def _insert(self, data: CacheData, pipeline: Pipeline = None): method batch_insert (line 293) | def batch_insert(self, all_data: List[CacheData]): method get_data_by_id (line 301) | def get_data_by_id(self, key: str): method mark_deleted (line 329) | def mark_deleted(self, keys): method clear_deleted_data (line 334) | def clear_deleted_data(self): method get_ids (line 347) | def get_ids(self, deleted=True): method count (line 354) | def count(self, state: int = 0, is_all: bool = False): method add_session (line 359) | def add_session(self, question_id, session_id, session_question): method list_sessions (line 366) | def list_sessions(self, session_id=None, key=None): method delete_session (line 379) | def delete_session(self, keys: List[str]): method report_cache (line 388) | def report_cache(self, user_question, cache_question, cache_question_i... method close (line 400) | def close(self): FILE: gptcache/manager/scalar_data/sql_storage.py function _get_table_len (line 38) | def _get_table_len(config: Dict, column_alias: str) -> int: function get_models (line 44) | def get_models(table_prefix, db_type, table_len_config): class SQLStorage (line 181) | class SQLStorage(CacheStorage): method __init__ (line 201) | def __init__( method create (line 218) | def create(self): method _insert (line 225) | def _insert(self, data: CacheData, session: sqlalchemy.orm.Session) ->... method batch_insert (line 269) | def batch_insert(self, all_data: List[CacheData]): method get_data_by_id (line 277) | def get_data_by_id(self, key: int) -> Optional[CacheData]: method get_ids (line 324) | def get_ids(self, deleted=True): method mark_deleted (line 330) | def mark_deleted(self, keys): method clear_deleted_data (line 337) | def clear_deleted_data(self): method count (line 353) | def count(self, state: int = 0, is_all: bool = False): method add_session (line 363) | def add_session(self, question_id, session_id, session_question): method delete_session (line 373) | def delete_session(self, keys): method list_sessions (line 378) | def list_sessions(self, session_id=None, key=None): method report_cache (line 387) | def report_cache(self, user_question, cache_question, cache_question_i... method close (line 400) | def close(self): method count_answers (line 403) | def count_answers(self): FILE: gptcache/manager/vector_data/__init__.py function VectorBase (line 10) | def VectorBase(name: str, **kwargs): FILE: gptcache/manager/vector_data/base.py class VectorData (line 9) | class VectorData: class VectorBase (line 14) | class VectorBase(ABC): method mul_add (line 18) | def mul_add(self, datas: List[VectorData]): method search (line 22) | def search(self, data: np.ndarray, top_k: int): method rebuild (line 26) | def rebuild(self, ids=None) -> bool: method delete (line 30) | def delete(self, ids) -> bool: method flush (line 33) | def flush(self): method close (line 36) | def close(self): method get_embeddings (line 39) | def get_embeddings(self, data_id: Union[int, str]) -> Optional[np.ndar... method update_embeddings (line 42) | def update_embeddings(self, data_id: Union[int, str], emb: np.ndarray): FILE: gptcache/manager/vector_data/chroma.py class Chromadb (line 14) | class Chromadb(VectorBase): method __init__ (line 28) | def __init__( method mul_add (line 49) | def mul_add(self, datas: List[VectorData]): method search (line 53) | def search(self, data, top_k: int = -1): method delete (line 65) | def delete(self, ids): method rebuild (line 68) | def rebuild(self, ids=None): # pylint: disable=unused-argument method get_embeddings (line 71) | def get_embeddings(self, data_id: str): method update_embeddings (line 81) | def update_embeddings(self, data_id: str, emb: np.ndarray): FILE: gptcache/manager/vector_data/docarray_index.py class DocarrayVectorData (line 15) | class DocarrayVectorData(BaseDoc): class DocArrayIndex (line 22) | class DocArrayIndex(VectorBase): method __init__ (line 32) | def __init__(self, index_file_path: str, top_k: int): method mul_add (line 39) | def mul_add(self, datas: List[VectorData]) -> None: method search (line 50) | def search( method rebuild (line 68) | def rebuild(self, ids: Optional[List[int]] = None) -> bool: method delete (line 74) | def delete(self, ids: Optional[List[str]]) -> None: method flush (line 83) | def flush(self) -> None: method close (line 86) | def close(self) -> None: FILE: gptcache/manager/vector_data/faiss.py class Faiss (line 14) | class Faiss(VectorBase): method __init__ (line 25) | def __init__(self, index_file_path, dimension, top_k): method mul_add (line 33) | def mul_add(self, datas: List[VectorData]): method search (line 39) | def search(self, data: np.ndarray, top_k: int = -1): method rebuild (line 49) | def rebuild(self, ids=None): method delete (line 52) | def delete(self, ids): method flush (line 56) | def flush(self): method close (line 59) | def close(self): method count (line 62) | def count(self): FILE: gptcache/manager/vector_data/hnswlib_store.py class Hnswlib (line 14) | class Hnswlib(VectorBase): method __init__ (line 27) | def __init__(self, index_file_path: str, dimension: int, top_k: int, m... method add (line 39) | def add(self, key: int, data: np.ndarray): method mul_add (line 43) | def mul_add(self, datas: List[VectorData]): method search (line 49) | def search(self, data: np.ndarray, top_k: int = -1): method rebuild (line 56) | def rebuild(self, ids): method delete (line 67) | def delete(self, ids): method flush (line 71) | def flush(self): method close (line 74) | def close(self): FILE: gptcache/manager/vector_data/manager.py class VectorBase (line 35) | class VectorBase: method __init__ (line 98) | def __init__(self): method check_dimension (line 104) | def check_dimension(dimension): method get (line 111) | def get(name, **kwargs): FILE: gptcache/manager/vector_data/milvus.py class Milvus (line 23) | class Milvus(VectorBase): method __init__ (line 64) | def __init__( method _create_local (line 96) | def _create_local(self, port, local_data): method _connect (line 105) | def _connect(self, host, port, user, password, secure): method _create_collection (line 125) | def _create_collection(self, collection_name): method mul_add (line 166) | def mul_add(self, datas: List[VectorData]): method search (line 172) | def search(self, data: np.ndarray, top_k: int = -1): method delete (line 183) | def delete(self, ids): method rebuild (line 187) | def rebuild(self, ids=None): # pylint: disable=unused-argument method flush (line 190) | def flush(self): method close (line 193) | def close(self): method get_embeddings (line 198) | def get_embeddings(self, data_id: int): method update_embeddings (line 208) | def update_embeddings(self, data_id: int, emb: np.ndarray): FILE: gptcache/manager/vector_data/pgvector.py class _VectorType (line 22) | class _VectorType(UserDefinedType): method __init__ (line 28) | def __init__(self, precision=8): method get_col_spec (line 31) | def get_col_spec(self, **_): method bind_processor (line 35) | def bind_processor(self, dialect): method result_processor (line 39) | def result_processor(self, dialect, coltype): function _get_model_and_index (line 43) | def _get_model_and_index(table_prefix, vector_dimension, index_type, lis... class PGVector (line 66) | class PGVector(VectorBase): method __init__ (line 87) | def __init__( method _connect (line 112) | def _connect(self, url): method _create_collection (line 116) | def _create_collection(self): method _query (line 123) | def _query(self, session): method _format_data_for_search (line 126) | def _format_data_for_search(self, data): method mul_add (line 129) | def mul_add(self, datas: List[VectorData]): method search (line 138) | def search(self, data: np.ndarray, top_k: int = -1): method delete (line 156) | def delete(self, ids): method rebuild (line 161) | def rebuild(self, ids=None): # pylint: disable=unused-argument method flush (line 166) | def flush(self): method close (line 170) | def close(self): FILE: gptcache/manager/vector_data/qdrant.py class QdrantVectorStore (line 22) | class QdrantVectorStore(VectorBase): method __init__ (line 25) | def __init__( method _create_local (line 60) | def _create_local(self, location): method _create_remote (line 63) | def _create_remote( method _create_collection (line 78) | def _create_collection( method mul_add (line 109) | def mul_add(self, datas: List[VectorData]): method search (line 117) | def search(self, data: np.ndarray, top_k: int = -1): method delete (line 128) | def delete(self, ids: List[str]): method rebuild (line 131) | def rebuild(self, ids=None): # pylint: disable=unused-argument method flush (line 139) | def flush(self): method close (line 143) | def close(self): FILE: gptcache/manager/vector_data/redis_vectorstore.py class RedisVectorStore (line 18) | class RedisVectorStore(VectorBase): method __init__ (line 43) | def __init__( method _check_index_exists (line 64) | def _check_index_exists(self, index_name: str) -> bool: method _create_collection (line 74) | def _create_collection(self, collection_name): method mul_add (line 101) | def mul_add(self, datas: List[VectorData]): method search (line 113) | def search(self, data: np.ndarray, top_k: int = -1): method rebuild (line 131) | def rebuild(self, ids=None) -> bool: method delete (line 134) | def delete(self, ids) -> None: FILE: gptcache/manager/vector_data/usearch.py class USearch (line 15) | class USearch(VectorBase): method __init__ (line 36) | def __init__( method mul_add (line 61) | def mul_add(self, datas: List[VectorData]): method search (line 67) | def search(self, data: np.ndarray, top_k: int = -1): method rebuild (line 74) | def rebuild(self, ids=None): method delete (line 77) | def delete(self, ids): method flush (line 80) | def flush(self): method close (line 83) | def close(self): method count (line 86) | def count(self): FILE: gptcache/manager/vector_data/weaviate.py class Weaviate (line 17) | class Weaviate(VectorBase): method __init__ (line 24) | def __init__( method _create_class (line 65) | def _create_class(self): method _get_default_class_schema (line 75) | def _get_default_class_schema(self) -> dict: method mul_add (line 89) | def mul_add(self, datas: List[VectorData]): method search (line 100) | def search(self, data: np.ndarray, top_k: int = -1): method _get_uuids (line 119) | def _get_uuids(self, data_ids): method delete (line 140) | def delete(self, ids): method rebuild (line 146) | def rebuild(self, ids=None): method flush (line 149) | def flush(self): method close (line 152) | def close(self): method get_embeddings (line 155) | def get_embeddings(self, data_id: int): method update_embeddings (line 178) | def update_embeddings(self, data_id: int, emb: np.ndarray): FILE: gptcache/processor/check_hit.py function check_hit_session (line 2) | def check_hit_session(cur_session_id: str, cache_session_ids: list, cach... FILE: gptcache/processor/context/__init__.py function SummarizationContextProcess (line 23) | def SummarizationContextProcess(model_name=None, tokenizer=None, target_... function SelectiveContextProcess (line 29) | def SelectiveContextProcess( function ConcatContextProcess (line 43) | def ConcatContextProcess(): FILE: gptcache/processor/context/concat_context.py class ConcatContextProcess (line 6) | class ConcatContextProcess(ContextProcess): method __init__ (line 31) | def __init__( method format_all_content (line 37) | def format_all_content(self, data: Dict[str, Any], **params: Dict[str,... method process_all_content (line 42) | def process_all_content(self) -> (Any, Any): FILE: gptcache/processor/context/context.py class ContextProcess (line 5) | class ContextProcess(metaclass=ABCMeta): method format_all_content (line 19) | def format_all_content(self, data: Dict[str, Any], **params: Dict[str,... method process_all_content (line 28) | def process_all_content(self) -> (Any, Any): method pre_process (line 34) | def pre_process(self, data: Dict[str, Any], **params: Dict[str, Any]) ... FILE: gptcache/processor/context/selective_context.py class SelectiveContextProcess (line 11) | class SelectiveContextProcess(ContextProcess): method __init__ (line 40) | def __init__( method format_all_content (line 51) | def format_all_content(self, data: Dict[str, Any], **params: Dict[str,... method process_all_content (line 55) | def process_all_content(self) -> (Any, Any): FILE: gptcache/processor/context/summarization_context.py function summarize_to_length (line 13) | def summarize_to_length(summarizer, text, target_len, max_len=1024): class SummarizationContextProcess (line 39) | class SummarizationContextProcess(ContextProcess): method __init__ (line 59) | def __init__( method summarize_to_sentence (line 70) | def summarize_to_sentence(self, sentences, target_size=1000): method format_all_content (line 91) | def format_all_content(self, data: Dict[str, Any], **params: Dict[str,... method process_all_content (line 97) | def process_all_content(self) -> (Any, Any): FILE: gptcache/processor/post.py function random_one (line 9) | def random_one(messages: List[Any]) -> Any: function first (line 26) | def first(messages: List[Any]) -> Any: function nop (line 44) | def nop(messages: List[Any]) -> Any: function temperature_softmax (line 62) | def temperature_softmax(messages: List[Any], scores: List[float], temper... function llm_semantic_verification (line 93) | def llm_semantic_verification( class LlmVerifier (line 173) | class LlmVerifier: method __init__ (line 185) | def __init__(self, client=None, system_prompt=None, model="gpt-3.5-tur... method __call__ (line 190) | def __call__(self, messages, scores=None, original_question=None, **kw... FILE: gptcache/processor/pre.py function last_content (line 6) | def last_content(data: Dict[str, Any], **_: Dict[str, Any]) -> Any: function last_content_without_prompt (line 23) | def last_content_without_prompt(data: Dict[str, Any], **params: Dict[str... function _get_pattern_value (line 51) | def _get_pattern_value(pattern_str: str, value_str: str): function last_content_without_template (line 77) | def last_content_without_template(data: Dict[str, Any], **params: Dict[s... function all_content (line 138) | def all_content(data: Dict[str, Any], **_: Dict[str, Any]) -> Any: function nop (line 164) | def nop(data: Dict[str, Any], **_: Dict[str, Any]) -> Any: function get_prompt (line 181) | def get_prompt(data: Dict[str, Any], **_: Dict[str, Any]) -> Any: function get_file_name (line 198) | def get_file_name(data: Dict[str, Any], **_: Dict[str, Any]) -> str: function get_file_bytes (line 216) | def get_file_bytes(data: Dict[str, Any], **_: Dict[str, Any]) -> bytes: function get_input_str (line 232) | def get_input_str(data: Dict[str, Any], **_: Dict[str, Any]) -> str: function get_input_image_file_name (line 249) | def get_input_image_file_name(data: Dict[str, Any], **_: Dict[str, Any])... function get_image_question (line 267) | def get_image_question(data: Dict[str, Any], **_: Dict[str, Any]) -> str... function get_image (line 285) | def get_image(data: Dict[str, Any], **_: Dict[str, Any]) -> str: # prag... function get_inputs (line 302) | def get_inputs(data: Dict[str, Any], **_: Dict[str, Any]): function get_messages_last_content (line 319) | def get_messages_last_content(data: Dict[str, Any], **_: Any) -> str: function get_openai_moderation_input (line 336) | def get_openai_moderation_input(data: Dict[str, Any], **_: Dict[str, Any... function concat_all_queries (line 354) | def concat_all_queries(data: Dict[str, Any], **params: Dict[str, Any]) -... FILE: gptcache/report.py class Report (line 1) | class Report: method __init__ (line 4) | def __init__(self): method pre (line 15) | def pre(self, delta_time): method embedding (line 23) | def embedding(self, delta_time): method search (line 31) | def search(self, delta_time): method data (line 39) | def data(self, delta_time): method evaluation (line 48) | def evaluation(self, delta_time): method post (line 56) | def post(self, delta_time): method llm (line 64) | def llm(self, delta_time): method save (line 72) | def save(self, delta_time): method average_pre_time (line 80) | def average_pre_time(self): method average_embedding_time (line 84) | def average_embedding_time(self): method average_search_time (line 88) | def average_search_time(self): method average_data_time (line 92) | def average_data_time(self): method average_evaluation_time (line 96) | def average_evaluation_time(self): method average_post_time (line 100) | def average_post_time(self): method average_llm_time (line 104) | def average_llm_time(self): method average_save_time (line 108) | def average_save_time(self): method hint_cache (line 112) | def hint_cache(self): class OpCounter (line 117) | class OpCounter: method average (line 125) | def average(self): FILE: gptcache/session.py class Session (line 10) | class Session: method __init__ (line 48) | def __init__( method name (line 61) | def name(self): method __enter__ (line 64) | def __enter__(self): method __exit__ (line 70) | def __exit__(self, *_): method drop (line 73) | def drop(self): FILE: gptcache/similarity_evaluation/__init__.py function OnnxModelEvaluation (line 47) | def OnnxModelEvaluation(model="GPTCache/albert-duplicate-onnx"): function NumpyNormEvaluation (line 51) | def NumpyNormEvaluation(enable_normal: bool = False, **kwargs): function SearchDistanceEvaluation (line 55) | def SearchDistanceEvaluation(max_distance=4.0, positive=False): function ExactMatchEvaluation (line 59) | def ExactMatchEvaluation(): function KReciprocalEvaluation (line 63) | def KReciprocalEvaluation(vectordb, top_k=3, max_distance=4.0, positive=... function CohereRerankEvaluation (line 67) | def CohereRerankEvaluation(model: str = "rerank-english-v2.0", api_key: ... function SequenceMatchEvaluation (line 71) | def SequenceMatchEvaluation(weights, embedding_extractor, embedding_conf... function TimeEvaluation (line 75) | def TimeEvaluation(evaluation: str, evaluation_config: Dict[str, Any], t... function SbertCrossencoderEvaluation (line 78) | def SbertCrossencoderEvaluation(model: str = "cross-encoder/quora-distil... FILE: gptcache/similarity_evaluation/cohere_rerank.py class CohereRerank (line 11) | class CohereRerank(SimilarityEvaluation): method __init__ (line 37) | def __init__(self, model: str = "rerank-english-v2.0", api_key: str = ... method evaluation (line 41) | def evaluation(self, src_dict: Dict[str, Any], cache_dict: Dict[str, A... method range (line 52) | def range(self) -> Tuple[float, float]: FILE: gptcache/similarity_evaluation/distance.py class SearchDistanceEvaluation (line 6) | class SearchDistanceEvaluation(SimilarityEvaluation): method __init__ (line 34) | def __init__(self, max_distance=4.0, positive=False): method evaluation (line 38) | def evaluation( method range (line 58) | def range(self) -> Tuple[float, float]: FILE: gptcache/similarity_evaluation/exact_match.py class ExactMatchEvaluation (line 6) | class ExactMatchEvaluation(SimilarityEvaluation): method __init__ (line 28) | def __init__(self): method evaluation (line 31) | def evaluation( method range (line 45) | def range(self) -> Tuple[float, float]: FILE: gptcache/similarity_evaluation/kreciprocal.py function euclidean_distance_calculate (line 8) | def euclidean_distance_calculate(vec_l: np.array, vec_r: np.array): class KReciprocalEvaluation (line 11) | class KReciprocalEvaluation(SearchDistanceEvaluation): method __init__ (line 57) | def __init__(self, vectordb: VectorBase, top_k: int = 3, max_distance:... method normalize (line 63) | def normalize(vec: np.ndarray): method evaluation (line 76) | def evaluation( FILE: gptcache/similarity_evaluation/np.py class NumpyNormEvaluation (line 8) | class NumpyNormEvaluation(SimilarityEvaluation): method __init__ (line 39) | def __init__(self, enable_normal: bool = True, question_embedding_func... method normalize (line 44) | def normalize(vec: np.ndarray): method evaluation (line 56) | def evaluation( method range (line 86) | def range(self) -> Tuple[float, float]: FILE: gptcache/similarity_evaluation/onnx.py function pad_sequence (line 21) | def pad_sequence(input_ids_list: List[np.ndarray], padding_value: int = 0): class OnnxModelEvaluation (line 29) | class OnnxModelEvaluation(SimilarityEvaluation): method __init__ (line 53) | def __init__(self, model: str = "GPTCache/albert-duplicate-onnx"): method evaluation (line 61) | def evaluation( method range (line 82) | def range(self) -> Tuple[float, float]: method inference (line 89) | def inference(self, reference: str, candidates: List[str]) -> np.ndarray: FILE: gptcache/similarity_evaluation/sbert_crossencoder.py class SbertCrossencoderEvaluation (line 7) | class SbertCrossencoderEvaluation(SimilarityEvaluation): method __init__ (line 31) | def __init__(self, model: str="cross-encoder/quora-distilroberta-base"): method evaluation (line 34) | def evaluation( method range (line 55) | def range(self) -> Tuple[float, float]: FILE: gptcache/similarity_evaluation/sequence_match.py function euclidean_distance_calculate (line 9) | def euclidean_distance_calculate(vec_l: np.array, vec_r: np.array): function reweight (line 13) | def reweight(weights, length): class SequenceMatchEvaluation (line 26) | class SequenceMatchEvaluation(SimilarityEvaluation): method __init__ (line 56) | def __init__( method normalize (line 63) | def normalize(vec: np.ndarray): method evaluation (line 75) | def evaluation( method range (line 117) | def range(self) -> Tuple[float, float]: FILE: gptcache/similarity_evaluation/similarity_evaluation.py class SimilarityEvaluation (line 5) | class SimilarityEvaluation(metaclass=ABCMeta): method evaluation (line 22) | def evaluation( method range (line 35) | def range(self) -> Tuple[float, float]: FILE: gptcache/similarity_evaluation/time.py class TimeEvaluation (line 8) | class TimeEvaluation(SimilarityEvaluation): method __init__ (line 38) | def __init__(self, evaluation: str, evaluation_config=None, time_range... method evaluation (line 44) | def evaluation(self, src_dict: Dict[str, Any], cache_dict: Dict[str, A... method range (line 53) | def range(self) -> Tuple[float, float]: FILE: gptcache/utils/__init__.py function _check_library (line 54) | def _check_library(libname: str, prompt: bool = True, package: Optional[... function import_pymilvus (line 63) | def import_pymilvus(): function import_milvus_lite (line 67) | def import_milvus_lite(): function import_qdrant (line 71) | def import_qdrant(): function import_sbert (line 75) | def import_sbert(): function import_cohere (line 79) | def import_cohere(): function import_fasttext (line 83) | def import_fasttext(): function import_huggingface (line 87) | def import_huggingface(): function import_uform (line 91) | def import_uform(): function import_usearch (line 95) | def import_usearch(): function import_torch (line 99) | def import_torch(): function import_huggingface_hub (line 103) | def import_huggingface_hub(): function import_onnxruntime (line 107) | def import_onnxruntime(): function import_faiss (line 111) | def import_faiss(): function import_hnswlib (line 115) | def import_hnswlib(): function import_chromadb (line 119) | def import_chromadb(): function import_sqlalchemy (line 123) | def import_sqlalchemy(): function import_postgresql (line 127) | def import_postgresql(): function import_pymysql (line 131) | def import_pymysql(): function import_pyodbc (line 137) | def import_pyodbc(): function import_cxoracle (line 142) | def import_cxoracle(): function import_duckdb (line 146) | def import_duckdb(): function import_sql_client (line 151) | def import_sql_client(db_name): function import_mongodb (line 164) | def import_mongodb(): function import_pydantic (line 169) | def import_pydantic(): function import_langchain (line 173) | def import_langchain(): function import_pillow (line 177) | def import_pillow(): function import_boto3 (line 181) | def import_boto3(): function import_diffusers (line 185) | def import_diffusers(): function import_torchaudio (line 189) | def import_torchaudio(): function import_torchvision (line 193) | def import_torchvision(): function import_timm (line 197) | def import_timm(): function import_vit (line 201) | def import_vit(): function import_replicate (line 205) | def import_replicate(): function import_stability (line 209) | def import_stability(): function import_scipy (line 213) | def import_scipy(): function import_llama_cpp_python (line 217) | def import_llama_cpp_python(): function import_ruamel (line 221) | def import_ruamel(): function import_selective_context (line 225) | def import_selective_context(): function import_httpx (line 229) | def import_httpx(): function import_openai (line 233) | def import_openai(): function import_docarray (line 237) | def import_docarray(): function import_paddle (line 241) | def import_paddle(): function import_paddlenlp (line 246) | def import_paddlenlp(): function import_tiktoken (line 250) | def import_tiktoken(): function import_fastapi (line 254) | def import_fastapi(): function import_redis (line 259) | def import_redis(): function import_starlette (line 264) | def import_starlette(): function import_weaviate (line 268) | def import_weaviate(): FILE: gptcache/utils/cache_func.py function cache_all (line 1) | def cache_all(*_, **__): FILE: gptcache/utils/dependency_control.py function prompt_install (line 7) | def prompt_install(package: str, warn: bool = False): # pragma: no cover FILE: gptcache/utils/error.py class CacheError (line 1) | class CacheError(Exception): class NotInitError (line 5) | class NotInitError(CacheError): method __init__ (line 7) | def __init__(self): class NotFoundError (line 11) | class NotFoundError(CacheError): method __init__ (line 13) | def __init__(self, store_type, current_type_name): class ParamError (line 17) | class ParamError(CacheError): class PipInstallError (line 21) | class PipInstallError(CacheError): method __init__ (line 23) | def __init__(self, package): function wrap_error (line 27) | def wrap_error(e: Exception) -> Exception: FILE: gptcache/utils/lazy_import.py class LazyImport (line 5) | class LazyImport(ModuleType): method __init__ (line 10) | def __init__(self, local_name, parent_module_globals, name): method _load (line 15) | def _load(self): method __getattr__ (line 21) | def __getattr__(self, item): method __dir__ (line 25) | def __dir__(self): FILE: gptcache/utils/response.py function get_message_from_openai_answer (line 5) | def get_message_from_openai_answer(openai_resp): function get_stream_message_from_openai_answer (line 9) | def get_stream_message_from_openai_answer(openai_data): function get_text_from_openai_answer (line 13) | def get_text_from_openai_answer(openai_resp): function get_image_from_openai_b64 (line 17) | def get_image_from_openai_b64(openai_resp): function get_image_from_openai_url (line 21) | def get_image_from_openai_url(openai_resp): function get_image_from_path (line 28) | def get_image_from_path(openai_resp): function get_audio_text_from_openai_answer (line 35) | def get_audio_text_from_openai_answer(openai_resp): FILE: gptcache/utils/softmax.py function softmax (line 4) | def softmax(x: list): FILE: gptcache/utils/time.py function time_cal (line 6) | def time_cal(func, func_name=None, report_func=None): FILE: gptcache/utils/token.py function _get_encoding (line 6) | def _get_encoding(): function token_counter (line 15) | def token_counter(text): FILE: gptcache_server/server.py class CacheData (line 33) | class CacheData(BaseModel): function hello (line 39) | async def hello(): function put_cache (line 44) | async def put_cache(cache_data: CacheData) -> str: function get_cache (line 50) | async def get_cache(cache_data: CacheData) -> CacheData: function flush_cache (line 56) | async def flush_cache() -> str: function get_cache_file (line 62) | async def get_cache_file(key: str = "") -> FileResponse: function chat (line 89) | async def chat(request: Request): function main (line 144) | def main(): FILE: setup.py function parse_requirements (line 16) | def parse_requirements(file_name: str) -> List[str]: function read (line 24) | def read(*parts): function find_version (line 29) | def find_version(*file_paths): FILE: tests/integration_tests/base/client_base.py class Base (line 8) | class Base: method setup_method (line 9) | def setup_method(self, method): method teardown_method (line 15) | def teardown_method(self, method): FILE: tests/integration_tests/common/common_func.py function remove_file (line 7) | def remove_file(file_names=[ct.sqlite_file, ct.faiss_file]): function log_time_func (line 19) | def log_time_func(func_name, delta_time): function disable_cache (line 29) | def disable_cache(*args, **kwargs): FILE: tests/integration_tests/config/log_config.py class LogConfig (line 5) | class LogConfig: method __init__ (line 6) | def __init__(self): method get_env_variable (line 14) | def get_env_variable(var="CI_LOG_PATH"): method create_path (line 29) | def create_path(log_path): method get_default_config (line 35) | def get_default_config(self): FILE: tests/integration_tests/examples/map/test_example_map.py function test_map (line 9) | def test_map(): FILE: tests/integration_tests/examples/sqlite_faiss_mock/test_example_sqlite_faiss.py function mock_embeddings (line 14) | def mock_embeddings(data, **kwargs): # pylint: disable=W0613 function test_sqlite_faiss (line 18) | def test_sqlite_faiss(): FILE: tests/integration_tests/examples/sqlite_faiss_onnx/test_example_sqlite_faiss_onnx.py function test_sqlite_faiss_onnx (line 11) | def test_sqlite_faiss_onnx(): FILE: tests/integration_tests/processor/pre/test_pre_without_prompt.py function test_pre_without_prompt (line 10) | def test_pre_without_prompt(): FILE: tests/integration_tests/test_redis_onnx.py function test_redis_sqlite (line 13) | def test_redis_sqlite(): FILE: tests/integration_tests/test_sqlite_faiss_onnx.py class TestSqliteInvalid (line 13) | class TestSqliteInvalid(Base): method test_invalid_similarity_threshold (line 23) | def test_invalid_similarity_threshold(self, threshold): method test_no_openai_key (line 50) | def test_no_openai_key(self): class TestSqliteFaiss (line 85) | class TestSqliteFaiss(Base): method test_hit_default (line 94) | def test_hit_default(self): method test_hit (line 126) | def test_hit(self): method test_miss (line 159) | def test_miss(self): method test_disable_cache (line 198) | def test_disable_cache(self): FILE: tests/integration_tests/test_sqlite_milvus_sbert.py function get_text_response (line 16) | def get_text_response(response): class TestSqliteMilvus (line 26) | class TestSqliteMilvus(Base): method test_cache_health_check (line 34) | def test_cache_health_check(self): FILE: tests/integration_tests/utils/util_log.py class TestLog (line 7) | class TestLog: method __init__ (line 8) | def __init__(self, logger, log_debug, log_file, log_err, log_worker): FILE: tests/unit_tests/adapter/test_adapter.py function test_adapt (line 19) | def test_adapt(): function test_not_init_cache (line 117) | def test_not_init_cache(): function test_cache_temperature (line 128) | def test_cache_temperature(): function test_input_summarization (line 164) | def test_input_summarization(): FILE: tests/unit_tests/adapter/test_api.py function test_gptcache_api (line 25) | def test_gptcache_api(): function test_none_scale_data (line 54) | def test_none_scale_data(): function test_init_with_config (line 85) | def test_init_with_config(): function test_init_with_new_config (line 117) | def test_init_with_new_config(): FILE: tests/unit_tests/adapter/test_diffusers.py function get_dummy_components (line 22) | def get_dummy_components(): function test_stable_diffusion (line 78) | def test_stable_diffusion(): FILE: tests/unit_tests/adapter/test_dolly.py class MockDolly (line 15) | class MockDolly: method __init__ (line 16) | def __init__(self, *args, **kwargs): method __call__ (line 19) | def __call__(self, inputs, **kwargs): class TestDolly (line 23) | class TestDolly(unittest.TestCase): method test_normal (line 24) | def test_normal(self): FILE: tests/unit_tests/adapter/test_langchain_models.py function test_langchain_llms (line 21) | def test_langchain_llms(): function test_langchain_chats (line 62) | def test_langchain_chats(): function test_last_content_without_template (line 143) | def test_last_content_without_template(): FILE: tests/unit_tests/adapter/test_llama_cpp.py class MockLlama (line 16) | class MockLlama: method __init__ (line 17) | def __init__(self, *args, **kwargs): method create_completion (line 20) | def create_completion(*args, **kwargs): class TestLlama (line 49) | class TestLlama(unittest.TestCase): method test_llama_cpp (line 50) | def test_llama_cpp(self): method test_llama_cpp_stream (line 77) | def test_llama_cpp_stream(self): FILE: tests/unit_tests/adapter/test_openai.py function test_normal_openai (line 44) | def test_normal_openai(enable_token_counter): function test_normal_openai_async (line 87) | async def test_normal_openai_async(enable_token_counter): function test_stream_openai (line 132) | def test_stream_openai(): function test_stream_openai_async (line 206) | async def test_stream_openai_async(): function test_completion (line 290) | def test_completion(): function test_completion_async (line 314) | async def test_completion_async(): function test_completion_error_wrapping (line 342) | async def test_completion_error_wrapping(): function test_image_create (line 359) | def test_image_create(): function test_audio_transcribe (line 415) | def test_audio_transcribe(): function test_audio_translate (line 437) | def test_audio_translate(): function test_moderation (line 463) | def test_moderation(): function test_base_llm_cache (line 581) | def test_base_llm_cache(): function test_base_llm_cache_async (line 679) | async def test_base_llm_cache_async(): FILE: tests/unit_tests/adapter/test_replicate.py function test_replicate (line 25) | def test_replicate(): FILE: tests/unit_tests/adapter/test_stability.py function test_stability_inference_map (line 25) | def test_stability_inference_map(): function test_stability_inference_faiss (line 61) | def test_stability_inference_faiss(): FILE: tests/unit_tests/embedding/test_cohere.py function test_embedding (line 11) | def test_embedding(): FILE: tests/unit_tests/embedding/test_data2vec.py function test_data2vec_audio (line 9) | def test_data2vec_audio(): FILE: tests/unit_tests/embedding/test_embedding_openai.py function test_embedding (line 8) | def test_embedding(): FILE: tests/unit_tests/embedding/test_embedding_string.py function test_embedding (line 4) | def test_embedding(): FILE: tests/unit_tests/embedding/test_huggingface.py function test_huggingface (line 5) | def test_huggingface(): FILE: tests/unit_tests/embedding/test_langchain.py function test_langchain_embedding (line 8) | def test_langchain_embedding(): FILE: tests/unit_tests/embedding/test_onnx.py function test_onnx (line 5) | def test_onnx(): FILE: tests/unit_tests/embedding/test_paddlenlp.py function test_paddlenlp (line 5) | def test_paddlenlp(): FILE: tests/unit_tests/embedding/test_rwkv.py function test_rwkv (line 5) | def test_rwkv(): FILE: tests/unit_tests/embedding/test_sbert.py function test_sbert (line 5) | def test_sbert(): FILE: tests/unit_tests/embedding/test_timm.py function test_timm (line 9) | def test_timm(): FILE: tests/unit_tests/embedding/test_uform.py function test_uform (line 13) | def test_uform(): FILE: tests/unit_tests/embedding/test_vit.py function test_timm (line 9) | def test_timm(): FILE: tests/unit_tests/eviction/test_distributed_cache.py class TestDistributedCache (line 13) | class TestDistributedCache(unittest.TestCase): method setUp (line 16) | def setUp(cls) -> None: method _clear_test_db (line 20) | def _clear_test_db(): method test_redis_only_cache_eviction (line 26) | def test_redis_only_cache_eviction(self): method test_eviction_base_str (line 37) | def test_eviction_base_str(self): method test_redis_sqlite_cache_eviction (line 53) | def test_redis_sqlite_cache_eviction(self): method test_noeviction_policy (line 72) | def test_noeviction_policy(self): method test_ttl (line 100) | def test_ttl(self): method test_redis_only_config (line 126) | def test_redis_only_config(self): method test_redis_only_with_no_op_eviction_config (line 147) | def test_redis_only_with_no_op_eviction_config(self): method test_cache_configuration (line 168) | def test_cache_configuration(self): method test_ttl_access (line 183) | def test_ttl_access(self): FILE: tests/unit_tests/eviction/test_memory_cache.py class TestEviction (line 8) | class TestEviction(unittest.TestCase): method test_memory_cache_eviction (line 9) | def test_memory_cache_eviction(self): method test_lru (line 31) | def test_lru(self): method test_lru_no_clean_size (line 56) | def test_lru_no_clean_size(self): method test_lfu (line 82) | def test_lfu(self): method test_fifo (line 113) | def test_fifo(self): method test_rr (line 138) | def test_rr(self): FILE: tests/unit_tests/manager/test_base.py class TestBaseStore (line 9) | class TestBaseStore(unittest.TestCase): method test_cache_base (line 10) | def test_cache_base(self): method test_vector_base (line 17) | def test_vector_base(self): FILE: tests/unit_tests/manager/test_chromadb.py class TestChromadb (line 9) | class TestChromadb(unittest.TestCase): method test_normal (line 10) | def test_normal(self): FILE: tests/unit_tests/manager/test_dynamo_storage.py class TestDynamoCacheStorage (line 19) | class TestDynamoCacheStorage(unittest.TestCase): method setUp (line 23) | def setUp(self): method test_create_is_idempotent (line 44) | def test_create_is_idempotent(self): method test_creation_and_batch_insert (line 60) | def test_creation_and_batch_insert(self): method test_mark_deleted (line 126) | def test_mark_deleted(self): method test_clear_deleted_data (line 140) | def test_clear_deleted_data(self): method test_get_ids (line 163) | def test_get_ids(self): method test_count (line 189) | def test_count(self): method test_add_session (line 211) | def test_add_session(self): method test_list_sessions (line 240) | def test_list_sessions(self): method test_delete_session (line 273) | def test_delete_session(self): method test_get_data_by_id (line 292) | def test_get_data_by_id(self): method test_report_cache (line 341) | def test_report_cache(self): method _random_cachedata_without_dependencies (line 375) | def _random_cachedata_without_dependencies(self, session_id = None): method _random_cachedata_with_dependencies (line 384) | def _random_cachedata_with_dependencies(self, session_id = None): method _dynamo_resource (line 399) | def _dynamo_resource(self): FILE: tests/unit_tests/manager/test_eviction.py function mock_embeddings (line 12) | def mock_embeddings(): class TestEviction (line 16) | class TestEviction(unittest.TestCase): method test_eviction_lru (line 19) | def test_eviction_lru(self): method test_eviction_fifo (line 36) | def test_eviction_fifo(self): FILE: tests/unit_tests/manager/test_factory.py class TestFactory (line 13) | class TestFactory(unittest.TestCase): method test_normal (line 14) | def test_normal(self): method test_manager (line 37) | def test_manager(self): method test_manager_factory (line 75) | def test_manager_factory(self): method test_multi_level_directory (line 107) | def test_multi_level_directory(self): FILE: tests/unit_tests/manager/test_local_index.py class TestLocalIndex (line 20) | class TestLocalIndex(unittest.TestCase): method test_faiss (line 21) | def test_faiss(self): method test_hnswlib (line 34) | def test_hnswlib(self): method test_docarray (line 51) | def test_docarray(self): method _internal_test_normal (line 63) | def _internal_test_normal(self, vector_class): method _internal_test_with_rebuild (line 77) | def _internal_test_with_rebuild(self, vector_class): method _internal_test_reload (line 89) | def _internal_test_reload(self, vector_class): method _internal_test_delete (line 108) | def _internal_test_delete(self, vector_class): method _internal_test_create_from_vector_base (line 122) | def _internal_test_create_from_vector_base(self, **kwargs): FILE: tests/unit_tests/manager/test_map.py function test_map (line 8) | def test_map(): FILE: tests/unit_tests/manager/test_milvusdb.py class TestMilvusDB (line 9) | class TestMilvusDB(unittest.TestCase): method test_normal (line 10) | def test_normal(self): FILE: tests/unit_tests/manager/test_mongo.py function test_mongo (line 13) | def test_mongo(): function _clear_test_db (line 30) | def _clear_test_db(dbname): function _inner_test_normal (line 36) | def _inner_test_normal(dbname: str): function _inner_test_with_deps (line 72) | def _inner_test_with_deps(dbname: str): function _test_create_on (line 110) | def _test_create_on(dbname): function _test_session (line 137) | def _test_session(dbname): FILE: tests/unit_tests/manager/test_object_storage.py class TestLocal (line 14) | class TestLocal(unittest.TestCase): method test_normal (line 15) | def test_normal(self): class TestS3 (line 27) | class TestS3(unittest.TestCase): method test_normal (line 28) | def test_normal(self): class TestBase (line 44) | class TestBase(unittest.TestCase): method test_local (line 45) | def test_local(self): method test_s3 (line 56) | def test_s3(self): FILE: tests/unit_tests/manager/test_pgvector.py class TestPgvector (line 10) | class TestPgvector(unittest.TestCase): method test_normal (line 11) | def test_normal(self): FILE: tests/unit_tests/manager/test_qdrant.py class TestQdrant (line 10) | class TestQdrant(unittest.TestCase): method test_normal (line 11) | def test_normal(self): FILE: tests/unit_tests/manager/test_redis.py function test_redis_vector_store (line 8) | def test_redis_vector_store(): FILE: tests/unit_tests/manager/test_redis_cache_storage.py class TestRedisStorage (line 14) | class TestRedisStorage(unittest.TestCase): method setUp (line 20) | def setUp(cls) -> None: method _clear_test_db (line 24) | def _clear_test_db(): method test_normal (line 30) | def test_normal(self): method test_with_deps (line 67) | def test_with_deps(self): method test_create_on (line 107) | def test_create_on(self): method test_session (line 134) | def test_session(self): method test_cache_configuration (line 159) | def test_cache_configuration(self): FILE: tests/unit_tests/manager/test_sql_scalar.py class TestSQLStore (line 13) | class TestSQLStore(unittest.TestCase): method test_sqlite (line 14) | def test_sqlite(self): method test_duckdb (line 18) | def test_duckdb(self): method _inner_test_normal (line 23) | def _inner_test_normal(self, db_name: str): method _inner_test_with_deps (line 68) | def _inner_test_with_deps(self, db_name: str): method test_create_on (line 110) | def test_create_on(self): FILE: tests/unit_tests/manager/test_usearch.py class TestUSearchDB (line 9) | class TestUSearchDB(unittest.TestCase): method test_normal (line 10) | def test_normal(self): FILE: tests/unit_tests/processor/test_concat_context.py function test_concat_context_process (line 4) | def test_concat_context_process(): FILE: tests/unit_tests/processor/test_context.py class CITestContextProcess (line 13) | class CITestContextProcess(ContextProcess): method __init__ (line 14) | def __init__(self): method format_all_content (line 17) | def format_all_content(self, data: Dict[str, Any], **params: Dict[str,... method process_all_content (line 20) | def process_all_content(self) -> (Any, Any): function test_context_process (line 26) | def test_context_process(): FILE: tests/unit_tests/processor/test_post.py function test_random_one (line 5) | def test_random_one(): function test_first (line 10) | def test_first(): function test_nop (line 15) | def test_nop(): function test_temperature_softmax (line 21) | def test_temperature_softmax(): function test_llm_verifier (line 32) | def test_llm_verifier(): FILE: tests/unit_tests/processor/test_pre.py function test_last_content (line 12) | def test_last_content(): function test_last_content_without_prompt (line 18) | def test_last_content_without_prompt(): function test_all_content (line 35) | def test_all_content(): function test_nop (line 41) | def test_nop(): function test_get_prompt (line 46) | def test_get_prompt(): function test_get_openai_moderation_input (line 51) | def test_get_openai_moderation_input(): function test_get_messages_last_content (line 56) | def test_get_messages_last_content(): function test_concat_all_queries (line 60) | def test_concat_all_queries(): FILE: tests/unit_tests/processor/test_selective_context.py function test_selective_context_process (line 5) | def test_selective_context_process(): FILE: tests/unit_tests/processor/test_summarize_context.py function test_summarization_context_process (line 6) | def test_summarization_context_process(): FILE: tests/unit_tests/similarity_evaluation/test_cohere_rerank.py function test_cohere_rerank (line 12) | def test_cohere_rerank(): FILE: tests/unit_tests/similarity_evaluation/test_evaluation_kreciprocal.py function normalize (line 8) | def normalize(vec): function _test_evaluation (line 15) | def _test_evaluation(evaluation): function test_kreciprocal (line 32) | def test_kreciprocal(): function test_get_eval (line 36) | def test_get_eval(): FILE: tests/unit_tests/similarity_evaluation/test_evaluation_onnx.py function _test_evaluation (line 7) | def _test_evaluation(evaluation): function test_onnx (line 27) | def test_onnx(): function test_get_eval (line 32) | def test_get_eval(): FILE: tests/unit_tests/similarity_evaluation/test_evaluation_sbert.py function _test_evaluation (line 7) | def _test_evaluation(evaluation): function test_sbert (line 26) | def test_sbert(): function test_get_eval (line 31) | def test_get_eval(): FILE: tests/unit_tests/similarity_evaluation/test_evaluation_sequence.py function normalize (line 8) | def normalize(vec): function _test_evaluation (line 13) | def _test_evaluation(evaluation): function test_sequence_match (line 31) | def test_sequence_match(): function test_get_eval (line 37) | def test_get_eval(): function test_reweigth (line 49) | def test_reweigth(): FILE: tests/unit_tests/similarity_evaluation/test_evaluation_string.py function _test_evaluation (line 6) | def _test_evaluation(evaluation): function test_exact_match_evaluation (line 18) | def test_exact_match_evaluation(): function test_get_eval (line 23) | def test_get_eval(): FILE: tests/unit_tests/similarity_evaluation/test_evalution_time.py function test_evaluation_time (line 7) | def test_evaluation_time(): FILE: tests/unit_tests/similarity_evaluation/test_np.py function _test_evaluation (line 12) | def _test_evaluation(evaluation): function test_norm (line 44) | def test_norm(): function test_get_eval (line 49) | def test_get_eval(): FILE: tests/unit_tests/similarity_evaluation/test_simple.py function _test_evaluation_default (line 7) | def _test_evaluation_default(evaluation): function _test_evaluation_config (line 19) | def _test_evaluation_config(evaluation): function test_search_distance_evaluation (line 30) | def test_search_distance_evaluation(): function test_get_eval (line 38) | def test_get_eval(): FILE: tests/unit_tests/test_client.py function test_client (line 9) | def test_client(): FILE: tests/unit_tests/test_core.py function test_time_cal (line 9) | def test_time_cal(): function test_cache_all (line 41) | def test_cache_all(): function test_report (line 45) | def test_report(): FILE: tests/unit_tests/test_session.py function check_hit (line 15) | def check_hit(cur_session_id, cache_session_ids, cache_questions, cache_... class TestSession (line 21) | class TestSession(unittest.TestCase): method test_with (line 27) | def test_with(self): method test_map (line 48) | def test_map(self): method test_ssd (line 83) | def test_ssd(self): FILE: tests/unit_tests/utils/test_error.py function test_error_type (line 9) | def test_error_type(): function test_wrap (line 20) | def test_wrap(): FILE: tests/unit_tests/utils/test_log.py function test_error_type (line 4) | def test_error_type(): FILE: tests/unit_tests/utils/test_response.py function test_get_message_from_openai_answer (line 7) | def test_get_message_from_openai_answer(): function test_get_stream_message_from_openai_answer (line 31) | def test_get_stream_message_from_openai_answer():