MCPcopy Create free account

hub / github.com/GuDaStudio/GrokSearch / functions

Functions97 in github.com/GuDaStudio/GrokSearch

↓ 57 callersMethodget
(self, session_id: str)
src/grok_search/sources.py:45
↓ 9 callersFunctionlog_info
(ctx, message: str, is_debug: bool = False)
src/grok_search/logger.py:26
↓ 6 callersMethodprocess_phase
( self, phase: str, thought: str, session_id: str = "", is_revision: b
src/grok_search/planning.py:129
↓ 5 callersFunction_split_csv
(value: str)
src/grok_search/planning.py:89
↓ 5 callersMethodget_session
(self, session_id: str)
src/grok_search/planning.py:126
↓ 4 callersMethod_execute_stream_with_retry
执行带重试机制的流式 HTTP 请求
src/grok_search/providers/grok.py:215
↓ 4 callersFunction_extract_sources_from_text
(text: str)
src/grok_search/sources.py:316
↓ 3 callersMethod_mask_api_key
脱敏显示 API Key,只显示前后各 4 个字符
src/grok_search/config.py:164
↓ 3 callersFunction_normalize_sources
(data: Any)
src/grok_search/sources.py:266
↓ 3 callersMethodset
(self, session_id: str, sources: list[dict])
src/grok_search/sources.py:38
↓ 2 callersMethod_apply_model_suffix
(self, model: str)
src/grok_search/config.py:135
↓ 2 callersMethod_load_config_file
(self)
src/grok_search/config.py:34
↓ 2 callersFunctionextract_unique_urls
从文本中提取所有唯一 URL,按首次出现顺序排列
src/grok_search/utils.py:8
↓ 2 callersMethodrequired_phases
(self)
src/grok_search/planning.py:110
↓ 2 callersMethodsearch
(self, query: str, max_results: int = 5)
src/grok_search/providers/base.py:36
↓ 1 callersFunction_call_firecrawl_scrape
(url: str, ctx=None)
src/grok_search/server.py:308
↓ 1 callersFunction_call_firecrawl_search
(query: str, limit: int = 14)
src/grok_search/server.py:286
↓ 1 callersFunction_call_tavily_extract
(url: str)
src/grok_search/server.py:236
↓ 1 callersFunction_call_tavily_map
(url: str, instructions: str = None, max_depth: int = 1, max_breadth: int = 20, lim
src/grok_search/server.py:380
↓ 1 callersFunction_call_tavily_search
(query: str, max_results: int = 6)
src/grok_search/server.py:258
↓ 1 callersFunction_extra_results_to_sources
( tavily_results: list[dict] | None, firecrawl_results: list[dict] | None, )
src/grok_search/server.py:74
↓ 1 callersFunction_extract_balanced_call_at_end
(text: str, open_paren_idx: int)
src/grok_search/sources.py:116
↓ 1 callersFunction_fetch_available_models
(api_url: str, api_key: str)
src/grok_search/server.py:36
↓ 1 callersFunction_get_available_models_cached
(api_url: str, api_key: str)
src/grok_search/server.py:58
↓ 1 callersFunction_is_link_only_line
(line: str)
src/grok_search/sources.py:229
↓ 1 callersMethod_parse_retry_after
解析 Retry-After 头(支持秒数或 HTTP 日期格式)
src/grok_search/providers/grok.py:100
↓ 1 callersFunction_parse_sources_payload
(payload: str)
src/grok_search/sources.py:240
↓ 1 callersMethod_parse_streaming_response
(self, response, ctx=None)
src/grok_search/providers/grok.py:174
↓ 1 callersFunction_safe_firecrawl
()
src/grok_search/server.py:180
↓ 1 callersFunction_safe_grok
()
src/grok_search/server.py:167
↓ 1 callersFunction_safe_tavily
()
src/grok_search/server.py:173
↓ 1 callersMethod_save_config_file
(self, config_data: dict)
src/grok_search/config.py:43
↓ 1 callersFunction_split_details_block_sources
(text: str)
src/grok_search/sources.py:207
↓ 1 callersFunction_split_function_call_sources
(text: str)
src/grok_search/sources.py:94
↓ 1 callersFunction_split_heading_sources
(text: str)
src/grok_search/sources.py:155
↓ 1 callersFunction_split_tail_link_block
(text: str)
src/grok_search/sources.py:171
↓ 1 callersMethodbuild_executable_plan
(self)
src/grok_search/planning.py:118
↓ 1 callersMethodget_config_info
获取配置信息(API Key 已脱敏)
src/grok_search/config.py:170
↓ 1 callersFunctionget_local_time_info
获取本地时间信息,用于注入到搜索查询中
src/grok_search/providers/grok.py:15
↓ 1 callersMethodis_complete
(self)
src/grok_search/planning.py:113
↓ 1 callersFunctionis_parent_alive
Windows 下检查进程是否存活
src/grok_search/server.py:861
↓ 1 callersFunctionmain
()
src/grok_search/server.py:842
↓ 1 callersFunctionmerge_sources
(*source_lists: list[dict])
src/grok_search/sources.py:54
↓ 1 callersFunctionnew_session_id
()
src/grok_search/sources.py:28
↓ 1 callersMethodset_model
(self, model: str)
src/grok_search/config.py:157
↓ 1 callersFunctionsplit_answer_and_sources
(text: str)
src/grok_search/sources.py:70
Method__call__
(self, retry_state)
src/grok_search/providers/grok.py:89
Method__init__
(self, max_size: int = 256)
src/grok_search/sources.py:33
Method__init__
(self, session_id: str)
src/grok_search/planning.py:101
Method__init__
(self)
src/grok_search/planning.py:123
Method__init__
( self, title: str, url: str, snippet: str, source: str = "",
src/grok_search/providers/base.py:6
Method__init__
(self, api_url: str, api_key: str)
src/grok_search/providers/base.py:31
Method__init__
(self, multiplier: float, max_wait: int)
src/grok_search/providers/grok.py:85
Method__init__
(self, api_url: str, api_key: str, model: str = "grok-4-fast")
src/grok_search/providers/grok.py:121
Method__new__
(cls)
src/grok_search/config.py:15
Function_is_retryable_exception
检查异常是否可重试
src/grok_search/providers/grok.py:73
Function_needs_time_context
检查查询是否需要时间上下文
src/grok_search/providers/grok.py:37
Methodcompleted_phases
(self)
src/grok_search/planning.py:107
Methodconfig_file
(self)
src/grok_search/config.py:23
Methoddebug_enabled
(self)
src/grok_search/config.py:51
Methoddescribe_url
让 Grok 阅读单个 URL 并返回 title + extracts
src/grok_search/providers/grok.py:236
Methodfetch
(self, url: str, ctx=None)
src/grok_search/providers/grok.py:156
Methodfirecrawl_api_key
(self)
src/grok_search/config.py:103
Methodfirecrawl_api_url
(self)
src/grok_search/config.py:99
Functionformat_extra_sources
(tavily_results: list[dict] | None, firecrawl_results: list[dict] | None)
src/grok_search/utils.py:20
Functionformat_search_results
(results: List[SearchResult])
src/grok_search/utils.py:56
Functionget_config_info
()
src/grok_search/server.py:458
Methodget_provider_name
(self)
src/grok_search/providers/base.py:40
Methodget_provider_name
(self)
src/grok_search/providers/grok.py:125
Functionget_sources
( session_id: Annotated[str, "Session ID from previous web_search call."] )
src/grok_search/server.py:222
Methodgrok_api_key
(self)
src/grok_search/config.py:77
Methodgrok_api_url
(self)
src/grok_search/config.py:67
Methodgrok_model
(self)
src/grok_search/config.py:145
Functionhandle_shutdown
(signum, frame)
src/grok_search/server.py:849
Methodlog_dir
(self)
src/grok_search/config.py:111
Methodlog_level
(self)
src/grok_search/config.py:107
Functionmonitor_parent
()
src/grok_search/server.py:874
Functionplan_complexity
( session_id: Annotated[str, "Session ID from plan_intent"], thought: Annotated[str, "Reasoning for co
src/grok_search/server.py:704
Functionplan_execution
( session_id: Annotated[str, "Session ID from plan_intent"], thought: Annotated[str, "Reasoning for ex
src/grok_search/server.py:821
Functionplan_intent
( thought: Annotated[str, "Reasoning for this phase"], core_question: Annotated[str, "Distilled core q
src/grok_search/server.py:670
Functionplan_search_term
( session_id: Annotated[str, "Session ID from plan_intent"], thought: Annotated[str, "Reasoning for th
src/grok_search/server.py:761
Functionplan_sub_query
( session_id: Annotated[str, "Session ID from plan_intent"], thought: Annotated[str, "Reasoning for th
src/grok_search/server.py:730
Functionplan_tool_mapping
( session_id: Annotated[str, "Session ID from plan_intent"], thought: Annotated[str, "Reasoning for th
src/grok_search/server.py:791
Methodrank_sources
让 Grok 按查询相关度对信源排序,返回排序后的序号列表
src/grok_search/providers/grok.py:259
Methodretry_max_attempts
(self)
src/grok_search/config.py:55
Methodretry_max_wait
(self)
src/grok_search/config.py:63
Methodretry_multiplier
(self)
src/grok_search/config.py:59
Methodsearch
(self, query: str, platform: str = "", min_results: int = 3, max_results: int = 10, ctx=None)
src/grok_search/providers/grok.py:128
Functionswitch_model
( model: Annotated[str, "Model ID to switch to (e.g., 'grok-4-fast', 'grok-2-latest', 'grok-vision-beta').
src/grok_search/server.py:556
Methodtavily_api_key
(self)
src/grok_search/config.py:95
Methodtavily_api_url
(self)
src/grok_search/config.py:91
Methodtavily_enabled
(self)
src/grok_search/config.py:87
Methodto_dict
(self)
src/grok_search/providers/base.py:20
Functiontoggle_builtin_tools
( action: Annotated[str, "Action to perform: 'on' (block built-in), 'off' (allow built-in), or 'status' (c
src/grok_search/server.py:608
Functionweb_fetch
( url: Annotated[str, "Valid HTTP/HTTPS web address pointing to the target page. Must be complete and acce
src/grok_search/server.py:357
Functionweb_map
( url: Annotated[str, "Root URL to begin the mapping (e.g., 'https://docs.example.com')."], instructio
src/grok_search/server.py:428
Functionweb_search
( query: Annotated[str, "Clear, self-contained natural-language search query."], platform: Annotated[s
src/grok_search/server.py:128