Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KMnO4-zx/TinyRAG
/ functions
Functions
52 in github.com/KMnO4-zx/TinyRAG
⨍
Functions
52
◇
Types & classes
18
↓ 5 callers
Method
__init__
(self, path: str = 'BAAI/bge-base-zh-v1.5', is_api: bool = False)
RAG/Embeddings.py:125
↓ 5 callers
Method
__init__
(self, path: str = '')
RAG/LLM.py:34
↓ 3 callers
Method
chat
(self, prompt: str, history: List[dict], content: str)
RAG/LLM.py:37
↓ 2 callers
Method
get_embedding
(self, text: str)
RAG/Embeddings.py:129
↓ 2 callers
Method
load_vector
(self, path: str = 'storage')
RAG/VectorBase.py:39
↓ 2 callers
Method
query
(self, query: str, EmbeddingModel: BaseEmbeddings, k: int = 1)
RAG/VectorBase.py:48
↓ 1 callers
Method
cosine_similarity
calculate cosine similarity between two vectors
RAG/Embeddings.py:33
↓ 1 callers
Method
get_chunk
(cls, text: str, max_token_len: int = 600, cover_content: int = 150)
RAG/utils.py:62
↓ 1 callers
Method
get_content
(self, max_token_len: int = 600, cover_content: int = 150)
RAG/utils.py:51
↓ 1 callers
Method
get_files
(self)
RAG/utils.py:35
↓ 1 callers
Method
get_similarity
(self, vector1: List[float], vector2: List[float])
RAG/VectorBase.py:45
↓ 1 callers
Method
get_vector
(self, EmbeddingModel: BaseEmbeddings)
RAG/VectorBase.py:23
↓ 1 callers
Method
load_model
(self)
RAG/Embeddings.py:74
↓ 1 callers
Method
load_model
(self, path: str)
RAG/Embeddings.py:139
↓ 1 callers
Method
load_model
(self, path: str)
RAG/Reranker.py:46
↓ 1 callers
Method
load_model
(self)
RAG/LLM.py:73
↓ 1 callers
Method
persist
(self, path: str = 'storage')
RAG/VectorBase.py:30
↓ 1 callers
Method
read_file_content
(cls, file_path: str)
RAG/utils.py:109
↓ 1 callers
Method
read_markdown
(cls, file_path: str)
RAG/utils.py:131
↓ 1 callers
Method
read_pdf
(cls, file_path: str)
RAG/utils.py:121
↓ 1 callers
Method
read_text
(cls, file_path: str)
RAG/utils.py:144
↓ 1 callers
Method
rerank
(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
Method
chat
(self, prompt: str, history: List[dict], content: str)
RAG/LLM.py:48
Method
chat
(self, prompt: str, history: List = [], content: str='')
RAG/LLM.py:67
Method
chat
(self, prompt: str, history: List[Dict], content: str)
RAG/LLM.py:84
Method
chat
(self, prompt: str, history: List[Dict], content: str)
RAG/LLM.py:105
Method
chat
(self, prompt: str, history: List[dict], content: str)
RAG/LLM.py:120
Method
get_content
(self)
RAG/utils.py:157
Method
get_embedding
(self, text: str, model: str)
RAG/Embeddings.py:29
Method
get_embedding
(self, text: str, model: str = "text-embedding-3-large")
RAG/Embeddings.py:56
Method
get_embedding
(self, text: str)
RAG/Embeddings.py:71
Method
get_embedding
(self, text: str)
RAG/Embeddings.py:94
Method
get_embedding
(self, text: str, model: str='text-embedding-v1')
RAG/Embeddings.py:112
Method
get_embedding
(self, text: str, model: str = "BAAI/bge-m3")
RAG/Embeddings.py:165
Method
load_model
(self)
RAG/LLM.py:40
Method
rerank
(self, text: str, content: List[str], k: int)
RAG/Reranker.py:23