Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/GuDaStudio/GrokSearch
/ functions
Functions
97 in github.com/GuDaStudio/GrokSearch
⨍
Functions
97
◇
Types & classes
16
↳
Endpoints
12
↓ 57 callers
Method
get
(self, session_id: str)
src/grok_search/sources.py:45
↓ 9 callers
Function
log_info
(ctx, message: str, is_debug: bool = False)
src/grok_search/logger.py:26
↓ 6 callers
Method
process_phase
( self, phase: str, thought: str, session_id: str = "", is_revision: b
src/grok_search/planning.py:129
↓ 5 callers
Function
_split_csv
(value: str)
src/grok_search/planning.py:89
↓ 5 callers
Method
get_session
(self, session_id: str)
src/grok_search/planning.py:126
↓ 4 callers
Method
_execute_stream_with_retry
执行带重试机制的流式 HTTP 请求
src/grok_search/providers/grok.py:215
↓ 4 callers
Function
_extract_sources_from_text
(text: str)
src/grok_search/sources.py:316
↓ 3 callers
Method
_mask_api_key
脱敏显示 API Key,只显示前后各 4 个字符
src/grok_search/config.py:164
↓ 3 callers
Function
_normalize_sources
(data: Any)
src/grok_search/sources.py:266
↓ 3 callers
Method
set
(self, session_id: str, sources: list[dict])
src/grok_search/sources.py:38
↓ 2 callers
Method
_apply_model_suffix
(self, model: str)
src/grok_search/config.py:135
↓ 2 callers
Method
_load_config_file
(self)
src/grok_search/config.py:34
↓ 2 callers
Function
extract_unique_urls
从文本中提取所有唯一 URL,按首次出现顺序排列
src/grok_search/utils.py:8
↓ 2 callers
Method
required_phases
(self)
src/grok_search/planning.py:110
↓ 2 callers
Method
search
(self, query: str, max_results: int = 5)
src/grok_search/providers/base.py:36
↓ 1 callers
Function
_call_firecrawl_scrape
(url: str, ctx=None)
src/grok_search/server.py:308
↓ 1 callers
Function
_call_firecrawl_search
(query: str, limit: int = 14)
src/grok_search/server.py:286
↓ 1 callers
Function
_call_tavily_extract
(url: str)
src/grok_search/server.py:236
↓ 1 callers
Function
_call_tavily_map
(url: str, instructions: str = None, max_depth: int = 1, max_breadth: int = 20, lim
src/grok_search/server.py:380
↓ 1 callers
Function
_call_tavily_search
(query: str, max_results: int = 6)
src/grok_search/server.py:258
↓ 1 callers
Function
_extra_results_to_sources
( tavily_results: list[dict] | None, firecrawl_results: list[dict] | None, )
src/grok_search/server.py:74
↓ 1 callers
Function
_extract_balanced_call_at_end
(text: str, open_paren_idx: int)
src/grok_search/sources.py:116
↓ 1 callers
Function
_fetch_available_models
(api_url: str, api_key: str)
src/grok_search/server.py:36
↓ 1 callers
Function
_get_available_models_cached
(api_url: str, api_key: str)
src/grok_search/server.py:58
↓ 1 callers
Function
_is_link_only_line
(line: str)
src/grok_search/sources.py:229
↓ 1 callers
Method
_parse_retry_after
解析 Retry-After 头(支持秒数或 HTTP 日期格式)
src/grok_search/providers/grok.py:100
↓ 1 callers
Function
_parse_sources_payload
(payload: str)
src/grok_search/sources.py:240
↓ 1 callers
Method
_parse_streaming_response
(self, response, ctx=None)
src/grok_search/providers/grok.py:174
↓ 1 callers
Function
_safe_firecrawl
()
src/grok_search/server.py:180
↓ 1 callers
Function
_safe_grok
()
src/grok_search/server.py:167
↓ 1 callers
Function
_safe_tavily
()
src/grok_search/server.py:173
↓ 1 callers
Method
_save_config_file
(self, config_data: dict)
src/grok_search/config.py:43
↓ 1 callers
Function
_split_details_block_sources
(text: str)
src/grok_search/sources.py:207
↓ 1 callers
Function
_split_function_call_sources
(text: str)
src/grok_search/sources.py:94
↓ 1 callers
Function
_split_heading_sources
(text: str)
src/grok_search/sources.py:155
↓ 1 callers
Function
_split_tail_link_block
(text: str)
src/grok_search/sources.py:171
↓ 1 callers
Method
build_executable_plan
(self)
src/grok_search/planning.py:118
↓ 1 callers
Method
get_config_info
获取配置信息(API Key 已脱敏)
src/grok_search/config.py:170
↓ 1 callers
Function
get_local_time_info
获取本地时间信息,用于注入到搜索查询中
src/grok_search/providers/grok.py:15
↓ 1 callers
Method
is_complete
(self)
src/grok_search/planning.py:113
↓ 1 callers
Function
is_parent_alive
Windows 下检查进程是否存活
src/grok_search/server.py:861
↓ 1 callers
Function
main
()
src/grok_search/server.py:842
↓ 1 callers
Function
merge_sources
(*source_lists: list[dict])
src/grok_search/sources.py:54
↓ 1 callers
Function
new_session_id
()
src/grok_search/sources.py:28
↓ 1 callers
Method
set_model
(self, model: str)
src/grok_search/config.py:157
↓ 1 callers
Function
split_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
Method
completed_phases
(self)
src/grok_search/planning.py:107
Method
config_file
(self)
src/grok_search/config.py:23
Method
debug_enabled
(self)
src/grok_search/config.py:51
Method
describe_url
让 Grok 阅读单个 URL 并返回 title + extracts
src/grok_search/providers/grok.py:236
Method
fetch
(self, url: str, ctx=None)
src/grok_search/providers/grok.py:156
Method
firecrawl_api_key
(self)
src/grok_search/config.py:103
Method
firecrawl_api_url
(self)
src/grok_search/config.py:99
Function
format_extra_sources
(tavily_results: list[dict] | None, firecrawl_results: list[dict] | None)
src/grok_search/utils.py:20
Function
format_search_results
(results: List[SearchResult])
src/grok_search/utils.py:56
Function
get_config_info
()
src/grok_search/server.py:458
Method
get_provider_name
(self)
src/grok_search/providers/base.py:40
Method
get_provider_name
(self)
src/grok_search/providers/grok.py:125
Function
get_sources
( session_id: Annotated[str, "Session ID from previous web_search call."] )
src/grok_search/server.py:222
Method
grok_api_key
(self)
src/grok_search/config.py:77
Method
grok_api_url
(self)
src/grok_search/config.py:67
Method
grok_model
(self)
src/grok_search/config.py:145
Function
handle_shutdown
(signum, frame)
src/grok_search/server.py:849
Method
log_dir
(self)
src/grok_search/config.py:111
Method
log_level
(self)
src/grok_search/config.py:107
Function
monitor_parent
()
src/grok_search/server.py:874
Function
plan_complexity
( session_id: Annotated[str, "Session ID from plan_intent"], thought: Annotated[str, "Reasoning for co
src/grok_search/server.py:704
Function
plan_execution
( session_id: Annotated[str, "Session ID from plan_intent"], thought: Annotated[str, "Reasoning for ex
src/grok_search/server.py:821
Function
plan_intent
( thought: Annotated[str, "Reasoning for this phase"], core_question: Annotated[str, "Distilled core q
src/grok_search/server.py:670
Function
plan_search_term
( session_id: Annotated[str, "Session ID from plan_intent"], thought: Annotated[str, "Reasoning for th
src/grok_search/server.py:761
Function
plan_sub_query
( session_id: Annotated[str, "Session ID from plan_intent"], thought: Annotated[str, "Reasoning for th
src/grok_search/server.py:730
Function
plan_tool_mapping
( session_id: Annotated[str, "Session ID from plan_intent"], thought: Annotated[str, "Reasoning for th
src/grok_search/server.py:791
Method
rank_sources
让 Grok 按查询相关度对信源排序,返回排序后的序号列表
src/grok_search/providers/grok.py:259
Method
retry_max_attempts
(self)
src/grok_search/config.py:55
Method
retry_max_wait
(self)
src/grok_search/config.py:63
Method
retry_multiplier
(self)
src/grok_search/config.py:59
Method
search
(self, query: str, platform: str = "", min_results: int = 3, max_results: int = 10, ctx=None)
src/grok_search/providers/grok.py:128
Function
switch_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
Method
tavily_api_key
(self)
src/grok_search/config.py:95
Method
tavily_api_url
(self)
src/grok_search/config.py:91
Method
tavily_enabled
(self)
src/grok_search/config.py:87
Method
to_dict
(self)
src/grok_search/providers/base.py:20
Function
toggle_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
Function
web_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
Function
web_map
( url: Annotated[str, "Root URL to begin the mapping (e.g., 'https://docs.example.com')."], instructio
src/grok_search/server.py:428
Function
web_search
( query: Annotated[str, "Clear, self-contained natural-language search query."], platform: Annotated[s
src/grok_search/server.py:128