Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/EternityJune25/ComoRAG
/ functions
Functions
257 in github.com/EternityJune25/ComoRAG
⨍
Functions
257
◇
Types & classes
38
Method
_save_clustering_results
Save clustering results
src/comorag/utils/cluster_utils.py:151
Method
add_content
Add new content and update hash values
src/comorag/utils/memory_utils.py:45
Method
add_node
Add node to memory pool
src/comorag/utils/memory_utils.py:85
Method
ainfer
Perform asynchronous inference using the LLM. Args: chat (List[TextChatMessage]): Input chat history for the LLM
src/comorag/llm/base.py:155
Function
all_values_of_same_length
Return True if all values in 'data' have the same length or data is an empty dict, otherwise return False.
src/comorag/utils/misc_utils.py:166
Method
batch_encode
(self, texts: List[str], **kwargs)
src/comorag/embedding_model/OpenAI.py:87
Method
batch_infer
(self, messages_list: List[List[TextChatMessage]], max_tokens=2048, json_template=None)
src/comorag/llm/vllm_offline.py:77
Method
batch_openie
Conduct batch OpenIE synchronously using vLLM offline batch mode, including NER and triple extraction Args: chunks (Dict
src/comorag/information_extraction/openie_vllm_offline.py:20
Method
batch_upsert_llm_config
Upsert self.llm_config with attribute-value pairs specified by a dict. Args: updates (Dict[str, Any]): a dict t
src/comorag/llm/base.py:140
Function
cache_response
(func)
src/comorag/llm/openai_gpt.py:26
Method
calculate_expected_summaries
Calculate expected total number of summaries, only calculate one level Args: total_chunks: Number of text chunks
src/comorag/utils/timeline_utils.py:420
Method
cleanup_temp_folders
()
src/comorag/ComoRAG.py:1113
Method
clear
Clear the entire cache.
src/comorag/embedding_model/base.py:257
Method
compute_f1
(gold: str, predicted: str)
script/eval_qa.py:90
Method
contains
Check if the embedding exists in cache.
src/comorag/embedding_model/base.py:251
Function
convert_text_chat_messages_to_strings
(messages: List[TextChatMessage], tokenizer: PreTrainedTokenizer, add_assistant_header=True)
src/comorag/llm/vllm_offline.py:11
Method
create_cluster_summary
Create summary for the specified cluster Args: cluster_id: Cluster ID summary_model: Model used for
src/comorag/utils/cluster_utils.py:545
Function
dynamic_retry_decorator
(func)
src/comorag/llm/openai_gpt.py:104
Method
encode_passages
Encode passages with the appropriate instruction prefix. Args: passages: Passage or list of passages to encode
src/comorag/embedding_model/BGEEmbedding.py:201
Method
encode_queries
Encode queries with the appropriate instruction prefix. Args: queries: Query or list of queries to encode
src/comorag/embedding_model/BGEEmbedding.py:187
Method
find_chunks_by_similarity
Find chunks based on text similarity and return their cluster information Args: query_text: Query text
src/comorag/utils/cluster_utils.py:505
Method
from_json
Create an LLMConfig instance from a JSON string.
src/comorag/llm/base.py:100
Method
from_json
Create an LLMConfig instance from a JSON string.
src/comorag/embedding_model/base.py:96
Method
get_all_nodes
Get all nodes
src/comorag/utils/memory_utils.py:124
Method
get_full_content
Get complete node content for generating embeddings
src/comorag/utils/memory_utils.py:61
Method
get_hash_ids_in_same_clusters
Get all chunks in the same clusters as the specified chunk and their association strength Args: hash_id: Target
src/comorag/utils/cluster_utils.py:491
Method
get_members_above_threshold
Get members with membership scores above threshold
src/comorag/utils/cluster_utils.py:33
Method
get_nodes_by_hash
Get nodes by hash value
src/comorag/utils/memory_utils.py:113
Method
get_query_doc_scores
(self, query_vec: np.ndarray, doc_vecs: np.ndarray)
src/comorag/embedding_model/base.py:212
Method
get_temp_nodes
Get all nodes from temporary memory pool
src/comorag/utils/memory_utils.py:109
Method
infer
(self, messages: List[TextChatMessage], max_tokens=2048)
src/comorag/llm/vllm_offline.py:62
Method
infer
( self, messages: List[TextChatMessage], **kwargs )
src/comorag/llm/openai_gpt.py:171
Method
is_template_name_valid
(self, name: str)
src/comorag/prompts/prompt_template_manager.py:197
Method
list_template_names
List all available template names. Returns: List[str]: A list of template names.
src/comorag/prompts/prompt_template_manager.py:142
Method
meta_control_loop
process single query
src/comorag/ComoRAG.py:265
Function
num_tokens_by_tiktoken
(text: str)
src/comorag/utils/llm_utils.py:325
Method
openie
(self, chunk_key: str, passage: str)
src/comorag/information_extraction/openie_openai.py:192
Method
print_template
Print the prompt template string or chat history structure for the given template name. Args: name (str): The name of th
src/comorag/prompts/prompt_template_manager.py:173
Method
process
(self, *args, **kwargs)
src/comorag/utils/agents.py:50
Method
process_content
(content_type, content)
src/comorag/utils/agents.py:90
Function
reason_step
Given few-shot samples, query, previous retrieved passages, and previous thoughts, generate the next thought with OpenAI models. The generated th
src/comorag/utils/qa_utils.py:34
Function
replace_placeholder
(match)
src/comorag/utils/llm_utils.py:52
Function
replace_unicode_escape
(match: re.Match)
src/comorag/utils/llm_utils.py:86
Function
safe_unicode_decode
Safely decodes a string or byte sequence containing Unicode escape sequences into a properly decoded Unicode string. Args: content (
src/comorag/utils/llm_utils.py:69
Function
save_results
保存结果到指定目录下的 results.json 文件
src/comorag/utils/misc_utils.py:197
Method
set
Store an embedding in the cache.
src/comorag/embedding_model/base.py:244
Function
string_to_bool
(v)
src/comorag/utils/misc_utils.py:185
Method
summarize
Generate text summary using GPT-4o-mini model :param context: Text that needs to be summarized :param max_tokens: Maximum nu
src/comorag/utils/summarization_utils.py:32
Method
sync_render
(self, name: str, **kwargs)
src/comorag/prompts/prompt_template_manager.py:139
Method
to_dict
(self)
src/comorag/utils/misc_utils.py:55
Method
to_dict
(self)
src/comorag/utils/misc_utils.py:81
Method
to_dict
Export the configuration as a JSON-serializable dictionary.
src/comorag/llm/base.py:84
Method
to_dict
Export the configuration as a JSON-serializable dictionary.
src/comorag/embedding_model/base.py:80
Method
to_json
Export the configuration as a JSON string.
src/comorag/llm/base.py:88
Method
to_json
Export the configuration as a JSON string.
src/comorag/embedding_model/base.py:84
Function
wrapper
(self, *args, **kwargs)
src/comorag/llm/openai_gpt.py:28
Function
wrapper
(**kwargs)
src/comorag/embedding_model/base.py:113
← previous
201–257 of 257, ranked by callers