MCPcopy Create free account

hub / github.com/bojieli/ai-agent-book / functions

Functions13,003 in github.com/bojieli/ai-agent-book

↓ 1 callersMethod_build
(self)
chapter3/agentic-rag-for-user-memory/indexer.py:61
↓ 1 callersMethod_build_attributes_string
Build the attributes string for an element.
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/serializer.py:891
↓ 1 callersMethod_build_bm25_indexes
Build BM25 indexes for both contextual and non-contextual chunks. Educational Note: BM25 uses TF-IDF with optimizati
chapter3/contextual-retrieval/contextual_tools.py:151
↓ 1 callersMethod_build_citation
Construct structured evidence citation tracking provenance for a node.
chapter3/structured-index/hybrid_retriever.py:361
↓ 1 callersMethod_build_command
Build vLLM server command with arguments
chapter2/local_llm_serving/server.py:27
↓ 1 callersMethod_build_context
Build a human-readable summary of the trajectory (legacy helper, kept for inspection/debugging only). NOTE: The message list
chapter1/context/agent.py:572
↓ 1 callersMethod_build_enhanced_ax_node
(self, ax_node: AXNode)
chapter9/browser-use-rpa/browser-use/browser_use/dom/service.py:110
↓ 1 callersMethod_build_evaluator
(self)
chapter3/user-memory-evaluation/comparison.py:59
↓ 1 callersMethod_build_full_conversation
Build full conversation text from chunks
chapter3/contextual-retrieval-for-user-memory/contextual_chunking.py:257
↓ 1 callersMethod_build_index
(self)
chapter3/agentic-rag/offline_retriever.py:111
↓ 1 callersMethod_build_input_tokens_display
Build a clear display of input tokens breakdown with emojis and optional costs
chapter9/browser-use-rpa/browser-use/browser_use/tokens/service.py:259
↓ 1 callersFunction_build_parser
()
chapter9/prompt-auto-optimization/demo.py:251
↓ 1 callersMethod_build_prompt
Build the full prompt for the LLM.
chapter1/learning-from-experience/llm_agent.py:195
↓ 1 callersMethod_build_server_index
Build TF-IDF index for servers.
chapter4/active-tool-selection/semantic_router.py:34
↓ 1 callersFunction_build_system_prompt
(role: Optional[str], task: str)
chapter4/collaboration-tools/src/subagent_tools.py:139
↓ 1 callersMethod_build_system_prompt
Build enhanced system prompt with memory cards
chapter3/contextual-retrieval-for-user-memory/contextual_agent.py:151
↓ 1 callersMethod_build_tool_indices
Build TF-IDF indices for tools within each server.
chapter4/active-tool-selection/semantic_router.py:45
↓ 1 callersFunction_byte_decoder
Inverse of the GPT-2 byte-to-Unicode alphabet used by byte-level BPE.
chapter2/attention_visualization/token_labels.py:6
↓ 1 callersMethod_cache_file
(self)
chapter4/active-tool-discovery/discovery.py:67
↓ 1 callersMethod_calculate_match_confidence
Calculate how well a workflow matches a task description. Args: task: Normalized task description wo
chapter9/browser-use-rpa/learning_agent/knowledge_base.py:198
↓ 1 callersMethod_calculate_statistics
Calculate statistics for educational purposes. Args: dense_results: Dense search results sparse_results: Spar
chapter3/retrieval-pipeline/retrieval_pipeline.py:322
↓ 1 callersFunction_calibration_cases
( rule: Dict[str, Any], golden_set: List[Dict[str, Any]] )
chapter9/ai-style-skill/judge.py:106
↓ 1 callersMethod_call_llm
Call the LLM with retry logic.
chapter3/user-memory-evaluation/evaluator.py:53
↓ 1 callersMethod_call_model
(self)
chapter10/multi-role-transfer/skill_orchestrator.py:189
↓ 1 callersFunction_call_pedo_func
Call a PEDO-condition function with appropriate args.
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/harness.py:734
↓ 1 callersFunction_call_raw_func
Call a raw-condition function with appropriate args.
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/harness.py:747
↓ 1 callersFunction_call_real_tool
Execute one model-selected capability through MCP and update dependencies.
chapter4/active-tool-discovery/run_exact_experiment.py:525
↓ 1 callersFunction_calls_of
(provider: str, response: dict)
chapter5/provider-failover/run_continuation.py:108
↓ 1 callersMethod_cancel_interruptible_tasks
Cancel current tasks that should be interruptible.
chapter9/browser-use-rpa/browser-use/browser_use/utils.py:251
↓ 1 callersFunction_canonical_hash
(value: Any)
chapter10/multi-role-transfer/run_comparison.py:53
↓ 1 callersMethod_capture_clean_screenshot
Capture a clean screenshot without JavaScript highlights.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/dom_watchdog.py:409
↓ 1 callersMethod_capture_step
Capture the current step for workflow learning.
chapter9/browser-use-rpa/learning_agent/agent.py:124
↓ 1 callersMethod_cdp_add_init_script
Add script to evaluate on new document using CDP Page.addScriptToEvaluateOnNewDocument.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1912
↓ 1 callersMethod_cdp_create_new_page
Create a new page/tab using CDP Target.createTarget. Returns target ID.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1841
↓ 1 callersMethod_cdp_get_origins
Get origins with localStorage and sessionStorage using CDP.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1956
↓ 1 callersMethod_cdp_get_storage_state
Get storage state (cookies, localStorage, sessionStorage) using CDP.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:2031
↓ 1 callersMethod_cdp_set_viewport
Set viewport using CDP Emulation.setDeviceMetricsOverride. Args: width: Viewport width height: Viewport height device_scale_factor: Device
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1929
↓ 1 callersFunction_char_w
(ch, mono=False)
book-en/svg_lib.py:106
↓ 1 callersFunction_char_w
(ch, mono=False)
book-tr/svg_lib.py:106
↓ 1 callersFunction_char_w
(ch, mono=False)
book-ru/svg_lib.py:106
↓ 1 callersFunction_char_w
(ch, mono=False)
book-es/svg_lib.py:106
↓ 1 callersFunction_char_w
(ch, mono=False)
book-mn/svg_lib.py:106
↓ 1 callersFunction_char_w
(ch, mono=False)
book-id/svg_lib.py:106
↓ 1 callersFunction_charges
(schema)
chapter3/structured-knowledge-extraction/extractor.py:35
↓ 1 callersMethod_chat
调用 Kimi API 进行对话 Args: messages: 消息列表 Returns: API 响应的 Choice 对象
chapter1/web-search-agent/agent.py:317
↓ 1 callersFunction_chat_json
(client, system, user)
chapter3/structured-knowledge-extraction/discovery.py:50
↓ 1 callersMethod_chat_stream
Yield content chunks from the active backend (Ollama or OpenRouter).
chapter3/log-sanitization/agent.py:93
↓ 1 callersFunction_chat_template_ids
Normalize Transformers 4.x/5.x chat-template return values. Transformers 4.x returned a bare list from ``apply_chat_template`` when ``tokeniz
chapter8/cot-distillation/train_student.py:63
↓ 1 callersFunction_chat_template_ids
Return one token-id list across Transformers 4.x and 5.x APIs.
chapter8/prompt-distillation/run_experiment_8_8.py:340
↓ 1 callersFunction_chat_with_retry
(client: OpenAI, messages, tools, model: str | None = None, retries: int = 3)
chapter5/small-model-codified-rules/agent.py:275
↓ 1 callersFunction_check
(page: SimulatedPage, predicate: StatePredicate)
chapter9/browser-use-rpa/workflow_validation_demo.py:30
↓ 1 callersFunction_check
Recursively validate that every node is on the whitelist.
chapter1/context/calc_sandbox.py:49
↓ 1 callersMethod_check_and_ensure_about_blank_tab
Check current tabs and ensure exactly one about:blank tab with animation exists.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/aboutblank_watchdog.py:89
↓ 1 callersMethod_check_browser_health
Check if browser and targets are still responsive.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/crash_watchdog.py:292
↓ 1 callersFunction_check_contract
(gate: Dict[str, Any])
chapter9/harness-safety-gate/evolution.py:381
↓ 1 callersFunction_check_event_names_dont_overlap
check that event names defined in this file are valid and non-overlapping (naiively n^2 so it's pretty slow but ok for now, optimize when >20 event
chapter9/browser-use-rpa/browser-use/browser_use/browser/events.py:557
↓ 1 callersMethod_check_lint_errors
Check for lint errors
chapter5/coding-agent/tools/multi_edit_tool.py:119
↓ 1 callersMethod_check_lint_errors
Check for lint errors after file modification
chapter5/coding-agent/tools/write_tool.py:54
↓ 1 callersMethod_check_lint_errors
Check for lint errors after file modification
chapter5/coding-agent/tools/edit_tool.py:85
↓ 1 callersMethod_check_network_headers_for_pdf
Infer PDF via navigation history/URL; headers are not available post-navigation in this context.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/downloads_watchdog.py:709
↓ 1 callersMethod_check_network_timeouts
Check for network requests exceeding timeout.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/crash_watchdog.py:250
↓ 1 callersFunction_check_nonempty
(errors: list[str], code: str, field: str, value: Any)
scripts/site_i18n.py:163
↓ 1 callersFunction_check_op
(node, allowed)
chapter1/context/calc_sandbox.py:44
↓ 1 callersMethod_check_parent_permissions
Walk up the hierarchy checking child permissions.
chapter5/permission-embedded-data-objects/pedo/core/store.py:426
↓ 1 callersMethod_check_predicates
(self, predicates, location: str)
chapter9/browser-use-rpa/learning_agent/replay.py:164
↓ 1 callersMethod_check_referential_integrity
Check that all referenced objects exist.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety.py:71
↓ 1 callersMethod_check_restrict_references
Check if any RESTRICT references prevent deletion.
chapter5/permission-embedded-data-objects/pedo/core/store.py:510
↓ 1 callersMethod_check_retrieval_pipeline
Check if the retrieval pipeline service is available. Returns True if reachable.
chapter3/agentic-rag-for-user-memory/indexer.py:159
↓ 1 callersMethod_check_retrieval_pipeline
Check if the retrieval pipeline service is available
chapter3/contextual-retrieval-for-user-memory/contextual_indexer.py:114
↓ 1 callersMethod_check_retrieval_pipeline
Check if the retrieval pipeline service is available
chapter3/contextual-retrieval-for-user-memory/indexer.py:70
↓ 1 callersMethod_check_salary_range
Check salary expectations are within position ranges.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety.py:111
↓ 1 callersFunction_check_single_use
确认 token 的一次性与绑定性:用后作废,第二次调用不得执行。
chapter9/harness-safety-gate/evolution.py:435
↓ 1 callersMethod_check_status_machine
Check that all candidate statuses are valid.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety.py:56
↓ 1 callersMethod_check_type_permission
Check type-level permissions for top-level creates.
chapter5/permission-embedded-data-objects/pedo/core/store.py:411
↓ 1 callersMethod_check_victory
Check if the player has won.
chapter1/learning-from-experience/game_environment.py:477
↓ 1 callersFunction_checkpoint_path
(output: str)
chapter5/small-model-codified-rules/demo.py:332
↓ 1 callersMethod_checkpoint_path
(self, test_id: str, mode: str)
chapter3/user-memory/run_evaluation.py:214
↓ 1 callersFunction_choose_paired_decision
( args: argparse.Namespace, arm_summary: dict[str, dict[str, Any]], pairs: list[dict[str, Any]], )
chapter7/android-world/run_controlled_experiment.py:1382
↓ 1 callersMethod_chunk_by_paragraphs
Chunk text respecting paragraph boundaries
chapter3/contextual-retrieval/contextual_chunking.py:190
↓ 1 callersMethod_chunk_by_paragraphs
Chunk text respecting paragraph boundaries
chapter3/contextual-retrieval/chunking.py:45
↓ 1 callersMethod_chunk_by_paragraphs
Chunk text respecting paragraph boundaries
chapter3/agentic-rag/chunking.py:45
↓ 1 callersMethod_chunk_by_size
Simple size-based chunking
chapter3/contextual-retrieval/contextual_chunking.py:248
↓ 1 callersMethod_chunk_by_size
Simple size-based chunking
chapter3/contextual-retrieval/chunking.py:106
↓ 1 callersMethod_chunk_by_size
Simple size-based chunking
chapter3/agentic-rag/chunking.py:106
↓ 1 callersMethod_chunk_fixed_rounds
Chunk conversation using fixed number of rounds Args: conversation_id: Conversation identifier test_
chapter3/agentic-rag-for-user-memory/chunker.py:167
↓ 1 callersMethod_chunk_fixed_rounds
Chunk conversation using fixed number of rounds Args: conversation_id: Conversation identifier test_
chapter3/contextual-retrieval-for-user-memory/chunker.py:167
↓ 1 callersFunction_classify
(e: Exception)
chapter5/permission-embedded-data-objects/pedo/eval/enterprise_agent_scenarios.py:47
↓ 1 callersMethod_classify
( self, total_tokens: int, tool_calls: int, cache_hit_ratio: float, co
chapter7/agent-cost-analysis/cost_efficiency_analyzer.py:204
↓ 1 callersMethod_classify_risk
Classify risk level from detected patterns. - ``high``: arbitrary execution, or data exfiltration (network plus file read, file write, or env-var a
chapter5/coding-agent/sandbox_evaluator.py:230
↓ 1 callersMethod_clean_original_node_json
Recursively remove children_nodes and shadow_roots from original_node JSON.
chapter9/browser-use-rpa/browser-use/browser_use/dom/views.py:168
↓ 1 callersMethod_clean_params
Strip control fields (confirm_token, user_confirmed) from params.
chapter9/harness-safety-gate/safety_policy_gate.py:140
↓ 1 callersFunction_clean_sql
去掉 markdown 代码块围栏等杂质,只留 SQL。
chapter5/erp-agent/agent.py:78
↓ 1 callersMethod_cleanup_expired_sessions
Background task to clean up expired sessions.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:1008
↓ 1 callersMethod_cleanup_process
Clean up browser process. Args: process: psutil.Process to terminate
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/local_browser_watchdog.py:381
↓ 1 callersMethod_cleanup_temp_dir
Clean up temporary directory. Args: temp_dir: Path to temporary directory to remove
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/local_browser_watchdog.py:413
↓ 1 callersFunction_clear_library
清空持久化的工具库(仅删除生成的 *.json 工件),用于重现「从零进化」。
chapter9/self-evolving-tools/demo.py:45
↓ 1 callersMethod_clear_text_field
Clear text field using multiple strategies, starting with the most reliable.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/default_action_watchdog.py:775
↓ 1 callersMethod_clear_text_field
Clear text field using multiple strategies, starting with the most reliable.
chapter9/browser-use-rpa/browser-use/browser_use/actor/element.py:830
↓ 1 callersMethod_click
Click an element by index.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:669
↓ 1 callersFunction_client
(provider: str)
chapter9/self-modifying-agent/llm_generator.py:28
← previousnext →3,001–3,100 of 13,003, ranked by callers