MCPcopy Create free account

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

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

↓ 3 callersMethodlist_files
List all files in the system
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:241
↓ 3 callersMethodlist_test_cases
List all available test cases. Args: category: Optional filter by category (layer1, layer2, layer3)
chapter3/user-memory-evaluation/framework.py:141
↓ 3 callersFunctionload_arena_data
Load and preprocess Chatbot Arena voting data. Expected columns: - model_a: Identifier for first model - model_b: Identifier for
chapter7/elo-leaderboard/data_loader.py:62
↓ 3 callersMethodload_checkpoint
从检查点文件恢复轨迹与任务状态(原地覆盖当前状态)。
chapter6/async-agent/runtime.py:396
↓ 3 callersFunctionload_config
Load configuration from environment variables.
chapter4/collaboration-tools/src/config.py:75
↓ 3 callersMethodload_from_file
Load auth config from local file
chapter9/browser-use-rpa/browser-use/browser_use/sync/auth.py:56
↓ 3 callersFunctionload_json
(path: Path)
chapter10/generative-agents/analyze_campaign.py:24
↓ 3 callersMethodload_mcp_tools
Load tools from MCP servers This must be called in an async context after agent initialization.
chapter6/agent-with-event-trigger/agent.py:346
↓ 3 callersFunctionload_sites
(path: str | None, limit: int | None = None)
chapter10/parallel-web-research/sources.py:37
↓ 3 callersFunctionload_spec
()
chapter5/agent-creator/reference_agent/tests/test_domain_policy.py:15
↓ 3 callersMethodload_test_cases
Load test cases from the evaluation framework Args: category: Optional category filter (layer1, layer2, layer3)
chapter3/contextual-retrieval-for-user-memory/contextual_evaluator.py:174
↓ 3 callersFunctionload_voice_library
(manifest_path: str | Path = DEFAULT_MANIFEST)
chapter6/controllable-tts/voice_library.py:98
↓ 3 callersMethodlog
(self, event_type: str, **payload: Any)
chapter7/model-action-threshold/experiment.py:257
↓ 3 callersMethodlog_banner
Log a banner message
chapter2/context-compression/run_all_strategies.py:89
↓ 3 callersMethodlog_error
Log errors with context.
chapter3/dense-embedding/logger.py:148
↓ 3 callersFunctionmain
()
chapter3/memory_rag_campaign.py:492
↓ 3 callersFunctionmake_agent
(tmp_path: Path, defense_index: int = 0)
chapter2/prompt-injection/test_campaign.py:12
↓ 3 callersFunctionmake_tool_call
Build a minimal SDK-shaped tool-call object for mocked model replies.
chapter1/web-search-agent/tests/conftest.py:39
↓ 3 callersFunctionmake_validation_copy
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
chapter8/MiniMind-pretrain/validation/test_training_report_audit.py:52
↓ 3 callersFunctionmarkdown
(report: dict[str, Any])
chapter7/model-benchmark/analysis.py:758
↓ 3 callersFunctionmetrics
(k, rows, width, { padding = 20, gap = 12, min = 0 } = {})
web-astro/scripts/evaluation-overview-figures.mjs:94
↓ 3 callersFunctionmissing_extraction_rows
Return source rows omitted by otherwise successful extraction calls.
chapter3/structured-knowledge-extraction/campaign.py:344
↓ 3 callersFunctionmock_outputs
预置样例输出:演示 base(普遍过早宣称)与 adapter(先验证再收尾)的差异。
chapter8/premature-completion-dpo/evaluate.py:123
↓ 3 callersMethodmulti_act
Execute multiple actions
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:1625
↓ 3 callersFunctionmutate
(action: () => Promise<void>, message: string)
web-astro/src/scripts/highlights.ts:276
↓ 3 callersMethodneighbors
(self, node)
chapter3/structured-index/test_graphrag_search_top_k.py:54
↓ 3 callersFunctionnormalize_tool_call
Normalize the small model's harmless city-vs-schema variations.
chapter2/local_llm_serving/run_experiment.py:156
↓ 3 callersFunctionnotification_readiness
Report whether all inputs for each real notification gate are present.
chapter4/collaboration-tools/run_experiment_4_5.py:105
↓ 3 callersFunctionobservation
(cell: str, ok: bool, scheduled: str, **overrides)
chapter7/model-benchmark/test_campaign.py:60
↓ 3 callersFunctionopenNote
(record: Annotation)
web-astro/src/scripts/highlights.ts:85
↓ 3 callersMethodopenai_client_args
Return (client_kwargs, model_name) for an OpenAI-compatible call. Which endpoint and whose key comes from agentbook's provider registry,
chapter4/multimodal-agent/config.py:153
↓ 3 callersFunctionoptimize_dataframe
Optimize DataFrame memory usage by downcasting numeric types. Args: df: Input DataFrame Returns: Optimized
chapter7/elo-leaderboard/parallel_processing.py:275
↓ 3 callersFunctionoptionalize_type
(typ: type[T])
chapter2/prompt-engineering/tau_bench/model_utils/model/utils.py:42
↓ 3 callersFunctionpage
(*starred_at, end_cursor="c", has_next=False)
tests/test_gen_star_history_iso_formats.py:24
↓ 3 callersFunctionpairCard
( k, titleId, bodyIds, x, y, width, metrics, { fill = '#f0f0f0', attributes = {}, titleStyle =
web-astro/scripts/async-architecture-layout.mjs:98
↓ 3 callersFunctionpairMetrics
(k, titleId, bodyIds, width, titleStyle = TITLE)
web-astro/scripts/async-architecture-layout.mjs:92
↓ 3 callersFunctionpaired_statistics
Two-sided exact McNemar/binomial comparison for the paired arms.
chapter5/code-for-math/demo.py:436
↓ 3 callersFunctionpanel
( k, rows, x, y, width, measure, { fill = '#f0f0f0', dash = false, padding = 20,
web-astro/scripts/evaluation-overview-figures.mjs:109
↓ 3 callersFunctionparse_answer
从模型输出里提取最后一个形如 {name: knight/knave} 的 JSON 答案。
chapter5/code-for-logic/demo.py:189
↓ 3 callersFunctionparse_datetime
(value: Any)
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:59
↓ 3 callersFunctionparse_human_decision
Parse one explicit APPROVE/REJECT line from a live human operator.
chapter4/collaboration-tools/run_experiment_4_5.py:52
↓ 3 callersFunctionparse_language_label
Extract the language label from model response.
chapter8/prompt-distillation/evaluate.py:53
↓ 3 callersMethodparse_line
尝试用每个解析器解析一行;成功则在结果里标注 _parser。全部失败抛 ParseError。
chapter5/adaptive-log-parser/engine.py:75
↓ 3 callersMethodparse_request
Parse structured tool request from text. Returns dict with 'server' and 'tool' fields, or None if not found.
chapter4/active-tool-selection/semantic_router.py:261
↓ 3 callersFunctionparse_stream
(path: Path)
chapter2/agent-skills-ppt/validate_official_run.py:37
↓ 3 callersFunctionpcm16_wav
(pcm: bytes, sample_rate: int)
chapter6/phone-agent/speech.py:31
↓ 3 callersMethodpipeline_catch_rate
PCR: fraction of adversarial prompts where pipeline caught violations.
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/metrics.py:86
↓ 3 callersFunctionplan_shards
Cut the stars between `lo` and `hi` into ranges that can be paged in parallel. The first range resumes from `cursor` itself -- a real cursor, so
scripts/gen_star_history.py:269
↓ 3 callersFunctionplannedSlideCount
(lesson)
slides/generate.mjs:124
↓ 3 callersFunctionpositionKey
(chapter: string)
web-astro/src/lib/reading-position.ts:10
↓ 3 callersMethodpredict
(self, text_prompt: str)
chapter7/android-world/run_controlled_experiment.py:770
↓ 3 callersFunctionprint_section
Print a colored section header
chapter8/continued-pretraining/evaluate_model.py:25
↓ 3 callersFunctionprint_section
Print a formatted section header
chapter3/user-memory/main.py:33
↓ 3 callersMethodprivate_send
私密信息:只进入**指定单个玩家**的上下文。
chapter10/voice-werewolf/werewolf/game.py:117
↓ 3 callersFunctionprobe_duration
返回视频时长(秒)。文件缺少时长元数据时 ffprobe 输出 N/A,给出清晰报错。
chapter5/video-edit/ffmpeg_utils.py:49
↓ 3 callersMethodprocess_file
Process a file based on its extension.
chapter3/structured-index/document_processor.py:30
↓ 3 callersMethodprocess_multimodal_content
Process multimodal content based on extraction mode
chapter4/multimodal-agent/agent.py:411
↓ 3 callersMethodprocess_queue
(self, emails: list[dict[str, Any]])
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:441
↓ 3 callersFunctionproofreading_agent
Proofreading Agent:接收所有译文 + 术语表,做一致性检查 (术语是否统一、前后是否矛盾、是否流畅),输出结构化审校报告(JSON)。 translations:{chapter_name: 译文文本}
chapter10/book-translation/agents.py:396
↓ 3 callersFunctionproviderErrorMessage
(error)
chapter6/live-audio/backend/utils/providers/llmProviders.js:3
↓ 3 callersMethodpublic_dict
(self)
chapter6/computer-use-open-model/config.py:28
↓ 3 callersMethodpublish
把信封投递到总线:广播或点对点。
chapter10/parallel-web-research/message_bus.py:108
↓ 3 callersFunctionquarantine_artifact
Move a non-canonical attempt aside without changing its file format.
chapter10/generative-agents/run_campaign.py:322
↓ 3 callersMethodquery
(self, task_id: str)
chapter6/async-agent/tasks.py:227
↓ 3 callersFunctionquote
(value: Any)
chapter7/user-memory-policy-eval/runner.py:106
↓ 3 callersFunctionread
(name)
chapter8/exact-copy-sft/tests/test_copy_pipeline.py:12
↓ 3 callersFunctionread
(name)
chapter8/curly-quote-sft/tests/test_curly_pipeline.py:12
↓ 3 callersFunctionreadHighlights
( db: IDBDatabase, chapter = chapterKey, )
web-astro/src/lib/highlight-store.ts:25
↓ 3 callersFunctionread_human_decision_line
Read a live decision without leaving a permanently blocked stdin worker.
chapter4/collaboration-tools/run_experiment_4_5.py:83
↓ 3 callersFunctionreceipt_summary
(path: Path)
chapter10/generative-agents/run_campaign.py:341
↓ 3 callersMethodreceive
(self, recipient: str, timeout: Optional[float] = None)
chapter10/autonomous-phone-registration/bus.py:56
↓ 3 callersFunctionrecord_completion
Execute and retain a credential-free raw request/response receipt.
chapter9/prompt-auto-optimization/config.py:139
↓ 3 callersFunctionredact_material
Remove credentials and private delivery identifiers from retained evidence.
chapter4/collaboration-tools/run_experiment_4_5.py:157
↓ 3 callersFunctionredacted
Retain audit shape while hashing identities and message bodies.
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:75
↓ 3 callersFunctionrefresh
()
web-astro/src/scripts/highlights.ts:269
↓ 3 callersFunctionrefresh_outer_hashes
(latest_path: Path, run_dir: Path, artifact_name: str)
chapter8/MiniMind-pretrain/validation/test_training_report_audit.py:76
↓ 3 callersMethodregister_llm
Register an LLM to automatically track its token usage @dev Guarantees that the same instance is not registered multiple times
chapter9/browser-use-rpa/browser-use/browser_use/tokens/service.py:303
↓ 3 callersMethodregister_tool
Register a new tool
chapter2/local_llm_serving/tools.py:103
↓ 3 callersFunctionrelative_or_absolute
(path: Path, root: Path)
chapter6/robotics_lab_common.py:69
↓ 3 callersFunctionrender
Python-Markdown -> figure hook, the way MkDocs chains them.
tests/test_mkdocs_figure_captions.py:44
↓ 3 callersFunctionrender_report
Renders the five-stage report from machine-readable evidence.
chapter7/android-world/experiment_core.py:394
↓ 3 callersFunctionrender_tool
把单个工具渲染成完整 JSON schema 文本(与真实注入到 prompt 的形式一致)。
chapter4/active-tool-discovery/agent.py:49
↓ 3 callersFunctionrender_tools
(tools: List[Dict])
chapter4/active-tool-discovery/agent.py:54
↓ 3 callersFunctionreplace_text
(node, value: str)
book-vi/fix_svg_text_layout.py:173
↓ 3 callersFunctionreplay
(workflow: Workflow, page: SimulatedPage)
chapter9/browser-use-rpa/workflow_validation_demo.py:55
↓ 3 callersMethodrerank
(self, query: str, documents: Sequence["Chunk"], top_k: int)
chapter7/user-memory-system-evaluation/experiment.py:339
↓ 3 callersMethodreset
(self, *, version: int = 1, fault: str = "normal")
chapter9/browser-use-rpa/local_mail_sandbox.py:28
↓ 3 callersMethodreset
Clear all cached CDP sessions with proper cleanup.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:396
↓ 3 callersMethodreset
Reset the agent's trajectory and conversation history
chapter1/context/agent.py:983
↓ 3 callersMethodreset_session
Start a new conversation session
chapter3/user-memory/conversational_agent.py:279
↓ 3 callersFunctionresume_cursor
Cursor of the newest star seen, to resume from on the next run. The page holding the newest star can never have overflowed its shard -- nothi
scripts/gen_star_history.py:259
↓ 3 callersFunctionretrieval_metrics
(retrieved: Sequence[Chunk], relevant_ids: Sequence[str])
chapter7/user-memory-system-evaluation/experiment.py:824
↓ 3 callersFunctionrow
(ids, options = {})
web-astro/scripts/evaluation-layout-kit.mjs:2
↓ 3 callersFunctionrow
(id, style = BODY)
web-astro/scripts/evaluation-overview-figures.mjs:30
↓ 3 callersFunctionrowMetrics
( kit, ids, width, { size = 14, mono = false, min = 26 } = {}, )
web-astro/scripts/coding-application-layout.mjs:92
↓ 3 callersFunctionrun
(command: list[str])
chapter5/paper-to-video/campaign.py:46
↓ 3 callersMethodrun
(self, task: dict[str, Any])
chapter7/public-health-reporting-eval/agent.py:17
↓ 3 callersMethodrun
Run the MCP server.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:1041
↓ 3 callersMethodrun
(self, user_task: str, start_stage: str = "requirements")
chapter10/staged-system-prompt/agent.py:237
↓ 3 callersFunctionrun_async
(coro)
chapter4/execution-tools/test_code_interpreter_python_runtime.py:23
← previousnext →1,401–1,500 of 13,003, ranked by callers