MCPcopy Create free account

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

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

↓ 1 callersFunctionexecute_pedo
Execute generated code against PEDO store.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety.py:456
↓ 1 callersFunctionexecute_raw
Execute generated code against raw database.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety.py:368
↓ 1 callersMethodexecute_react_loop
Execute the ReAct loop for a given query Args: query: User query to answer temperature: Sampling tem
chapter2/attention_visualization/main.py:326
↓ 1 callersFunctionexecute_single_task
Execute a single task with the agent
chapter2/system-hint/main.py:93
↓ 1 callersFunctionexecute_tool
( root: Path, suite: str, features: set[str], name: str, arguments: dict, counters: di
chapter2/system-hint/run_experiment_2_8.py:298
↓ 1 callersMethodexecute_tool
Execute a tool by name with given arguments
chapter2/attention_visualization/tools.py:146
↓ 1 callersFunctionexpand_env
(value: Any)
chapter7/model-benchmark/campaign.py:41
↓ 1 callersFunctionexpect
(condition: bool, message: str)
chapter6/rgb-sim2real-grasping/validate_evidence.py:25
↓ 1 callersFunctionexpect
(condition: bool, message: str)
chapter6/xlerobot-teleoperation/validate_evidence.py:25
↓ 1 callersFunctionexpect
(condition: bool, message: str)
chapter6/gemini-xlerobot-navigation/validate_evidence.py:27
↓ 1 callersFunctionexpected_cells
(experiment: str, config: Optional[Dict[str, Any]])
chapter7/user-memory-system-evaluation/experiment.py:1567
↓ 1 callersFunctionexpected_score
Bradley-Terry / Elo win probability of A against B.
chapter7/elo-leaderboard/battle_simulator.py:31
↓ 1 callersFunctionexpected_score_fast
Fast expected score calculation using Numba JIT. Args: rating_a: Rating of model A rating_b: Rating of model B
chapter7/elo-leaderboard/optimized_elo.py:12
↓ 1 callersFunctionexpected_text
(tool_event: dict[str, Any])
chapter10/voice-werewolf/evaluate_audio_run.py:29
↓ 1 callersFunctionexplain_result
复现书中日志:对命中文档,逐个查询词给出 TF / 文档长度 / IDF / BM25 贡献。
chapter3/sparse-embedding/cli.py:114
↓ 1 callersFunctionexport_campaign_summary
Export structured JSON and Markdown summary metrics for a campaign database.
chapter7/model-benchmark/analysis.py:831
↓ 1 callersFunctionexport_state
(sim: Path, destination: Path)
chapter10/generative-agents/package_evidence.py:39
↓ 1 callersMethodexport_test_cases
Export test cases to different formats.
chapter3/user-memory-evaluation/main.py:200
↓ 1 callersMethodexport_to_json
Export test cases to JSON format.
chapter3/user-memory-evaluation/framework.py:386
↓ 1 callersMethodexport_to_markdown
Export test cases to Markdown format.
chapter3/user-memory-evaluation/framework.py:404
↓ 1 callersFunctionextensionSlide
(chunk, index, total)
slides/generate.mjs:66
↓ 1 callersFunctionextensionSlideCount
(lesson)
slides/review.mjs:27
↓ 1 callersFunctionexternal_benchmark_comparison
( config: dict[str, Any], workload: Sequence[dict[str, Any]], )
chapter7/model-benchmark/analysis.py:286
↓ 1 callersFunctionextract_audio_metadata
Extract audio file metadata using ffprobe. Args: file_path: Path to audio file Returns: TextContent with au
chapter4/perception-tools/src/media_processing_tools.py:217
↓ 1 callersMethodextract_clean_markdown
Extract clean markdown from the current page. Args: browser_session: Browser session to extract content from extract_links: Whether to preser
chapter9/browser-use-rpa/browser-use/browser_use/tools/service.py:1062
↓ 1 callersFunctionextract_dataset
对整个数据集抽取,带缓存。返回 list,每项含原案例字段 + `extracted`。
chapter3/structured-knowledge-extraction/extractor.py:113
↓ 1 callersMethodextract_entities_relationships
Extract entities and relationships from text using LLM.
chapter3/structured-index/graphrag_indexer.py:116
↓ 1 callersFunctionextract_json
(text: str)
chapter4/active-tool-discovery/run_exact_experiment.py:151
↓ 1 callersFunctionextract_json_object
(content: str)
chapter8/MiniMind-pretrain/validation/run_training_report_audit.py:291
↓ 1 callersFunctionextract_json_object
(content: str)
chapter8/MiniMind-pretrain/validation/run_vlm_training_report_audit.py:400
↓ 1 callersFunctionextract_json_object
(content: str)
chapter8/continued-pretraining/validation/run_report_audit.py:243
↓ 1 callersMethodextract_known
(self, case_text)
chapter3/structured-knowledge-extraction/advisor_agent.py:32
↓ 1 callersFunctionextract_layer_matrix
Extract a [seq, seq] matrix from a HF `attentions` tuple. attentions: tuple(len = num_layers) of tensors [batch, heads, seq, seq]. head
chapter2/attention_visualization/attention_cli.py:153
↓ 1 callersFunctionextract_pages
(pdf: Path)
chapter3/structured-index/campaign.py:161
↓ 1 callersFunctionextract_slide_text
(prs: Presentation)
chapter2/agent-skills-ppt/validate_official_run.py:121
↓ 1 callersFunctionextract_title
(text: str, fallback: str)
chapter10/book-translation/run_official_experiment.py:42
↓ 1 callersFunctionextract_with_llm
开放式提炼候选规则,返回 ``(候选列表, API 证据回执)``。
chapter9/ai-style-skill/extract_rules.py:93
↓ 1 callersFunctionextraction_receipts
Return value-free provider metadata for experiment provenance.
chapter10/autonomous-phone-registration/orchestration.py:24
↓ 1 callersMethodfact_check
事实核查 - 验证陈述的真实性 Args: statement: 需要验证的陈述 Returns: 验证结果
chapter1/web-search-agent/examples.py:92
↓ 1 callersFunctionfaction_of
返回某个角色所属的阵营。
chapter10/voice-werewolf/werewolf/roles.py:68
↓ 1 callersFunctionfactors_for
(schema: Dict[str, Any], charge: str)
chapter3/structured-knowledge-extraction/campaign.py:243
↓ 1 callersFunctionfactors_for_charge
返回某罪名适用的因子列表:核心通用因子 + 该罪名扩展因子(按 key 去重)。
chapter3/structured-knowledge-extraction/discovery.py:108
↓ 1 callersFunctionfail
(message)
slides/review.mjs:13
↓ 1 callersFunctionfailure_boundary_analysis
Diagnose what each 7-4 system loses and measure hybrid synergy per paired case.
chapter7/user-memory-system-evaluation/experiment.py:1395
↓ 1 callersFunctionfakeTranslate
({ lifecycle = true } = {})
tests/js/auto-translate.test.js:38
↓ 1 callersFunctionfake_client
()
chapter7/model-benchmark/test_campaign.py:49
↓ 1 callersFunctionfast_evolved
(inp)
tests/test_ch9_hermes_downstream_ablation.py:147
↓ 1 callersFunctionfast_evolved
(inp)
tests/test_ch8_hermes_downstream_ablation.py:147
↓ 1 callersFunctionffprobe_duration
用 ffprobe 读取媒体文件时长(秒)。缺少时长元数据时 ffprobe 输出 N/A,给出清晰报错。
chapter5/paper-to-video/demo.py:166
↓ 1 callersFunctionfile_record
(path: Path, base: Path)
chapter7/package_evidence.py:22
↓ 1 callersFunctionfile_sha256
(path)
chapter5/paper-to-ppt/demo.py:72
↓ 1 callersFunctionfile_sha256
(path: Path)
chapter6/rgb-sim2real-grasping/validate_evidence.py:14
↓ 1 callersFunctionfile_sha256
(path: Path)
chapter6/xlerobot-teleoperation/validate_evidence.py:14
↓ 1 callersFunctionfile_sha256
(path: Path)
chapter6/gemini-xlerobot-navigation/validate_evidence.py:16
↓ 1 callersFunctionfilesystem
()
scripts/book_figures/chapter10.py:23
↓ 1 callersMethodfill_form_workflow
Navigate to a form and fill it out.
chapter9/browser-use-rpa/browser-use/examples/mcp/advanced_server.py:191
↓ 1 callersFunctionfilter
( func: Callable[[T], bool], iterable: Iterable[T], max_concurrency: int | None = None, )
chapter2/prompt-engineering/tau_bench/model_utils/func_tools/filter.py:10
↓ 1 callersFunctionfilter_data_parallel
Filter large DataFrame using parallel processing. Args: df: Input DataFrame filters: Dictionary of filter conditions
chapter7/elo-leaderboard/parallel_processing.py:216
↓ 1 callersFunctionfinal_turn
(messages)
chapter1/web-search-agent/tests/test_parallel_search.py:75
↓ 1 callersFunctionfind_credential_hits
(payloads: Iterable[bytes])
chapter6/streaming-speech/run_official_experiment.py:77
↓ 1 callersFunctionfind_credential_hits
(payloads: Iterable[bytes])
chapter10/parallel-web-research/run_official_experiment.py:194
↓ 1 callersFunctionfind_credential_hits
(payloads: Iterable[bytes])
chapter10/multi-role-transfer/run_official_experiment.py:104
↓ 1 callersMethodfind_data_quality_issues
( self, parent_org_unit: str, period: str )
chapter7/public-health-reporting-eval/reporting_tools.py:98
↓ 1 callersMethodfind_duplicates
Detect exact duplicates and near-duplicates (same user, different assistant).
chapter8/cot-distillation/sft_data_auditor.py:357
↓ 1 callersMethodfind_frame_target
Find the frame info for a specific frame ID. Args: frame_id: The frame ID to search for all_frames: Optional pre-built frame hierarchy. If No
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:2288
↓ 1 callersFunctionfind_label
(model, needle)
chapter8/speech-sft-experiment/analyze_campaign.py:85
↓ 1 callersMethodfind_matching_workflows
Find all workflows that might match the given task. Args: task_description: Natural language description of the
chapter9/browser-use-rpa/learning_agent/knowledge_base.py:166
↓ 1 callersFunctionfind_pair
( retained: dict[str, Any], arm: str, stage: str, keyword: str )
chapter8/MiniMind-pretrain/validation/validate_evidence.py:94
↓ 1 callersFunctionfind_region_indices
(tokenizer, rendered: str)
chapter2/attention_visualization/run_status_bar_experiment.py:172
↓ 1 callersFunctionfirst_turn
(tools)
chapter1/web-search-agent/tests/test_parallel_search.py:46
↓ 1 callersFunctionfit
()
web-astro/src/scripts/figure-viewer.ts:43
↓ 1 callersFunctionfit
在**每个罪名内部**聚类出案件原型(书中:在某罪名内自动聚出典型模式), 再跨全部原型算全局因子重要性。
chapter3/structured-knowledge-extraction/archetypes.py:98
↓ 1 callersFunctionfit_prototypes
(schema: Dict[str, Any], training: List[Dict[str, Any]], seed: int)
chapter3/structured-knowledge-extraction/campaign.py:396
↓ 1 callersFunctionfit_root
(root)
book-vi/fix_svg_text_layout.py:373
↓ 1 callersFunctionfixed_window_chunks
(case: Dict[str, Any], rounds_per_chunk: int, overlap_rounds: int)
chapter3/memory_rag_campaign.py:73
↓ 1 callersFunctionfixture
(dir)
chapter6/live-audio/backend/tests/test-experiment-validation.js:8
↓ 1 callersFunctionflowRow
(k, pairs, y, name)
web-astro/scripts/async-architecture-layout.mjs:833
↓ 1 callersFunctionflush
()
web-astro/src/lib/book-markdown.mjs:58
↓ 1 callersFunctionflush
()
web-astro/scripts/reader-navigation.test.mjs:58
↓ 1 callersMethodflush
(self)
chapter10/autonomous-phone-registration/bus.py:60
↓ 1 callersFunctionfmt
(v)
book-en/strip_titles.py:71
↓ 1 callersFunctionfmt
(v)
book-tr/strip_titles.py:70
↓ 1 callersFunctionfmt
(v)
book/strip_titles.py:70
↓ 1 callersFunctionfmt
(x, nd=2)
chapter7/tts-quality-eval/demo.py:122
↓ 1 callersFunctionfmt
(value: Any, digits: int = 3)
chapter7/model-benchmark/analysis.py:744
↓ 1 callersFunctionfmt
(v)
book-zhtw/strip_titles.py:70
↓ 1 callersFunctionfmt
(v)
book-mn/strip_titles.py:72
↓ 1 callersFunctionfmt
(v)
book-id/strip_titles.py:70
↓ 1 callersFunctionfmt
(v)
book-ta/strip_titles.py:71
↓ 1 callersFunctionfmt_pct
(value: float | None, digits: int = 1)
chapter7/model-benchmark/analysis.py:752
↓ 1 callersFunctionfn
(rate, concurrency, idx)
tests/test_ch7_rate_ramp_benchmark.py:203
↓ 1 callersFunctionforce_json_prompt
( text: str, suffix_strategy: PromptSuffixStrategy = PromptSuffixStrategy.JSON, )
chapter2/prompt-engineering/tau_bench/model_utils/model/chat.py:56
↓ 1 callersFunctionforce_json_prompt
(text: str, with_prefix: bool = False)
chapter2/prompt-engineering/tau_bench/model_utils/model/completion.py:45
↓ 1 callersFunctionformatLatencyLog
(message: string)
chapter6/live-audio/frontend/pages/index.tsx:493
↓ 1 callersMethodformat_conversation
Format conversation dictionary into text
chapter3/log-sanitization/agent.py:335
↓ 1 callersMethodformat_error
Format error message based on error type and optionally include trace
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:649
↓ 1 callersFunctionformat_history
(history: Dict[str, Any])
chapter3/memory_rag_campaign.py:62
↓ 1 callersFunctionformat_marker_reference
把 MARKER_REFERENCE 渲染成可打印的对齐表格字符串。
chapter6/controllable-tts/markup.py:214
↓ 1 callersFunctionformat_operation_summary
Format operation summary statistics Args: summary: Dictionary with counts of operations Returns: Formatted
chapter3/user-memory/memory_operation_formatter.py:63
↓ 1 callersMethodformat_request
Format a structured tool request.
chapter4/active-tool-selection/semantic_router.py:287
← previousnext →4,901–5,000 of 13,003, ranked by callers