MCPcopy Create free account

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

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

↓ 1 callersFunction_outcome
Say what an arm did, not merely whether it stopped. ``Completed`` is true for both ways an ablated arm can end without the answer, and they a
chapter1/context/main.py:38
↓ 1 callersMethod_outcomeLabel
(o)
extras/agent-lab/agent-trajectory.js:437
↓ 1 callersMethod_output_operations
Output memory operations in a formatted way Args: results: Processing results with operations
chapter3/user-memory/background_memory_processor.py:538
↓ 1 callersFunction_package_version
(name: str)
chapter6/phone-agent/run_acceptance.py:199
↓ 1 callersFunction_page_num
(path: str)
chapter5/paper-to-ppt/renderer.py:76
↓ 1 callersMethod_paired_bootstrap_ci
Paired bootstrap confidence interval for the per-task delta. Resamples tasks (with replacement) as paired units, recomputing the metr
chapter9/hermes-self-evolution/run_downstream_ablation.py:423
↓ 1 callersFunction_paired_bootstrap_interval
(values: list[float], samples: int = 10_000)
chapter10/multi-role-transfer/run_comparison.py:109
↓ 1 callersFunction_parameter_descriptions
Return tool-specific MCP parameter contracts for the compact adapter.
chapter4/perception-tools/src/expanded_catalog.py:977
↓ 1 callersMethod_parse
(text: str)
chapter9/self-evolution-eval/agent.py:151
↓ 1 callersFunction_parse_args
()
chapter7/android-world/merge_candidate_shards.py:29
↓ 1 callersFunction_parse_args
()
chapter7/android-world/run_controlled_experiment.py:933
↓ 1 callersMethod_parse_base64_url
Parse a base64 data URL to extract media type and data.
chapter9/browser-use-rpa/browser-use/browser_use/llm/anthropic/serializer.py:36
↓ 1 callersMethod_parse_base64_url
Parse a base64 data URL to extract format and raw bytes.
chapter9/browser-use-rpa/browser-use/browser_use/llm/aws/serializer.py:34
↓ 1 callersFunction_parse_code_block
(block: str, config: str)
chapter8/MiniMind-pretrain/validation/run_vlm_training_report_audit.py:236
↓ 1 callersFunction_parse_computed_styles
Parse computed styles from layout tree using string indices.
chapter9/browser-use-rpa/browser-use/browser_use/dom/enhanced_snapshot.py:38
↓ 1 callersMethod_parse_datetime
Parse datetime string in various formats.
chapter4/execution-tools/external_tools.py:306
↓ 1 callersFunction_parse_ddg
解析 DuckDuckGo 的两种页面结构。
chapter9/self-evolving-tools/base_tools.py:77
↓ 1 callersMethod_parse_email
Parse Gmail message into readable format
chapter9/browser-use-rpa/browser-use/browser_use/integrations/gmail/service.py:193
↓ 1 callersFunction_parse_json
(text: str)
chapter10/book-translation/run_official_experiment.py:228
↓ 1 callersFunction_parse_json_arg
尝试按 JSON 解析;不是合法 JSON 时按原始字符串返回(供子 Agent 直接使用)。
chapter4/collaboration-tools/main.py:47
↓ 1 callersFunction_parse_judge_text
(text: str)
chapter6/controllable-tts/evaluate_audio_quality.py:181
↓ 1 callersFunction_parse_kwargs
把 key=value 列表解析成传给工具函数的关键字参数。
chapter4/perception-tools/cli.py:215
↓ 1 callersMethod_parse_model_output
Parse raw model output into reasoning CoT, final answer, and token metadata.
chapter8/MultilingualReasoning/evaluate_multilingual.py:320
↓ 1 callersFunction_parse_pairs
(transcript: str)
chapter8/MiniMind-pretrain/validation/run_training_report_audit.py:136
↓ 1 callersMethod_parse_query_spec
Parses a string query specification into an operation dict. Accepts JSON like ``{"op": "query", "type": "candidate", "filters": {...}}``.
chapter5/permission-embedded-data-objects/run_live_security_eval.py:382
↓ 1 callersFunction_parse_rare_boolean_data
Parse rare boolean data from snapshot - returns True if index is in the rare data.
chapter9/browser-use-rpa/browser-use/browser_use/dom/enhanced_snapshot.py:33
↓ 1 callersFunction_parse_selection
把 "1,3" 或 "间接,D4" 这样的选择字符串解析为 items 的下标列表。 支持两种写法(可混用,逗号分隔): - 1 起始的序号(如 "1,3"); - 名称子串(如 "间接" 匹配"间接注入","D4" 匹配"D4-组合防御")。 保持用户给定的顺序并
chapter2/prompt-injection/demo.py:32
↓ 1 callersFunction_parse_text
(text: str)
chapter4/perception-tools/run_experiment_4_2.py:265
↓ 1 callersMethod_parse_turn_id
(turn: dict[str, Any], index: int)
chapter7/agent-cost-analysis/cost_efficiency_analyzer.py:127
↓ 1 callersFunction_path_run
(path: str, client: OpenAI, model: str, task: str, max_steps: int, kind: str = "cagr", task_spec
chapter10/multi-role-transfer/run_comparison.py:158
↓ 1 callersFunction_pct
(saved: float, base: float)
chapter7/agent-cost-analysis/demo.py:38
↓ 1 callersMethod_pct
线性插值分位数;样本过少时退化为最大/最小值。
chapter7/model-benchmark/benchmark.py:249
↓ 1 callersFunction_perceive
模拟一次带 I/O 延迟的只读感知调用;返回 (名称, 标称延迟, 实测耗时)。
chapter6/async-agent/async_demos.py:54
↓ 1 callersFunction_percentile
最近秩(nearest-rank)百分位,避免引入 numpy 依赖。q 取 0~100。
chapter7/agent-cost-analysis/tracer.py:28
↓ 1 callersMethod_policy
(self, trajectory: Dict[str, Any])
chapter9/trajectory-verifier/verifier.py:211
↓ 1 callersMethod_pool
(self, last_hidden, attention_mask)
chapter3/retrieval-pipeline/evaluate.py:223
↓ 1 callersMethod_populate_frame_metadata
Populate additional frame metadata like backend node IDs and parent target IDs. Args: all_frames: Frame hierarchy dict to populate target_ses
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:2250
↓ 1 callersFunction_post
限流和连接抖动自己重试;其余状态码原样返回,交给调用方判断。
chapter5/provider-failover/providers.py:41
↓ 1 callersFunction_post
(url: str, payload: dict[str, Any])
chapter9/browser-use-rpa/run_experiment_9_5.py:56
↓ 1 callersMethod_post_process
Handle post-action processing like download tracking and result logging
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:768
↓ 1 callersMethod_post_responses
Send one Responses request and return (status, body, stream_events). DashScope requires streaming; the final ``response.completed`` event
chapter1/search-codegen/agent.py:177
↓ 1 callersMethod_predicate_matches
(self, predicate: str, args: dict, context: dict)
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/agentspec_baseline.py:91
↓ 1 callersMethod_prepare_assistant_message
Prepare assistant message for adding to messages list, filtering out reasoning_content if in NO_REASONING mode Args
chapter1/context/agent.py:536
↓ 1 callersFunction_prepare_context
( task: str, context_strategy: str, parent_context: Optional[Union[str, Dict[str, Any]]], mini
chapter4/collaboration-tools/src/subagent_tools.py:283
↓ 1 callersMethod_prepare_context
Prepare the context for the step: browser state, action models, page actions
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:672
↓ 1 callersMethod_prepare_inputs
Prepare input tensors for the model. Args: prompts: List of text prompts to convert to speech voice:
chapter8/orpheus/inference.py:93
↓ 1 callersFunction_prepare_llm_generated_context
LLM 生成上下文: one extra LLM call summarizes/selects relevant context. Business rules can encode privacy ("不传递支付信息") and compression ("超过 10 轮只传摘
chapter4/collaboration-tools/src/subagent_tools.py:211
↓ 1 callersMethod_prepare_memory_cards
Generate memory cards for a test case For Layer 3 tests, this creates cards that enable proactive service
chapter3/contextual-retrieval-for-user-memory/contextual_evaluator.py:213
↓ 1 callersMethod_prepare_messages
Prepare messages for LLM including memory context.
chapter3/mem0/agent.py:200
↓ 1 callersMethod_prepare_messages_for_api
Build the message list actually sent to the model for the current iteration, applying the NO_HISTORY ablation. For every mod
chapter1/context/agent.py:662
↓ 1 callersFunction_prepare_minimal_context
最小化传递: only the task, plus an optional hand-picked slice. ``minimal_slice`` may be: - a string: appended verbatim, - a list of keys:
chapter4/collaboration-tools/src/subagent_tools.py:173
↓ 1 callersMethod_preprocess_markdown_content
Light preprocessing of html2text output - minimal cleanup since html2text is already clean. Args: content: Markdown content from html2text to
chapter9/browser-use-rpa/browser-use/browser_use/tools/service.py:1123
↓ 1 callersMethod_prettify
(v)
extras/agent-lab/agent-trajectory.js:446
↓ 1 callersMethod_print_analysis
Print analysis of the results
chapter2/context-compression/experiment.py:252
↓ 1 callersMethod_print_comparison
Print comparison table of all strategies
chapter2/context-compression/experiment.py:224
↓ 1 callersMethod_print_learning_curve
Print the Q-learning success-rate-over-episodes table. This is the whole point of experiment 7-1: watch the victory rate climb from 0
chapter1/learning-from-experience/experiment.py:134
↓ 1 callersMethod_print_mode_summary
Print summary for a single mode
chapter3/contextual-retrieval/evaluation/evaluate.py:332
↓ 1 callersMethod_print_mode_summary
Print summary for a single mode
chapter3/agentic-rag/evaluation/evaluate.py:340
↓ 1 callersMethod_print_statistics
Print processing statistics
chapter3/contextual-retrieval/index_local_laws_contextual.py:420
↓ 1 callersMethod_print_statistics
Print processing statistics
chapter3/agentic-rag/index_local_laws.py:384
↓ 1 callersFunction_print_summary
(tasks, strategies, records)
chapter4/active-tool-discovery/demo.py:237
↓ 1 callersMethod_print_summary
Print a summary of the metrics
chapter2/context-compression/experiment.py:165
↓ 1 callersMethod_print_summary
Print benchmark summary
chapter3/memobase/locomo_benchmark.py:540
↓ 1 callersMethod_process_batch
(self, batch: list[Event])
chapter6/async-agent/runtime.py:258
↓ 1 callersMethod_process_generation_attentions
Process attention weights from generation output
chapter2/attention_visualization/agent.py:458
↓ 1 callersMethod_process_native
Process using native multimodal capabilities
chapter4/multimodal-agent/agent.py:425
↓ 1 callersMethod_process_native_doubao
Process using Doubao's native multimodal API
chapter4/multimodal-agent/agent.py:564
↓ 1 callersMethod_process_native_openai
Process using OpenAI's native multimodal API
chapter4/multimodal-agent/agent.py:531
↓ 1 callersMethod_process_native_openrouter
Process content via OpenRouter's OpenAI-compatible endpoint. Images are sent as native vision input; other types are extracted to text
chapter4/multimodal-agent/agent.py:446
↓ 1 callersMethod_process_pdf_with_pdfplumber
Process PDF using pdfplumber for better structure preservation.
chapter3/structured-index/document_processor.py:63
↓ 1 callersMethod_process_pdf_with_pypdf
Fallback PDF processing using pypdf.
chapter3/structured-index/document_processor.py:93
↓ 1 callersMethod_promise_action
(self, trajectory: Dict[str, Any])
chapter9/trajectory-verifier/verifier.py:280
↓ 1 callersFunction_prompt
()
chapter6/controllable-tts/evaluate_audio_quality.py:130
↓ 1 callersFunction_protocol_is_valid
(messages: list[Any])
chapter5/agent-creator/validator.py:235
↓ 1 callersFunction_provider_client
(provider: str)
chapter9/browser-use-rpa/run_experiment_9_5.py:67
↓ 1 callersFunction_provider_config
(model: str | None = None)
chapter6/phone-agent/agent.py:84
↓ 1 callersFunction_provider_error
(payload: Any)
chapter4/perception-tools/src/xquik_tools.py:47
↓ 1 callersFunction_provider_request_options
(provider: str)
chapter10/book-translation/agents.py:230
↓ 1 callersMethod_quality_score
Compute a 0.0–1.0 quality score. Starts at 1.0 and is penalised per issue: errors cost more than warnings. An empty dataset scores 0.
chapter8/cot-distillation/sft_data_auditor.py:620
↓ 1 callersFunction_quiet_logging
默认压低引擎日志;--verbose / --explain 时放开到 DEBUG 以展示计算过程。
chapter3/sparse-embedding/cli.py:65
↓ 1 callersMethod_quote_powershell
Quote a string as a PowerShell single-quoted literal.
chapter5/coding-agent/tools/shell_session.py:107
↓ 1 callersMethod_rank_fusion
Combine BM25 and embedding results using reciprocal rank fusion. Educational Note: Rank fusion combines different re
chapter3/contextual-retrieval/contextual_tools.py:388
↓ 1 callersFunction_ranked
A single ranked result dict (rank-ordered).
tests/test_ch3_retrieval_stage_evaluator.py:38
↓ 1 callersFunction_ranked_to_score_map
(ranked: RankedList)
chapter3/retrieval-pipeline/fusion.py:36
↓ 1 callersFunction_rate
(split: str, label: str)
chapter8/premature-completion-dpo/evaluate.py:99
↓ 1 callersFunction_rate
(rows: Iterable[Dict[str, Any]], field: str)
chapter9/self-evolution-eval/harness.py:18
↓ 1 callersFunction_rate_cell
(correct: int, width: int)
chapter5/code-for-math/demo.py:680
↓ 1 callersMethod_rate_limit
Enforce rate limiting to comply with PubChem usage policy.
chapter4/perception-tools/src/pubchem_tools.py:62
↓ 1 callersFunction_rate_limit_error
()
chapter1/web-search-agent/tests/test_agent.py:300
↓ 1 callersFunction_read
(data_dir, name)
chapter5/log-diagnosis/demo.py:67
↓ 1 callersFunction_read
(path)
chapter9/prompt-auto-optimization/demo.py:45
↓ 1 callersFunction_read_evidence
(path: Path, *, purpose: str)
chapter7/android-world/run_controlled_experiment.py:243
↓ 1 callersFunction_read_frontmatter
(path: Path)
chapter10/multi-role-transfer/skill_orchestrator.py:40
↓ 1 callersMethod_read_image
Read image file
chapter5/coding-agent/tools/read_tool.py:108
↓ 1 callersMethod_read_notebook
Read Jupyter notebook
chapter5/coding-agent/tools/read_tool.py:138
↓ 1 callersMethod_read_pdf
Read PDF file
chapter5/coding-agent/tools/read_tool.py:123
↓ 1 callersFunction_read_stream
取流本身也会被掐断,重试几次再放弃——这次中断不是实验要测的那一个。
chapter5/provider-failover/streaming.py:56
↓ 1 callersFunction_read_stream_once
(provider, url, headers, body, where, limits, state: Partial)
chapter5/provider-failover/streaming.py:68
↓ 1 callersFunction_readable
(norm_row)
chapter5/erp-agent/demo.py:79
↓ 1 callersFunction_reasoning
推理模型(gpt-5 / o 系列 / *thinking 等)不接受 temperature=0。
chapter5/code-for-logic/demo.py:124
← previousnext →3,701–3,800 of 13,003, ranked by callers