MCPcopy Create free account

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

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

↓ 2 callersFunctionvisible_files
(root: Path)
chapter7/model-action-threshold/experiment.py:173
↓ 2 callersMethodvote
投票放逐。返回票投给谁(或弃票 none)。
chapter10/voice-werewolf/werewolf/agent.py:209
↓ 2 callersFunctionwait_for
(check: Callable[[], Any], timeout: float, label: str)
chapter6/phone-agent/run_acceptance.py:44
↓ 2 callersFunctionwalk
(node)
web-astro/src/lib/book-markdown.mjs:15
↓ 2 callersFunctionweighted_score_fusion
Fuse multiple ranked lists with weighted, min-max normalized scores. Each source list is min-max normalized to [0, 1] independently, then the
chapter3/retrieval-pipeline/fusion.py:94
↓ 2 callersFunctionwidth
(text: str)
chapter7/model-benchmark/demo.py:65
↓ 2 callersMethodwolves_send
狼人专属信息:只进入**所有狼人**的上下文。
chapter10/voice-werewolf/werewolf/game.py:122
↓ 2 callersFunctionworkspace_inventory
(root: Path)
chapter2/prompt-injection/run_campaign.py:77
↓ 2 callersFunctionwrite_bpy_script
生成 bpy 脚本并落盘(无论用哪个后端都会产出,作为代码生成产物)。
chapter5/video-edit/blender_editor.py:167
↓ 2 callersFunctionwrite_candidate
Write only to a candidate artifact path, never over the stable module.
chapter9/self-modifying-agent/evolution.py:319
↓ 2 callersFunctionwrite_candidate
只写候选制品路径,绝不覆盖稳定模块。
chapter9/harness-safety-gate/evolution.py:541
↓ 2 callersFunctionwrite_checkpoint
(path, experiment, records)
chapter7/user-memory-system-evaluation/test_run_full.py:31
↓ 2 callersMethodwrite_file_content
Update internal content (formatted)
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:37
↓ 2 callersFunctionwrite_json
(path: Path, value: Any)
chapter6/async-agent/run_real_experiment.py:36
↓ 2 callersFunctionwrite_json
(path, value)
chapter6/astra-async-steering/validation/runs/pilot-20260905-v1/source/experiment.py:52
↓ 2 callersFunctionwrite_json
(path, value)
chapter6/astra-async-steering/validation/runs/exp6-14-20260905-formal/source/experiment.py:52
↓ 2 callersFunctionwrite_json
(path, value)
chapter6/astra-async-steering/validation/runs/pilot-20260905-v2/source/experiment.py:52
↓ 2 callersFunctionwrite_json
(path: Path, value: Any)
chapter4/collaboration-tools/run_experiment_4_5.py:187
↓ 2 callersFunctionwrite_json
(path: Path, value: Any)
chapter4/perception-tools/run_experiment_4_2.py:107
↓ 2 callersFunctionwrite_json
(path: Path, value: Any)
chapter4/execution-tools/run_experiment_4_4.py:33
↓ 2 callersFunctionwrite_output
(path: str, meta: dict, summaries: list[ProviderSummary])
chapter7/model-benchmark/demo.py:190
↓ 2 callersFunctionwrite_skill
(rules: List[Dict[str, Any]], skill_dir: Path | None = None)
chapter9/ai-style-skill/skill_manager.py:114
↓ 1 callersMethod__aenter__
Async context manager entry.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/client.py:537
↓ 1 callersMethod__aenter__
(self)
chapter4/perception-tools/test_xquik_tools.py:46
↓ 1 callersMethod__aexit__
Async context manager exit.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/client.py:542
↓ 1 callersMethod__aexit__
(self, *_args: object)
chapter4/perception-tools/test_xquik_tools.py:49
↓ 1 callersMethod__init__
(self, connection, dictionaries=False)
tests/test_ch5_pedo_atomic_delete.py:29
↓ 1 callersMethod__init__
(self, record: dict[str, Any])
chapter6/phone-agent/webrtc_app.py:147
↓ 1 callersMethod__init__
(self, dsn: str, access_token: str, *, timeout: float = 45, transport: httpx.BaseTransport |
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:112
↓ 1 callersMethod__init__
(self, fifo_path: str)
chapter9/browser-use-rpa/browser-use/browser_use/logging_config.py:242
↓ 1 callersMethod__init__
( self, message: str, status_code: int = 502, model: str | None = None, )
chapter9/browser-use-rpa/browser-use/browser_use/llm/exceptions.py:8
↓ 1 callersMethod__init__
(self, out_dir: str, *, provider: str = "auto")
chapter10/voice-werewolf/werewolf/simulator.py:53
↓ 1 callersMethod__init__
(self, out_dir: str, *, allow_interruptions: bool = True)
chapter10/voice-werewolf/werewolf/human.py:30
↓ 1 callersMethod__init__
Initialize the game environment. Args: seed: Random seed for reproducibility stochastic: If True, ad
chapter1/learning-from-experience/game_environment.py:48
↓ 1 callersMethod__init_subclass__
(cls)
chapter2/prompt-engineering/tau_bench/model_utils/api/api.py:75
↓ 1 callersMethod__str__
Representation of the AgentHistoryList object
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:388
↓ 1 callersFunction_absorb
(provider: str, event: dict, state: Partial)
chapter5/provider-failover/streaming.py:116
↓ 1 callersFunction_academic
(name: str, query: str, options: dict[str, Any])
chapter4/perception-tools/src/expanded_catalog.py:668
↓ 1 callersFunction_acc
(group)
chapter9/prompt-auto-optimization/evaluate.py:113
↓ 1 callersFunction_accepts_language
(fn: Any)
chapter8/MultilingualReasoning/evaluate_multilingual.py:147
↓ 1 callersMethod_ack_screencast_frame
Asynchronously acknowledges a screencast frame.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/recording_watchdog.py:105
↓ 1 callersFunction_action_claim_evidence
Compare the sandbox's action facts with an actual prior successful call. This parses numeric money, sandbox order IDs and ISO dates only; unf
chapter9/trajectory-verifier/verifier.py:77
↓ 1 callersFunction_action_message
(payload: Any)
chapter4/perception-tools/run_experiment_4_2.py:285
↓ 1 callersFunction_action_metadata
(payload: Any)
chapter4/perception-tools/run_experiment_4_2.py:291
↓ 1 callersMethod_add_compound_components
Enhance compound controls with information from their child components.
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/serializer.py:127
↓ 1 callersFunction_add_content_slide
(prs, title, bullets)
chapter2/agent-skills-ppt/skills/pptx/scripts/generate_pptx.py:74
↓ 1 callersFunction_add_month
返回下个月的 1 号(d 需为某月 1 号)。
chapter5/erp-agent/seed.py:33
↓ 1 callersFunction_add_overlay_to_image
Add step number and goal overlay to an image.
chapter9/browser-use-rpa/browser-use/browser_use/agent/gif.py:292
↓ 1 callersFunction_add_rating_args
(parser: argparse.ArgumentParser)
chapter7/elo-leaderboard/cli.py:269
↓ 1 callersFunction_add_source_args
(parser: argparse.ArgumentParser)
chapter7/elo-leaderboard/cli.py:241
↓ 1 callersFunction_add_title_slide
(prs, title, subtitle)
chapter2/agent-skills-ppt/skills/pptx/scripts/generate_pptx.py:45
↓ 1 callersMethod_advance_simulated_time
Advance simulated time for demo purposes
chapter6/agent-with-event-trigger/agent.py:467
↓ 1 callersMethod_advance_simulated_time
Advance simulated time for demo purposes
chapter2/system-hint/agent.py:221
↓ 1 callersFunction_all_text
(sources: dict)
chapter5/conversational-ui/demo.py:42
↓ 1 callersMethod_analyze_comparison
Analyze comparison results to highlight improvements
chapter3/contextual-retrieval/contextual_tools.py:503
↓ 1 callersMethod_analyze_with_doubao
Use Doubao for content analysis
chapter4/multimodal-agent/agent.py:167
↓ 1 callersMethod_analyze_with_gemini_audio
Use Gemini for audio analysis with thinking mode
chapter4/multimodal-agent/agent.py:195
↓ 1 callersMethod_analyze_with_gemini_pdf
Use Gemini for PDF analysis with thinking mode
chapter4/multimodal-agent/agent.py:248
↓ 1 callersMethod_analyze_with_openai
Use OpenAI (or OpenRouter fallback) for content analysis
chapter4/multimodal-agent/agent.py:133
↓ 1 callersMethod_announce
(self, winner: Faction)
chapter10/voice-werewolf/werewolf/game.py:454
↓ 1 callersFunction_answer_ok
(text: str)
chapter5/provider-failover/judging.py:67
↓ 1 callersFunction_anthropic
(trace: Trace, arm: str, tools: list[dict], model: str, system: str | None)
chapter5/provider-failover/renderers.py:93
↓ 1 callersFunction_anthropic_blocks
(step, arm: str, ids: dict, i: int)
chapter5/provider-failover/renderers.py:117
↓ 1 callersFunction_app_versions
(evidence: dict[str, Any])
chapter7/android-world/merge_candidate_shards.py:48
↓ 1 callersFunction_append_assistant_prefix
把半截输出作为末尾的 assistant 消息挂上去,让模型接着写。
chapter5/provider-failover/run_continuation.py:58
↓ 1 callersFunction_append_boundary
(evidence: dict[str, Any], message: str)
chapter7/android-world/run_controlled_experiment.py:1376
↓ 1 callersFunction_append_user
(provider: str, payload: dict, text: str)
chapter5/provider-failover/run_continuation.py:71
↓ 1 callersMethod_applyTheme
()
extras/agent-lab/agent-trajectory.js:286
↓ 1 callersMethod_apply_bounding_box_filtering
Filter children contained within propagating parent bounds.
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/serializer.py:575
↓ 1 callersFunction_apply_cli_overrides
把命令行参数覆盖到配置上(未指定的项保持默认,不改变原有行为)。
chapter3/agentic-rag-for-user-memory/main.py:585
↓ 1 callersFunction_apply_global_env
把全局开关写入环境变量,供 config.py 在导入时读取。 config.Config 在模块导入时读取环境变量,因此所有涉及配置的模块都必须在此 函数执行之后才导入(本文件中的工具模块均为函数内延迟导入)。
chapter4/execution-tools/cli.py:58
↓ 1 callersMethod_apply_minimal_extension_patch
Minimal patch: pre-populate chrome.storage.local with configurable domain whitelist.
chapter9/browser-use-rpa/browser-use/browser_use/browser/profile.py:927
↓ 1 callersMethod_apply_transition
真正执行阶段切换:注入跨阶段交接的 user 消息 + 切换 self.stage。 返回 True 表示整个任务结束。
chapter10/staged-system-prompt/agent.py:431
↓ 1 callersFunction_arm_a11y_method
(args: argparse.Namespace, arm: str)
chapter7/android-world/run_controlled_experiment.py:672
↓ 1 callersFunction_arm_guidelines
(args: argparse.Namespace, arm: str, task_name: str)
chapter7/android-world/run_controlled_experiment.py:684
↓ 1 callersFunction_arm_request
(page: Page, arm: str)
chapter6/phone-agent/run_acceptance.py:97
↓ 1 callersFunction_artifact_entry
(path: Path)
chapter5/cad-vs-diffusion/run_experiment.py:34
↓ 1 callersFunction_assert_all
(page: SimulatedPage, predicates: Iterable[StatePredicate], location: str)
chapter9/browser-use-rpa/workflow_validation_demo.py:45
↓ 1 callersMethod_assign_interactive_indices_and_mark_new_nodes
Assign interactive indices to clickable elements that are also visible.
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/serializer.py:544
↓ 1 callersFunction_assistant_message
(message: Any)
chapter9/trajectory-verifier/customer_service_env.py:106
↓ 1 callersMethod_assistant_message
(message: Any)
chapter5/agent-creator/reference_agent/agent.py:45
↓ 1 callersMethod_attack
Attack with a weapon.
chapter1/learning-from-experience/game_environment.py:378
↓ 1 callersFunction_attribute_name
(node: ast.AST)
chapter5/agent-creator/validator.py:70
↓ 1 callersMethod_audit_terminology
Audit domain terminology mapping consistency.
chapter10/book-translation/consistency_auditor.py:181
↓ 1 callersMethod_available
(python: str)
chapter6/phone-agent/speech.py:169
↓ 1 callersFunction_avg_ttft
Average TTFT across iterations, falling back to first-iteration TTFT.
chapter2/kv-cache/main.py:70
↓ 1 callersFunction_backend
(provider: str)
chapter5/log-diagnosis/campaign.py:80
↓ 1 callersMethod_backend_identity
Name the endpoint that answered -- or failed to. A failed arm is still evidence, and evidence that does not say which model was asked
chapter1/context/agent.py:965
↓ 1 callersFunction_backends
()
chapter10/voice-werewolf/werewolf/strategy_audit.py:70
↓ 1 callersFunction_backends
()
chapter10/parallel-web-research/llm.py:14
↓ 1 callersMethod_background_auth
Run authentication in background or show cloud URL if already authenticated
chapter9/browser-use-rpa/browser-use/browser_use/sync/service.py:125
↓ 1 callersMethod_background_shell_command
Build a one-shot shell command for a background process.
chapter5/coding-agent/tools/shell_session.py:357
↓ 1 callersFunction_base_evidence
(args: argparse.Namespace, run_id: str)
chapter7/android-world/run_controlled_experiment.py:1164
↓ 1 callersFunction_battle_stats
统计每个模型的对战场数与胜场(平局按 0.5 计)。
chapter7/elo-leaderboard/cli.py:67
↓ 1 callersFunction_billable_tokens
Illustrative billable prompt tokens under a prompt-cache discount. cached tokens are charged at cache_price_ratio of the normal price; the re
chapter2/kv-cache/main.py:81
↓ 1 callersMethod_body
(self)
chapter5/log-diagnosis/http_service.py:46
↓ 1 callersMethod_body
(self)
chapter5/log-diagnosis/validation/runs/exp5-8-live-http-mcp-20260730-053403/http_service.py:46
↓ 1 callersMethod_body
(self)
chapter5/log-diagnosis/validation/runs/exp5-8-live-http-mcp-20260730-053056/http_service.py:46
↓ 1 callersFunction_bootstrap_android_world
Imports a source checkout while generating absent protobufs in /tmp.
chapter7/android-world/run_controlled_experiment.py:198
↓ 1 callersFunction_bounded_string
(value: Any, secrets: list[str], limit: int = 1200)
chapter7/android-world/run_controlled_experiment.py:831
← previousnext →2,901–3,000 of 13,003, ranked by callers