Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bojieli/ai-agent-book
/ functions
Functions
13,003 in github.com/bojieli/ai-agent-book
⨍
Functions
13,003
◇
Types & classes
1,574
↳
Endpoints
161
↓ 1 callers
Method
_get_main_branch
Get main branch name
chapter5/coding-agent/agent_new.py:79
↓ 1 callers
Method
_get_memory_context
Get current memory context as a string
chapter3/user-memory/conversational_agent.py:163
↓ 1 callers
Method
_get_mock_search_results
Get mock search results for testing without API key Args: query: Search query Returns:
chapter2/context-compression/web_tools.py:203
↓ 1 callers
Method
_get_model_output_with_retry
Get model output with retry logic for empty actions
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:895
↓ 1 callers
Method
_get_next_action
Execute LLM interaction with retry logic and handle callbacks
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:722
↓ 1 callers
Method
_get_num_layers
Get the number of transformer layers in the model
chapter2/attention_visualization/agent.py:213
↓ 1 callers
Function
_get_padded_size
Calculates the dimensions padded to the nearest multiple of macro_block_size.
chapter9/browser-use-rpa/browser-use/browser_use/browser/video_recorder.py:25
↓ 1 callers
Method
_get_page_info
Get comprehensive page information using a single CDP call. TODO: should we make this an event as well? Returns: PageInfo with all viewport,
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/dom_watchdog.py:462
↓ 1 callers
Method
_get_recent_commits
Get recent commits
chapter5/coding-agent/agent.py:114
↓ 1 callers
Method
_get_recent_commits
Get recent commits
chapter5/coding-agent/agent_new.py:100
↓ 1 callers
Method
_get_recent_events_str
Get the most recent events from the event bus as JSON. Args: limit: Maximum number of recent events to include Returns: JSON string of rec
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/dom_watchdog.py:49
↓ 1 callers
Method
_get_response
Get non-streaming response
chapter4/multimodal-agent/agent.py:1100
↓ 1 callers
Method
_get_sensitive_data_description
(self, current_page_url)
chapter9/browser-use-rpa/browser-use/browser_use/agent/message_manager/service.py:241
↓ 1 callers
Method
_get_session_id_for_element
Get the appropriate CDP session ID for an element based on its frame.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/default_action_watchdog.py:1420
↓ 1 callers
Function
_get_shell_configuration
Return the shell dialect and command for the current platform.
chapter5/coding-agent/tools/shell_session.py:26
↓ 1 callers
Method
_get_special_param_types
Get the expected types for special parameters from SpecialActionParameters
chapter9/browser-use-rpa/browser-use/browser_use/tools/registry/service.py:40
↓ 1 callers
Method
_get_system_hint
Get system hint content with current state
chapter6/agent-with-event-trigger/agent.py:546
↓ 1 callers
Method
_get_system_prompt
Get system prompt based on mode
chapter2/kv-cache/agent.py:472
↓ 1 callers
Method
_get_system_prompt
获取系统提示
chapter1/web-search-agent/agent.py:294
↓ 1 callers
Method
_get_system_prompt
Generate the system prompt
chapter3/agentic-rag-for-user-memory/agent.py:110
↓ 1 callers
Method
_get_system_prompt
Generate the system prompt
chapter3/contextual-retrieval/agent.py:73
↓ 1 callers
Method
_get_system_prompt
Generate the system prompt
chapter3/agentic-rag/agent.py:88
↓ 1 callers
Method
_get_system_prompt
Generate the system prompt
chapter3/contextual-retrieval-for-user-memory/agent.py:110
↓ 1 callers
Method
_get_system_state
Get current system state information
chapter6/agent-with-event-trigger/agent.py:433
↓ 1 callers
Method
_get_term_frequency_distribution
Get top N most frequent terms across all documents
chapter3/sparse-embedding/bm25_engine.py:218
↓ 1 callers
Method
_get_tools
Get tool definitions based on mode
chapter2/kv-cache/agent.py:493
↓ 1 callers
Method
_get_tools_description
Get tool descriptions for the model
chapter6/agent-with-event-trigger/agent.py:567
↓ 1 callers
Method
_get_tools_description
Get tool descriptions for the model
chapter2/system-hint/agent.py:322
↓ 1 callers
Method
_get_tools_description
Get tool descriptions for the model
chapter1/context/agent.py:455
↓ 1 callers
Method
_get_tools_description
Get tool descriptions for the model
chapter3/user-memory/agent.py:326
↓ 1 callers
Method
_get_usage
(self, response: 'LangChainAIMessage')
chapter9/browser-use-rpa/browser-use/examples/models/langchain/chat.py:67
↓ 1 callers
Method
_get_usage
(self, response: Message)
chapter9/browser-use-rpa/browser-use/browser_use/llm/anthropic/chat.py:113
↓ 1 callers
Method
_get_usage
(self, response: types.GenerateContentResponse)
chapter9/browser-use-rpa/browser-use/browser_use/llm/google/chat.py:133
↓ 1 callers
Method
_get_usage
(self, response: ChatCompletion)
chapter9/browser-use-rpa/browser-use/browser_use/llm/openai/chat.py:116
↓ 1 callers
Method
_get_usage
Extract usage information from the response.
chapter9/browser-use-rpa/browser-use/browser_use/llm/aws/chat_anthropic.py:134
↓ 1 callers
Method
_get_usage
Extract usage information from the response.
chapter9/browser-use-rpa/browser-use/browser_use/llm/aws/chat_bedrock.py:144
↓ 1 callers
Method
_get_usage
Extract usage information from the OpenRouter response.
chapter9/browser-use-rpa/browser-use/browser_use/llm/openrouter/chat.py:97
↓ 1 callers
Method
_get_user_profile_message
Get user profile message for dynamic profile mode
chapter2/kv-cache/agent.py:503
↓ 1 callers
Method
_get_viewport_ratio
Get viewport dimensions, device pixel ratio, and scroll position using CDP.
chapter9/browser-use-rpa/browser-use/browser_use/dom/service.py:138
↓ 1 callers
Function
_git
(args: List[str])
chapter1/image-gen-workflow/evidence.py:63
↓ 1 callers
Function
_git_commit
(root: Path)
chapter8/cot-distillation/train_student.py:102
↓ 1 callers
Function
_git_head
(root: Path)
chapter10/autonomous-phone-registration/run_acceptance.py:122
↓ 1 callers
Function
_git_log
(command: list[str])
scripts/site_source_paths.py:102
↓ 1 callers
Function
_git_revision
()
chapter9/trajectory-verifier/run_experiment_9_1.py:25
↓ 1 callers
Function
_github
(name: str, query: str, options: dict[str, Any])
chapter4/perception-tools/src/expanded_catalog.py:506
↓ 1 callers
Method
_go_back
Go back in browser history.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:852
↓ 1 callers
Function
_gold_rank
返回 gold 在排序结果中的名次(1-based);未找到返回 0。
chapter3/contextual-retrieval-for-user-memory/contextual_compare.py:88
↓ 1 callers
Method
_grounding
(self, trajectory: Dict[str, Any])
chapter9/trajectory-verifier/verifier.py:251
↓ 1 callers
Function
_guidelines_for
(task_name: str)
chapter7/android-world/run_controlled_experiment.py:1049
↓ 1 callers
Method
_handle_cdp_download
Handle a CDP Page.downloadWillBegin event.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/downloads_watchdog.py:302
↓ 1 callers
Method
_handle_classify_response
(self, res: Message, decode_map: dict[str, int])
chapter2/prompt-engineering/tau_bench/model_utils/model/chat.py:334
↓ 1 callers
Method
_handle_classify_response
(self, res: dict[str, int], decode_map: dict[str, int])
chapter2/prompt-engineering/tau_bench/model_utils/model/completion.py:262
↓ 1 callers
Function
_handle_data_message
(runtime: CallRuntime, raw: Any)
chapter6/phone-agent/webrtc_app.py:556
↓ 1 callers
Method
_handle_delete_cascades
Handle CASCADE and NULLIFY for child objects.
chapter5/permission-embedded-data-objects/pedo/core/store.py:479
↓ 1 callers
Method
_handle_interrupt
(self, ev: Event)
chapter6/async-agent/runtime.py:229
↓ 1 callers
Method
_handle_parse_force_response
( self, res: Message, typ: type[T] | dict[str, Any] )
chapter2/prompt-engineering/tau_bench/model_utils/model/chat.py:380
↓ 1 callers
Method
_handle_parse_force_response
(self, res: dict[str, Any], typ: type[T])
chapter2/prompt-engineering/tau_bench/model_utils/model/completion.py:306
↓ 1 callers
Method
_handle_post_llm_processing
Handle callbacks and conversation saving after LLM interaction
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:931
↓ 1 callers
Method
_handle_score_response
( self, res: Message, min: int, max: int, )
chapter2/prompt-engineering/tau_bench/model_utils/model/chat.py:406
↓ 1 callers
Method
_handle_score_response
( self, res: dict[str, Any], min: int, max: int, )
chapter2/prompt-engineering/tau_bench/model_utils/model/completion.py:326
↓ 1 callers
Method
_handle_step_error
Handle all types of errors that can occur during a step
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:798
↓ 1 callers
Method
_handle_tool_calls
Handle actual tool execution (simulated for demo).
chapter4/active-tool-selection/agent.py:214
↓ 1 callers
Method
_handle_tool_calls
Handle tool execution (simulated).
chapter4/active-tool-selection/agent.py:362
↓ 1 callers
Method
_handle_tool_calls
Handle tool execution (simulated).
chapter4/active-tool-selection/agent.py:494
↓ 1 callers
Method
_handle_tool_request
Handle tool request from agent. Args: tool_request: Parsed tool request with 'server' and 'tool' fields
chapter4/active-tool-selection/agent.py:167
↓ 1 callers
Method
_handle_windowed_compression
Apply windowed compression strategy to message history Only compresses when context usage exceeds 80% threshold Args
chapter2/context-compression/agent.py:251
↓ 1 callers
Function
_has_api_key
()
chapter4/active-tool-selection/demo_comparison.py:469
↓ 1 callers
Method
_has_whisper
(python: str)
chapter10/autonomous-phone-registration/webrtc_channel.py:410
↓ 1 callers
Function
_hash_file
(path: Path)
chapter6/async-agent/tasks.py:69
↓ 1 callers
Method
_have_cookies_changed
Check if cookies have changed since last save.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/storage_state_watchdog.py:141
↓ 1 callers
Function
_header
(title: str)
chapter4/perception-tools/cli.py:331
↓ 1 callers
Function
_heuristic_review
确定性启发式(非 Vision LLM):按每页正文字符数判定 overcrowded。
chapter5/paper-to-ppt/demo.py:257
↓ 1 callers
Function
_history_chain_valid
(record: dict[str, Any])
chapter4/active-tool-discovery/run_exact_experiment.py:851
↓ 1 callers
Function
_history_is_preserved
(messages: list[Any], history: list[dict[str, Any]])
chapter5/agent-creator/validator.py:222
↓ 1 callers
Function
_hit_rate
(m: Dict[str, Any])
chapter2/kv-cache/main.py:76
↓ 1 callers
Function
_hitl_dispatch
(args)
chapter4/collaboration-tools/main.py:134
↓ 1 callers
Function
_html
(version: int)
chapter9/browser-use-rpa/local_mail_sandbox.py:66
↓ 1 callers
Method
_html_to_text
Simple HTML to text conversion
chapter9/browser-use-rpa/browser-use/examples/integrations/agentmail/email_tools.py:50
↓ 1 callers
Function
_i
(desc: str)
chapter4/active-tool-discovery/tools_library.py:45
↓ 1 callers
Function
_import_config_with
(value: str | None)
chapter1/search-codegen/test_config_and_usage.py:12
↓ 1 callers
Method
_index_chunks
Index chunks to the knowledge base
chapter3/contextual-retrieval/chunking.py:241
↓ 1 callers
Method
_index_chunks
Index chunks to the knowledge base
chapter3/agentic-rag/chunking.py:241
↓ 1 callers
Method
_index_chunks_to_pipeline
Index chunks to the retrieval pipeline
chapter3/contextual-retrieval/contextual_tools.py:186
↓ 1 callers
Method
_index_to_dify
Index to Dify knowledge base
chapter3/contextual-retrieval/chunking.py:287
↓ 1 callers
Method
_index_to_dify
Index to Dify knowledge base
chapter3/agentic-rag/chunking.py:287
↓ 1 callers
Method
_index_to_local
Index to local retrieval pipeline
chapter3/contextual-retrieval/chunking.py:250
↓ 1 callers
Method
_index_to_local
Index to local retrieval pipeline
chapter3/agentic-rag/chunking.py:250
↓ 1 callers
Method
_init_browser_session
Initialize browser session using config
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:506
↓ 1 callers
Method
_init_llm_client
Initialize the LLM client based on provider
chapter3/agentic-rag-for-user-memory/agent.py:94
↓ 1 callers
Method
_init_llm_client
Initialize LLM client for context generation
chapter3/contextual-retrieval/contextual_chunking.py:108
↓ 1 callers
Method
_init_llm_client
Initialize the LLM client based on provider
chapter3/agentic-rag/agent.py:72
↓ 1 callers
Method
_init_llm_client
Initialize LLM client for context generation
chapter3/contextual-retrieval-for-user-memory/contextual_chunking.py:148
↓ 1 callers
Method
_init_llm_client
Initialize the LLM client based on provider
chapter3/contextual-retrieval-for-user-memory/agent.py:94
↓ 1 callers
Method
_init_llm_client
Initialize the LLM client based on provider
chapter3/contextual-retrieval-for-user-memory/contextual_agent.py:108
↓ 1 callers
Method
_init_memory
Initialize Mem0 memory system.
chapter3/mem0/agent.py:143
↓ 1 callers
Method
_init_system_prompt
Initialize the system prompt with memory capabilities
chapter3/memobase/agent.py:274
↓ 1 callers
Method
_init_vllm
Initialize vLLM backend
chapter2/local_llm_serving/main.py:76
↓ 1 callers
Method
_initialize_backend
Initialize the selected backend
chapter2/local_llm_serving/main.py:69
↓ 1 callers
Method
_initialize_loop_state
Initialize loop state attributes used for signal handling.
chapter9/browser-use-rpa/browser-use/browser_use/utils.py:97
↓ 1 callers
Method
_initialize_model
Initialize the BGE-M3 model.
chapter3/dense-embedding/embedding_service.py:34
← previous
next →
3,401–3,500 of 13,003, ranked by callers