Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/YangLing0818/buffer-of-thought-llm
/ functions
Functions
146 in github.com/YangLing0818/buffer-of-thought-llm
⨍
Functions
146
◇
Types & classes
17
↓ 11 callers
Method
upsert
(self, data: dict[str, T])
lightrag/base.py:77
↓ 8 callers
Method
get_by_id
(self, id: str)
lightrag/base.py:65
↓ 8 callers
Function
split_string_by_multi_markers
Split a string by multiple markers
lightrag/utils.py:141
↓ 7 callers
Function
clean_str
Clean an input string by removing HTML escapes, control characters, and other unwanted characters.
lightrag/utils.py:151
↓ 6 callers
Function
compute_args_hash
(*args)
lightrag/utils.py:66
↓ 6 callers
Function
list_of_list_to_csv
(data: list[list])
lightrag/utils.py:178
↓ 6 callers
Function
truncate_list_by_token_size
Truncate a list of data by token size
lightrag/utils.py:166
↓ 5 callers
Method
query
(self, query: str, param: QueryParam = QueryParam())
lightrag/lightrag.py:242
↓ 4 callers
Function
compute_mdhash_id
(content, prefix: str = "")
lightrag/utils.py:70
↓ 4 callers
Method
get_node
(self, node_id: str)
lightrag/base.py:98
↓ 4 callers
Method
get_respond
(self,meta_prompt,user_prompt)
bot_pipeline.py:28
↓ 3 callers
Function
encode_string_by_tiktoken
(content: str, model_name: str = "gpt-4o")
lightrag/utils.py:118
↓ 3 callers
Method
get_edge
( self, source_node_id: str, target_node_id: str )
lightrag/base.py:101
↓ 3 callers
Function
openai_complete_if_cache
( model, prompt, system_prompt=None, history_messages=[], base_url=None, api_key=None,
lightrag/llm.py:42
↓ 2 callers
Function
_build_global_query_context
( keywords, knowledge_graph_inst: BaseGraphStorage, entities_vdb: BaseVectorStorage, relations
lightrag/operate.py:713
↓ 2 callers
Function
_build_local_query_context
( query, knowledge_graph_inst: BaseGraphStorage, entities_vdb: BaseVectorStorage, text_chunks_
lightrag/operate.py:461
↓ 2 callers
Function
_handle_entity_relation_summary
( entity_or_relation_name: str, description: str, global_config: dict, )
lightrag/operate.py:50
↓ 2 callers
Function
always_get_an_event_loop
()
lightrag/lightrag.py:43
↓ 2 callers
Function
decode_tokens_by_tiktoken
(tokens: list[int], model_name: str = "gpt-4o")
lightrag/utils.py:126
↓ 2 callers
Method
edge_degree
(self, src_id: str, tgt_id: str)
lightrag/base.py:95
↓ 2 callers
Method
embedding_func
(self, texts: list[str])
meta_buffer.py:39
↓ 2 callers
Function
extract_and_execute_code
(text)
meta_buffer_utilis.py:46
↓ 2 callers
Function
extract_sections
(context)
lightrag/operate.py:970
↓ 2 callers
Method
filter_keys
return un-exist keys
lightrag/base.py:73
↓ 2 callers
Method
get_node_edges
( self, source_node_id: str )
lightrag/base.py:106
↓ 2 callers
Method
index_done_callback
(self)
lightrag/storage.py:29
↓ 2 callers
Method
insert
(self, string_or_strings)
lightrag/lightrag.py:160
↓ 2 callers
Function
limit_async_func_call
Add restriction of maximum async calling times for a async func
lightrag/utils.py:74
↓ 2 callers
Method
node_degree
(self, node_id: str)
lightrag/base.py:92
↓ 2 callers
Function
pack_user_ass_to_openai_messages
(*args: str)
lightrag/utils.py:134
↓ 2 callers
Method
problem_distillation
(self)
bot_pipeline.py:89
↓ 2 callers
Method
upsert_node
(self, node_id: str, node_data: dict[str, str])
lightrag/base.py:111
↓ 1 callers
Function
_find_most_related_edges_from_entities
( node_datas: list[dict], query_param: QueryParam, knowledge_graph_inst: BaseGraphStorage, )
lightrag/operate.py:604
↓ 1 callers
Function
_find_most_related_entities_from_relationships
( edge_datas: list[dict], query_param: QueryParam, knowledge_graph_inst: BaseGraphStorage, )
lightrag/operate.py:809
↓ 1 callers
Function
_find_most_related_text_unit_from_entities
( node_datas: list[dict], query_param: QueryParam, text_chunks_db: BaseKVStorage[TextChunkSchema],
lightrag/operate.py:543
↓ 1 callers
Function
_find_related_text_unit_from_relationships
( edge_datas: list[dict], query_param: QueryParam, text_chunks_db: BaseKVStorage[TextChunkSchema],
lightrag/operate.py:840
↓ 1 callers
Function
_handle_single_entity_extraction
( record_attributes: list[str], chunk_key: str, )
lightrag/operate.py:77
↓ 1 callers
Function
_handle_single_relationship_extraction
( record_attributes: list[str], chunk_key: str, )
lightrag/operate.py:98
↓ 1 callers
Method
_insert_done
(self)
lightrag/lightrag.py:226
↓ 1 callers
Function
_merge_edges_then_upsert
( src_id: str, tgt_id: str, edges_data: list[dict], knowledge_graph_inst: BaseGraphStorage,
lightrag/operate.py:171
↓ 1 callers
Function
_merge_nodes_then_upsert
( entity_name: str, nodes_data: list[dict], knowledge_graph_inst: BaseGraphStorage, global_con
lightrag/operate.py:124
↓ 1 callers
Method
_next_model
(self)
lightrag/llm.py:771
↓ 1 callers
Function
_process_single_content
(chunk_key_dp: tuple[str, TextChunkSchema])
lightrag/operate.py:264
↓ 1 callers
Method
_query_done
(self)
lightrag/lightrag.py:290
↓ 1 callers
Method
_stabilize_graph
Refer to https://github.com/microsoft/graphrag/index/graph/utils/stable_lcc.py Ensure an undirected graph with the same relationships will alw
lightrag/storage.py:149
↓ 1 callers
Method
ainsert
(self, string_or_strings)
lightrag/lightrag.py:164
↓ 1 callers
Method
aquery
(self, query: str, param: QueryParam = QueryParam())
lightrag/lightrag.py:246
↓ 1 callers
Function
azure_openai_complete_if_cache
( model, prompt, system_prompt=None, history_messages=[], base_url=None, api_key=None,
lightrag/llm.py:85
↓ 1 callers
Function
bedrock_complete_if_cache
( model, prompt, system_prompt=None, history_messages=[], aws_access_key_id=None, aws_
lightrag/llm.py:138
↓ 1 callers
Method
bot_inference
(self)
bot_pipeline.py:205
↓ 1 callers
Method
bot_run
(self)
bot_pipeline.py:199
↓ 1 callers
Method
buffer_instantiation
(self)
bot_pipeline.py:103
↓ 1 callers
Method
buffer_manager
(self)
bot_pipeline.py:111
↓ 1 callers
Method
buffer_retrieve
(self)
bot_pipeline.py:94
↓ 1 callers
Function
chunking_by_token_size
( content: str, overlap_token_size=128, max_token_size=1024, tiktoken_model="gpt-4o" )
lightrag/operate.py:29
↓ 1 callers
Function
combine_contexts
(high_level_context, low_level_context)
lightrag/operate.py:967
↓ 1 callers
Method
dynamic_update
(self,thought_template)
meta_buffer.py:52
↓ 1 callers
Function
extract_entities
( chunks: dict[str, TextChunkSchema], knowledge_graph_inst: BaseGraphStorage, entity_vdb: BaseVect
lightrag/operate.py:238
↓ 1 callers
Method
extract_similarity_decision
This function takes the input text of an example and extracts the final decision on whether the templates are similar or not (True or
meta_buffer.py:67
↓ 1 callers
Method
get_by_ids
( self, ids: list[str], fields: Union[set[str], None] = None )
lightrag/base.py:68
↓ 1 callers
Function
global_query
( query, knowledge_graph_inst: BaseGraphStorage, entities_vdb: BaseVectorStorage, relationship
lightrag/operate.py:638
↓ 1 callers
Function
gpt_4o_mini_complete
( prompt, system_prompt=None, history_messages=[], **kwargs )
lightrag/llm.py:468
↓ 1 callers
Method
has_edge
(self, source_node_id: str, target_node_id: str)
lightrag/base.py:89
↓ 1 callers
Method
has_node
(self, node_id: str)
lightrag/storage.py:198
↓ 1 callers
Method
has_node
(self, node_id: str)
lightrag/base.py:86
↓ 1 callers
Function
hf_model_if_cache
( model, prompt, system_prompt=None, history_messages=[], **kwargs )
lightrag/llm.py:232
↓ 1 callers
Function
hybrid_query
( query, knowledge_graph_inst: BaseGraphStorage, entities_vdb: BaseVectorStorage, relationship
lightrag/operate.py:877
↓ 1 callers
Function
initialize_hf_model
(model_name)
lightrag/llm.py:219
↓ 1 callers
Function
initialize_lmdeploy_pipeline
( model, tp=1, chat_template=None, log_level="WARNING", model_format="hf", quant_polic
lightrag/llm.py:328
↓ 1 callers
Function
is_float_regex
(value)
lightrag/utils.py:162
↓ 1 callers
Function
load_json
(file_name)
lightrag/utils.py:106
↓ 1 callers
Method
load_nx_graph
(file_name)
lightrag/storage.py:121
↓ 1 callers
Function
local_query
( query, knowledge_graph_inst: BaseGraphStorage, entities_vdb: BaseVectorStorage, relationship
lightrag/operate.py:390
↓ 1 callers
Function
locate_json_string_body_from_string
Locate the JSON string body from a string
lightrag/utils.py:46
↓ 1 callers
Function
main
()
lightrag/llm.py:794
↓ 1 callers
Function
naive_query
( query, chunks_vdb: BaseVectorStorage, text_chunks_db: BaseKVStorage[TextChunkSchema], query_
lightrag/operate.py:1038
↓ 1 callers
Function
ollama_model_if_cache
( model, prompt, system_prompt=None, history_messages=[], **kwargs )
lightrag/llm.py:297
↓ 1 callers
Function
openai_embedding
( texts: list[str], model: str = "text-embedding-3-small", base_url: str = None, api_key: str
lightrag/llm.py:536
↓ 1 callers
Method
reasoner_instantiation
(self)
bot_pipeline.py:139
↓ 1 callers
Method
retrieve_and_instantiate
(self,input)
meta_buffer.py:48
↓ 1 callers
Function
set_logger
(log_file: str)
lightrag/utils.py:21
↓ 1 callers
Method
thought_distillation
(self)
bot_pipeline.py:116
↓ 1 callers
Method
update_input
(self,new_input)
bot_pipeline.py:86
↓ 1 callers
Method
upsert
(self, data: dict[str, dict])
lightrag/storage.py:50
↓ 1 callers
Method
upsert_edge
( self, source_node_id: str, target_node_id: str, edge_data: dict[str, str] )
lightrag/base.py:114
↓ 1 callers
Function
write_json
(json_obj, file_name)
lightrag/utils.py:113
↓ 1 callers
Method
write_nx_graph
(graph: nx.Graph, file_name)
lightrag/storage.py:127
Method
__call__
(self, *args, **kwargs)
lightrag/utils.py:42
Method
__init__
(self,llm_model,embedding_model,api_key=None,base_url="https://api.openai.com/v1/",rag_dir='./test')
meta_buffer.py:8
Method
__init__
(self,model_id,api_key=None,base_url='https://api.openai.com/v1/')
bot_pipeline.py:12
Method
__init__
(self, user_input,problem_id=0,api_key=None,model_id='gpt-4o-mini',embedding_model='text-embedding-3-large',ne
bot_pipeline.py:72
Method
__init__
(self, models: List[Model])
lightrag/llm.py:767
Method
__post_init__
(self)
lightrag/storage.py:20
Method
__post_init__
(self)
lightrag/storage.py:63
Method
__post_init__
(self)
lightrag/storage.py:181
Method
__post_init__
(self)
lightrag/lightrag.py:103
Method
_get_edge_key
(source: Any, target: Any)
lightrag/storage.py:173
Method
_node2vec_embed
(self)
lightrag/storage.py:236
Method
_sort_source_target
(edge)
lightrag/storage.py:163
Method
all_keys
(self)
lightrag/storage.py:26
next →
1–100 of 146, ranked by callers