MCPcopy Create free account

hub / github.com/KMnO4-zx/TinyRAG / functions

Functions52 in github.com/KMnO4-zx/TinyRAG

↓ 5 callersMethod__init__
(self, path: str = 'BAAI/bge-base-zh-v1.5', is_api: bool = False)
RAG/Embeddings.py:125
↓ 5 callersMethod__init__
(self, path: str = '')
RAG/LLM.py:34
↓ 3 callersMethodchat
(self, prompt: str, history: List[dict], content: str)
RAG/LLM.py:37
↓ 2 callersMethodget_embedding
(self, text: str)
RAG/Embeddings.py:129
↓ 2 callersMethodload_vector
(self, path: str = 'storage')
RAG/VectorBase.py:39
↓ 2 callersMethodquery
(self, query: str, EmbeddingModel: BaseEmbeddings, k: int = 1)
RAG/VectorBase.py:48
↓ 1 callersMethodcosine_similarity
calculate cosine similarity between two vectors
RAG/Embeddings.py:33
↓ 1 callersMethodget_chunk
(cls, text: str, max_token_len: int = 600, cover_content: int = 150)
RAG/utils.py:62
↓ 1 callersMethodget_content
(self, max_token_len: int = 600, cover_content: int = 150)
RAG/utils.py:51
↓ 1 callersMethodget_files
(self)
RAG/utils.py:35
↓ 1 callersMethodget_similarity
(self, vector1: List[float], vector2: List[float])
RAG/VectorBase.py:45
↓ 1 callersMethodget_vector
(self, EmbeddingModel: BaseEmbeddings)
RAG/VectorBase.py:23
↓ 1 callersMethodload_model
(self)
RAG/Embeddings.py:74
↓ 1 callersMethodload_model
(self, path: str)
RAG/Embeddings.py:139
↓ 1 callersMethodload_model
(self, path: str)
RAG/Reranker.py:46
↓ 1 callersMethodload_model
(self)
RAG/LLM.py:73
↓ 1 callersMethodpersist
(self, path: str = 'storage')
RAG/VectorBase.py:30
↓ 1 callersMethodread_file_content
(cls, file_path: str)
RAG/utils.py:109
↓ 1 callersMethodread_markdown
(cls, file_path: str)
RAG/utils.py:131
↓ 1 callersMethodread_pdf
(cls, file_path: str)
RAG/utils.py:121
↓ 1 callersMethodread_text
(cls, file_path: str)
RAG/utils.py:144
↓ 1 callersMethodrerank
(self, text: str, content: List[str], k: int)
RAG/Reranker.py:36
Method__init__
(self, path: str, is_api: bool)
RAG/Embeddings.py:25
Method__init__
(self, path: str = '', is_api: bool = True)
RAG/Embeddings.py:48
Method__init__
(self, path: str = 'jinaai/jina-embeddings-v2-base-zh', is_api: bool = False)
RAG/Embeddings.py:67
Method__init__
(self, path: str = '', is_api: bool = True)
RAG/Embeddings.py:88
Method__init__
(self, path: str = '', is_api: bool = True)
RAG/Embeddings.py:105
Method__init__
(self, path: str = '', is_api: bool = True)
RAG/Embeddings.py:157
Method__init__
(self, path: str)
RAG/Reranker.py:20
Method__init__
(self, path: str = 'BAAI/bge-reranker-base')
RAG/Reranker.py:32
Method__init__
(self, path: str)
RAG/utils.py:31
Method__init__
(self, path: str = '')
RAG/utils.py:154
Method__init__
(self, document: List[str] = [''])
RAG/VectorBase.py:20
Method__init__
(self, path: str = '', model: str = "gpt-3.5-turbo-1106")
RAG/LLM.py:44
Method__init__
(self, path: str = '')
RAG/LLM.py:63
Method__init__
(self, path: str = '', model: str = "qwen-turbo")
RAG/LLM.py:80
Method__init__
(self, path: str = '', model: str = "glm-4")
RAG/LLM.py:99
Method__init__
(self, path: str = '', model: str = "Qwen/Qwen2.5-7B-Instruct")
RAG/LLM.py:116
Methodchat
(self, prompt: str, history: List[dict], content: str)
RAG/LLM.py:48
Methodchat
(self, prompt: str, history: List = [], content: str='')
RAG/LLM.py:67
Methodchat
(self, prompt: str, history: List[Dict], content: str)
RAG/LLM.py:84
Methodchat
(self, prompt: str, history: List[Dict], content: str)
RAG/LLM.py:105
Methodchat
(self, prompt: str, history: List[dict], content: str)
RAG/LLM.py:120
Methodget_content
(self)
RAG/utils.py:157
Methodget_embedding
(self, text: str, model: str)
RAG/Embeddings.py:29
Methodget_embedding
(self, text: str, model: str = "text-embedding-3-large")
RAG/Embeddings.py:56
Methodget_embedding
(self, text: str)
RAG/Embeddings.py:71
Methodget_embedding
(self, text: str)
RAG/Embeddings.py:94
Methodget_embedding
(self, text: str, model: str='text-embedding-v1')
RAG/Embeddings.py:112
Methodget_embedding
(self, text: str, model: str = "BAAI/bge-m3")
RAG/Embeddings.py:165
Methodload_model
(self)
RAG/LLM.py:40
Methodrerank
(self, text: str, content: List[str], k: int)
RAG/Reranker.py:23