MCPcopy Create free account

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

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

↓ 5 callersMethodcontains
(self, other: 'Rect')
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/paint_order.py:31
↓ 5 callersMethodcount_tokens
Count the number of tokens in a text string.
chapter2/context-compression/compression_strategies.py:92
↓ 5 callersMethodcreate_browser
Create a new cloud browser instance. Returns: CloudBrowserResponse: Contains CDP URL and other browser info Raises: CloudBrowserAuthError:
chapter9/browser-use-rpa/browser-use/browser_use/browser/cloud.py:51
↓ 5 callersFunctiondeck
(pages: int)
chapter5/paper-to-ppt/test_page_contract.py:13
↓ 5 callersFunctiondiagnose
聚合跨轨迹的相同故障模式:达到支持门槛才创建修改请求。 三类信号(用户纠正、点踩、事后审计)按风险类别合并计数;用户已确认 的操作与低风险调用的负反馈不计入失败簇。
chapter9/harness-safety-gate/evolution.py:96
↓ 5 callersFunctiondisplay_sample
(instr: str, t: str, min: int, max: int, response: int | None = None)
chapter2/prompt-engineering/tau_bench/model_utils/model/completion.py:61
↓ 5 callersFunctionedge
(k, name, from, to, d, { dash = false, gutter = 32 } = {})
web-astro/scripts/async-architecture-layout.mjs:71
↓ 5 callersMethodencode
(self, texts: Sequence[str], *, query: bool, batch_size: int = 8)
chapter3/contextual-retrieval/campaign.py:44
↓ 5 callersMethodevaluate
Evaluate model on dataset and compile comprehensive report.
chapter8/MultilingualReasoning/evaluate_multilingual.py:461
↓ 5 callersMethodevaluate_accuracy
Determine task accuracy (1.0 for match, 0.0 for mismatch).
chapter8/MultilingualReasoning/evaluate_multilingual.py:236
↓ 5 callersMethodevaluate_cot_fidelity
Calculate language fidelity score (0.0 - 1.0) for Chain-of-Thought text.
chapter8/MultilingualReasoning/evaluate_multilingual.py:174
↓ 5 callersMethodevaluate_test_case
Evaluate a single test case Args: test_id: The test case ID to evaluate Returns:
chapter3/contextual-retrieval-for-user-memory/evaluator.py:290
↓ 5 callersFunctionfilter_data
Filter voting data based on various criteria (following official Chatbot Arena method). Args: df: Input DataFrame min_da
chapter7/elo-leaderboard/data_loader.py:122
↓ 5 callersMethodfind
(self, key)
chapter7/model-action-threshold/tasks/crosscutting_identity/repo/accounts/store.py:10
↓ 5 callersMethodfind_contradictions
Detect contradictions between claims across steps. Two contradiction patterns are recognised: * **polarity** -- one claim affirms X,
chapter9/trajectory-verifier/consistency_checker.py:310
↓ 5 callersMethodfingerprint
“工具名 + 参数”指纹,用来数切换之后有没有把已经做过的事重做一遍。
chapter5/provider-failover/neutral_trace.py:46
↓ 5 callersFunctionfinish
(k, content, figure, height)
web-astro/scripts/async-architecture-layout.mjs:83
↓ 5 callersFunctionfinish
(k, content, figure, height)
web-astro/scripts/voice-architecture-layout.mjs:82
↓ 5 callersFunctionfn
(tag: str = "")
chapter2/local_llm_serving/test_parallel_tools.py:37
↓ 5 callersMethodfrom_records
用此前录下的 token 用量重建一条 trace,并按给定单价重算成本(不打模型)。
chapter7/agent-cost-analysis/tracer.py:137
↓ 5 callersMethodgenerate_message
( self, messages: list[Message], force_json: bool, temperature: float | None = None )
chapter2/prompt-engineering/tau_bench/model_utils/model/chat.py:297
↓ 5 callersMethodget_all_children_text
(self, max_depth: int = -1)
chapter9/browser-use-rpa/browser-use/browser_use/dom/views.py:480
↓ 5 callersMethodget_all_frames
Get a complete frame hierarchy from all browser targets. Returns: Tuple of (all_frames, target_sessions) where: - all_frames: dict mapping fr
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:2115
↓ 5 callersFunctionget_all_prompts
Return all benchmark prompts.
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/prompts.py:809
↓ 5 callersMethodget_args
Get the list of all Chrome CLI launch args for this profile (compiled from defaults, user-provided, and system-specific).
chapter9/browser-use-rpa/browser-use/browser_use/browser/profile.py:739
↓ 5 callersMethodget_client_config
Get OpenAI client configuration
chapter3/contextual-retrieval-for-user-memory/config.py:130
↓ 5 callersFunctionget_company_info
Get company information and business details. Args: symbol: Stock ticker symbol Returns: TextContent with c
chapter4/perception-tools/src/yahoo_finance_tools.py:234
↓ 5 callersMethodget_dom_element_by_index
Get DOM element by index. Get element from cached selector map. Args: index: The element index from the serialized DOM Returns: Enhance
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1625
↓ 5 callersFunctionget_historical_data
Retrieve historical stock data. Args: symbol: Stock ticker symbol start: Start date (YYYY-MM-DD) end: End date (
chapter4/perception-tools/src/yahoo_finance_tools.py:135
↓ 5 callersMethodget_memories
Retrieve memories, optionally filtered by type and importance
chapter3/memobase/agent.py:156
↓ 5 callersMethodget_model_config
Get configuration for a specific model
chapter4/multimodal-agent/config.py:123
↓ 5 callersMethodgithub_create_pr
Create a GitHub Pull Request. Args: repo_name: Repository name (format: owner/repo) title: PR title
chapter4/execution-tools/external_tools.py:189
↓ 5 callersMethodgoogle_calendar_add
Add event to Google Calendar. Args: summary: Event title start_time: Start time (ISO 8601 format or
chapter4/execution-tools/external_tools.py:87
↓ 5 callersMethodhandle_event
Handle an incoming event and generate a response Args: event: The event to handle max_iterations: Ma
chapter6/agent-with-event-trigger/agent.py:1059
↓ 5 callersMethodhandle_generate_message_response
( self, prompt: list[dict[str, str] | Message], content: str, force_json: bool )
chapter2/prompt-engineering/tau_bench/model_utils/model/chat.py:302
↓ 5 callersFunctioninit_browser
Initialize browser session.
chapter4/collaboration-tools/src/browser_tools.py:15
↓ 5 callersMethodlisten
(self, prompt: str = "")
chapter10/voice-werewolf/werewolf/human.py:94
↓ 5 callersFunctionllm_chat
发起一次 chat completion,并把真实 token usage 记入 tracker。 注意:messages 是本次调用的“独立上下文”。子 Agent 每次都从零构造 messages, 因此各 Agent 的上下文天然隔离,互不污染。
chapter10/book-translation/agents.py:242
↓ 5 callersMethodload
(self)
chapter6/end-to-end-speech/speech_model.py:73
↓ 5 callersMethodlogEvent
(type, details = {})
chapter6/live-audio/backend/server.js:208
↓ 5 callersFunctionmake_execution_tools
(monkeypatch)
chapter4/execution-tools/test_execution_tools.py:40
↓ 5 callersMethodmake_request
Make a rate-limited request to PubChem API with retry for async operations.
chapter4/perception-tools/src/pubchem_tools.py:102
↓ 5 callersFunctionnotify
(message: string)
web-astro/src/scripts/highlights.ts:54
↓ 5 callersMethodpoll_for_token
Poll for the access token. Returns token info when authorized, None if timeout.
chapter9/browser-use-rpa/browser-use/browser_use/sync/auth.py:157
↓ 5 callersMethodprice
( self, input_tokens: int, output_tokens: int = 0, cached_input_tokens: int =
chapter7/user-memory-system-evaluation/experiment.py:117
↓ 5 callersFunctionprint_section
Print a formatted section header
chapter2/system-hint/main.py:23
↓ 5 callersMethodquery
(self, accessor: AccessContext, type_name: str, filters: dict | None = None)
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/agentspec_wrap.py:180
↓ 5 callersMethodquery
Process a user query using the ReAct pattern. Args: user_query: The user's question stream: Whether
chapter3/contextual-retrieval/agent.py:172
↓ 5 callersFunctionread_jsonl
(path: Path)
chapter8/prompt-distillation/run_experiment_8_8.py:114
↓ 5 callersFunctionredact_text
Returns a printable error/message with likely credentials removed.
chapter7/android-world/experiment_core.py:30
↓ 5 callersFunctionreference_predictions
()
chapter7/public-health-reporting-eval/tests/test_offline.py:16
↓ 5 callersMethodregister
注册(或替换同名)解析器。新解析器优先级更高,放到列表末尾后再尝试。
chapter5/adaptive-log-parser/engine.py:64
↓ 5 callersFunctionrelease_manifest
( stable_source: str, candidate: Dict[str, Any], diagnosis: Dict[str, Any], checks: Dict[str,
chapter9/harness-safety-gate/evolution.py:488
↓ 5 callersMethodreload
Reload the target.
chapter9/browser-use-rpa/browser-use/browser_use/actor/page.py:88
↓ 5 callersFunctionrender_slides
将 slides_md 文本写入工作区并导出为逐页 PNG。 参数: slides_md: 完整的 Slidev markdown 源码 out_subdir: 输出子目录名(如 'proposer_iter1') 返回:
chapter5/paper-to-ppt/renderer.py:23
↓ 5 callersMethodrequest_approval
Request LLM approval for a dangerous operation. Args: operation: The operation name details: Details
chapter4/execution-tools/llm_helper.py:107
↓ 5 callersMethodresolve_llm
Return ``(api_key, base_url, model)`` for the configured provider. Computed at call time so a runtime override of ``Config.MODEL_NAME``
chapter2/context-compression/config.py:83
↓ 5 callersFunctionresponse
(*, hallucination=False)
chapter3/user-memory-evaluation/test_structured_rubric.py:13
↓ 5 callersMethodretrieve
Flat top-k tool retrieval across ALL servers (single-shot RAG-style routing). Unlike ``route_request`` (which first narrows to a few
chapter4/active-tool-selection/semantic_router.py:108
↓ 5 callersFunctionrun
执行命令,失败时抛出带 stderr 尾部的异常。
chapter5/video-edit/ffmpeg_utils.py:40
↓ 5 callersMethodrun
( self, task: str, *, history: list[dict[str, Any]] | None = None, max
chapter5/agent-creator/reference_agent/agent.py:61
↓ 5 callersMethodrun
跑完整一局,返回获胜阵营。
chapter10/voice-werewolf/werewolf/game.py:432
↓ 5 callersFunctionrun_ablation_campaign
Entrypoint function to execute a downstream ablation campaign. Args: baseline_agent: Agent instance/callable representing baseline code.
chapter9/hermes-self-evolution/run_downstream_ablation.py:571
↓ 5 callersFunctionrun_async
(coro)
chapter4/execution-tools/test_execution_tools.py:20
↓ 5 callersFunctionrun_lua_link
(target: str)
tests/test_epub_external_links.py:14
↓ 5 callersMethodsave_memory
Save notes to storage
chapter3/user-memory/memory_manager.py:142
↓ 5 callersFunctionsave_text
(name, text)
chapter5/paper-to-ppt/demo.py:52
↓ 5 callersMethodsave_to_file
Save auth config to local file
chapter9/browser-use-rpa/browser-use/browser_use/sync/auth.py:70
↓ 5 callersMethodsave_workflow
Save a workflow to persistent storage. Args: workflow: The workflow to save
chapter9/browser-use-rpa/learning_agent/knowledge_base.py:60
↓ 5 callersFunctionscenario
()
chapter6/async-agent/test_real_tasks.py:28
↓ 5 callersMethodsearch
Search the index for relevant chunks using retrieval pipeline Args: query: Search query top_k: Numbe
chapter3/agentic-rag-for-user-memory/indexer.py:373
↓ 5 callersMethodsearch
Search for top-k similar items in the HNSW index.
chapter3/dense-embedding/indexing.py:351
↓ 5 callersMethodsearch
(self, query: str)
chapter3/agentic-rag/campaign.py:120
↓ 5 callersMethodselect
List child objects. Permission check on parent for SELECT.
chapter5/permission-embedded-data-objects/pedo/core/store.py:144
↓ 5 callersMethodsend
( self, sender: str, recipient: str, type: str, *, sensitive_k
chapter10/autonomous-phone-registration/bus.py:23
↓ 5 callersFunctionsetStatus
(value)
chapter6/phone-agent/static/app.js:20
↓ 5 callersFunctionsha256
(value: bytes | str)
chapter6/async-agent/run_real_experiment.py:30
↓ 5 callersFunctionsha256_bytes
(value: bytes)
chapter5/paper-to-video/campaign.py:31
↓ 5 callersFunctionsha256_bytes
(data: bytes)
chapter4/perception-tools/run_experiment_4_2.py:103
↓ 5 callersFunctionsha256_file
(path: Path)
chapter8/MiniMind-pretrain/validation/run_vlm_training_report_audit.py:216
↓ 5 callersFunctionsha256_file
(path: str | Path)
chapter6/end-to-end-speech/speech_model.py:29
↓ 5 callersFunctionsha256_text
(source: str)
chapter9/self-modifying-agent/evolution.py:54
↓ 5 callersFunctionsha256_text
(source: str)
chapter9/harness-safety-gate/evolution.py:66
↓ 5 callersMethodshould_process
Check if memory processing should be triggered based on conversation count Returns: True if processing should oc
chapter3/user-memory/background_memory_processor.py:476
↓ 5 callersMethodsize
Get the number of documents.
chapter3/retrieval-pipeline/document_store.py:86
↓ 5 callersFunctionsolve_labeled
求解并把布尔解转成 {name: 'knight'/'knave'}。返回解列表(通常唯一)。
chapter5/code-for-logic/csp_solver.py:85
↓ 5 callersFunctionsource_path_for_page
Return the tracked source represented by an assembled page URI.
scripts/site_source_paths.py:15
↓ 5 callersMethodstart
Start the persistent shell process.
chapter5/coding-agent/tools/shell_session.py:74
↓ 5 callersMethodstart
(self)
chapter10/parallel-web-research/agents.py:43
↓ 5 callersMethodtake_screenshot
Take a screenshot using CDP. Args: path: Optional file path to save screenshot full_page: Capture entire scrollable page beyond viewport f
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:2386
↓ 5 callersMethodto_dict
Convert configuration to dictionary.
chapter3/mem0/config.py:189
↓ 5 callersFunctiontokenLabel
(token: string)
chapter2/attention_visualization/frontend/components/tokenLabel.ts:2
↓ 5 callersFunctiontokenize
把文本切成 token 列表,供 BM25 使用。
chapter3/contextual-retrieval/compare_retrieval.py:46
↓ 5 callersFunctiontool_response
(name, arguments)
chapter10/voice-werewolf/test_user_simulator.py:36
↓ 5 callersFunctiontruncate_and_persist
Truncate over-long output and persist the full text to a temp file. Returns a tuple of (processed_text, saved_path). When the output is within
chapter4/execution-tools/execution_tools.py:24
↓ 5 callersFunctionutc_now
()
chapter5/cad-vs-diffusion/receipts.py:13
↓ 5 callersFunctionvalidate
(evidence_path: Path)
chapter6/end-to-end-speech/validate_evidence.py:16
↓ 5 callersMethodwolves
(self, alive_only=False)
chapter10/voice-werewolf/werewolf/game.py:135
↓ 5 callersMethodwrite
(self, text)
chapter2/context-compression/run_all_strategies.py:139
↓ 5 callersMethodwrite_file
Write content to file using file-specific write method
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:306
← previousnext →601–700 of 13,003, ranked by callers