MCPcopy Create free account

hub / github.com/InternLM/HuixiangDou / functions

Functions808 in github.com/InternLM/HuixiangDou

↓ 209 callersMethodformat
Format the error code into a JSON result. Args: code (ErrorCode): Error code to be formatted. Returns: dict:
huixiangdou/services/helper.py:79
↓ 97 callersMethodinfo
(self)
web/service/qalib.py:90
↓ 69 callersMethoddebug
(self)
huixiangdou/frontend/wechat.py:459
↓ 50 callersMethodload
Load knowledge graph.
huixiangdou/services/kg.py:342
↓ 44 callersMethodget
Remove and return an item from the queue. If optional args block is true and timeout is None (the default), block if necessary until
web/proxy/test.py:55
↓ 27 callersMethodread
(self, filepath: str)
huixiangdou/primitive/file_operation.py:186
↓ 22 callersMethodpost
Post data to hook url.
huixiangdou/frontend/lark.py:50
↓ 17 callersMethodchat
(self, prompt: str, backend: str = 'default', system_
huixiangdou/services/llm.py:139
↓ 16 callersMethodbuild
(self, repodir: str)
huixiangdou/services/kg.py:94
↓ 16 callersMethodget
Remove and return an item from the queue. If optional args block is true and timeout is None (the default), block if necessary until
huixiangdou/services/helper.py:121
↓ 16 callersFunctionresolvePath
web/front-end/scripts/utils.ts:3
↓ 15 callersFunctionrequest
(api: string, options: any = {}, prefix = ApiPrefix)
web/front-end/src/utils/ajax.ts:104
↓ 14 callersFunctionlog
@param name: python file name @return: Logger
web/util/log.py:4
↓ 14 callersFunctionuseLocale
(propertyName: string)
web/front-end/src/hooks/useLocale.ts:5
↓ 13 callersMethodlog
Log a query. Args: key (str): The key associated with the query. value (str): The value or result associated with the
huixiangdou/services/helper.py:165
↓ 13 callersMethodpost
Wrap http post and error handling.
huixiangdou/frontend/wechat.py:468
↓ 13 callersFunctionstandard_error_response
(error: dict, data=None)
web/model/base.py:19
↓ 11 callersMethodchat
Generate a sync response from local LLM. Args: prompt (str): The prompt for inference. history (list): List of previo
huixiangdou/services/llm_server_hybrid.py:452
↓ 11 callersMethodgenerate
Processes user queries and generates appropriate responses. It involves several steps including checking for valid questions, extracti
huixiangdou/services/serial_pipeline.py:332
↓ 11 callersMethodget
Remove and return an item from the queue. If optional args block is true and timeout is None (the default), block if necessary until
huixiangdou/frontend/wechat.py:76
↓ 11 callersMethodwait
(self, silent=False)
huixiangdou/primitive/limitter.py:41
↓ 10 callersMethodembed_query
Embed input text or image as feature, output np.ndarray with np.float32
huixiangdou/primitive/embedder.py:91
↓ 8 callersMethodget
Executes a google search with cache. If the query already exists in the cache, returns the cached result. If an exception occurs duri
huixiangdou/services/web_search.py:293
↓ 7 callersMethodget_minute_slot
(self)
huixiangdou/primitive/limitter.py:12
↓ 7 callersMethodget_minute_slot
(self)
huixiangdou/primitive/limitter.py:70
↓ 7 callersMethodget_qalib_info
(cls, feature_store_id: str)
web/service/qalib.py:265
↓ 7 callersMethodput
Put item into the queue.
web/proxy/test.py:48
↓ 6 callersFunctionbuild_reply_text
(code, query: str, reply: str, refs: list, max_len:int=20)
huixiangdou/services/helper.py:328
↓ 6 callersMethodcreate_chunks
Create chunks from a list of texts.
huixiangdou/primitive/splitter.py:77
↓ 6 callersMethodcut
(self, start_index, end_index)
huixiangdou/services/web_search.py:64
↓ 6 callersMethoddescribe
Return the description of the error code.
huixiangdou/services/helper.py:74
↓ 6 callersMethodfetch_url
(self, query: str, target_link: str, brief: str = '')
huixiangdou/services/web_search.py:101
↓ 6 callersMethodgenerate
Processes user queries and generates appropriate responses. It involves several steps including checking for valid questions, extracti
web/proxy/web_worker.py:162
↓ 6 callersFunctionget_score
(relation: str, default=0)
unittest/service/test_llm_server_remote.py:15
↓ 6 callersMethodget_type
Get filetype depends on URI suffix.
huixiangdou/primitive/file_operation.py:81
↓ 6 callersFunctionload_secret
()
unittest/service/test_llm_server_remote.py:27
↓ 6 callersMethodpop
Drop database by id.
huixiangdou/services/retriever.py:344
↓ 6 callersMethodset_qalib_info
(cls, feature_store_id: str, info: QalibInfo)
web/service/qalib.py:277
↓ 6 callersMethodupdateTask
update task into redis. :param task: HxdTask :return: bool: True or False
web/mq/hxd_task.py:15
↓ 5 callersMethod__init__
Create a new TextSplitter. Args: chunk_size: Maximum size of chunks to return chunk_overlap: Overlap in characters be
huixiangdou/primitive/splitter.py:41
↓ 5 callersMethod_merge_splits
(self, splits: Iterable[str], separator: str)
huixiangdou/primitive/splitter.py:106
↓ 5 callersMethodauto_fix
Choose real backend according to config.ini.
sft/reconstruct_wechat_group.py:31
↓ 5 callersFunctiongetLang
()
web/front-end/src/utils/utils.ts:32
↓ 5 callersMethodmd5
(self, filepath: str)
huixiangdou/primitive/file_operation.py:118
↓ 5 callersMethodparse
(self, text:str)
huixiangdou/primitive/entity.py:48
↓ 5 callersMethodparse
(self, wx_msg: dict, bot_wxid: str, auth:str='', wkteam_ip_port:str='')
huixiangdou/frontend/wechat.py:157
↓ 5 callersMethodsearch
Performs a search operation in the selected repository based on the user's question. Args: llm_client: Client instance fo
huixiangdou/services/sg_search.py:122
↓ 4 callersFunctionbuild_messages
(prompt, history, system: str = None)
huixiangdou/services/llm_server_hybrid.py:43
↓ 4 callersMethodchat_stream
Generate a response from the appropriate LLM based on the configuration. If failed, use exponential backoff. Async generator. Args:
huixiangdou/services/llm_server_hybrid.py:349
↓ 4 callersFunctionempty_cache
()
huixiangdou/services/store.py:36
↓ 4 callersFunctionencode_string
(content: str, model_name: str = "gpt-4o")
huixiangdou/primitive/token.py:7
↓ 4 callersFunctionfeature_store_base_dir
()
huixiangdou/services/config.py:29
↓ 4 callersMethodgenerate_query_id
(self, content)
web/service/chat.py:115
↓ 4 callersMethodgetString
android/demo/src/main/java/com/carlos/grabredenvelope/demo/SharedPreferenceHelper.kt:25
↓ 4 callersFunctionget_store_dir
(feature_store_id: str)
web/service/qalib.py:32
↓ 4 callersMethodis_relative
Is input query relative with knowledge base. Return true or false, and the maxisum score
huixiangdou/services/retriever.py:260
↓ 4 callersMethodquery
Processes a query and returns the best match from the vector store database. If the question is rejected, returns None. Args:
huixiangdou/services/retriever.py:226
↓ 4 callersFunctionrefresh
()
web/front-end/src/pages/bean-detail/bean-detail.tsx:65
↓ 4 callersMethodretrieve
(self, query: str)
huixiangdou/services/kg.py:374
↓ 4 callersMethodscan_dir
(self, repo_dir: str)
huixiangdou/primitive/file_operation.py:145
↓ 4 callersFunctionscrollToBottom
()
web/front-end/src/pages/bean-detail/components/chat/chat.tsx:143
↓ 4 callersMethodsimilarity_search_with_query
Return chunks most similar to query. Args: query: Multimodal query. k: Number of Documents to return. Defaults to 30.
huixiangdou/primitive/faiss.py:72
↓ 4 callersMethodsingle_judge
Generates a score based on the prompt, and then compares it to threshold. Args: prompt (str): The prompt for the language
web/proxy/web_worker.py:133
↓ 4 callersMethodsplit_text
Split text into multiple components.
huixiangdou/primitive/splitter.py:74
↓ 3 callersFunctionafterSuccess
()
web/front-end/src/pages/bean-detail/components/toggle-search/toggle-search.tsx:29
↓ 3 callersMethodbuild
(self, texts: List[str], question:str)
huixiangdou/services/prompt.py:146
↓ 3 callersMethodbuild_dense
Extract the features required for the response pipeline based on the document.
huixiangdou/services/store.py:245
↓ 3 callersMethodbuild_index
(self, np_feature: np.ndarray, distance_strategy: DistanceStrategy)
huixiangdou/primitive/faiss.py:125
↓ 3 callersFunctioncheck_str_useful
(content: str)
huixiangdou/services/helper.py:244
↓ 3 callersFunctioncompose
(...args: any[])
web/front-end/src/utils/ajax.ts:7
↓ 3 callersMethodgenerate_response
Generate a response from the chat service. Args: prompt (str): The prompt to send to the chat service. history (list,
sft/reconstruct_wechat_group.py:53
↓ 3 callersMethodget_lark_encrypt_key
(cls)
web/config/env.py:61
↓ 3 callersFunctionget_lark_on_message_url
()
web/service/qalib.py:51
↓ 3 callersMethodget_lark_verification_token
(cls)
web/config/env.py:66
↓ 3 callersMethodget_query_info
(cls, query_id: str, feature_store_id: str)
web/service/cache.py:37
↓ 3 callersMethodget_top_n
(self, query: Union[List,str], n=5)
huixiangdou/primitive/bm250kapi.py:176
↓ 3 callersFunctionget_wechat_on_message_url
(suffix: str)
web/service/qalib.py:46
↓ 3 callersMethodinitialize
Initializes response and reject feature store. Only needs to be called once. Also calculates the optimal threshold based on provided
huixiangdou/services/store.py:400
↓ 3 callersFunctionis_revert_command
Is wx_msg a revert command.
huixiangdou/frontend/wechat.py:109
↓ 3 callersFunctionis_truth
Generate a score based on the prompt, and then compares it to threshold. Args: prompt (str): The prompt for the language model. t
huixiangdou/services/helper.py:336
↓ 3 callersMethodload
(self, filedir: str, tokenizer=None)
huixiangdou/primitive/bm250kapi.py:110
↓ 3 callersMethodpreprocess
Preprocesses files in a given directory. Copies each file to 'preprocess' with new name formed by joining all subdirectories with '_'.
huixiangdou/services/store.py:326
↓ 3 callersMethodsend_message
(self, groupId: str, text: str)
huixiangdou/frontend/wechat.py:712
↓ 3 callersFunctionshowErrorMessage
(text, ignore = false)
web/front-end/src/interceptors/response.ts:55
↓ 3 callersMethodwait_sync
(self, silent=False)
huixiangdou/primitive/limitter.py:18
↓ 2 callersMethod_get_lark_client
(cls, app_id: str, app_secret: str)
web/service/agent.py:193
↓ 2 callersMethod_join_chunks
(self, chunks: List[str], separator: str)
huixiangdou/primitive/splitter.py:97
↓ 2 callersMethod_set_cookie
(self, cookie_key, *jwt_payloads)
web/service/access.py:82
↓ 2 callersMethod_set_query_info
(cls, query_id: str, feature_store_id: str, info: ChatQueryInfo)
web/service/cache.py:68
↓ 2 callersMethod_sort
Rerank input texts, return descending indexes, indexes[0] is the nearest chunk.
huixiangdou/primitive/llm_reranker.py:123
↓ 2 callersFunction_split_text_with_regex
( text: str, separator: str, keep_separator: Union[bool, Literal['start', 'end']])
huixiangdou/primitive/splitter.py:146
↓ 2 callersMethod_store_image
(cls, client: lark.client, message_id: str, image_key: str, path: str)
web/service/agent.py:253
↓ 2 callersMethodauto_fix
Choose real backend according to config.ini.
huixiangdou/services/llm_client.py:64
↓ 2 callersMethodbuild_prompt
Build a prompt for interaction. Args: history_pair (list): List of previous interactions. instruction (str): Instruct
huixiangdou/services/llm.py:294
↓ 2 callersMethodchat_by_agent
(self, body: ChatRequestBody, t: ChatType, c
web/service/chat.py:79
↓ 2 callersMethodchat_stream
(self, prompt: str, backend: str = 'default',
huixiangdou/services/llm.py:216
↓ 2 callersMethodchat_stream
Generate a stream response from local LLM. Wrap transformer API to async generator Args: prompt (str): The prompt for inference.
huixiangdou/services/llm_server_hybrid.py:91
↓ 2 callersMethodchoose_model
(self, backend: Backend, token_size: int)
huixiangdou/services/llm.py:104
↓ 2 callersMethodclean
(self)
huixiangdou/primitive/entity.py:32
↓ 2 callersMethodcommand
Executes a shell command and returns its output. Args: txt (str): Command to be executed in the shell. Returns:
huixiangdou/services/sg_search.py:47
next →1–100 of 808, ranked by callers