MCPcopy Create free account

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

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

↓ 1 callersMethod_store_object
(self, obj)
tests/test_ch5_pedo_tenant_isolation.py:24
↓ 1 callersMethod_stream_gemini_response
Stream response from Gemini with thinking mode for debugging
chapter4/multimodal-agent/agent.py:887
↓ 1 callersMethod_stream_openai_response
Stream response from OpenAI-compatible API (direct or via OpenRouter)
chapter4/multimodal-agent/agent.py:993
↓ 1 callersFunction_stream_request
(provider: str, payload: dict)
chapter5/provider-failover/streaming.py:99
↓ 1 callersMethod_stream_response
Stream response content
chapter3/agentic-rag-for-user-memory/agent.py:360
↓ 1 callersMethod_stream_response
Stream response content
chapter3/contextual-retrieval-for-user-memory/agent.py:356
↓ 1 callersFunction_strip_comments
Remove ``#`` line comments from ``code``, preserving string literals.
chapter5/coding-agent/sandbox_evaluator.py:32
↓ 1 callersFunction_strip_json_fence
(content: str)
chapter9/ai-style-skill/judge.py:38
↓ 1 callersFunction_strip_json_fence
(content: str)
chapter9/ai-style-skill/extract_rules.py:49
↓ 1 callersFunction_strip_markdown
(s: str)
chapter5/permission-embedded-data-objects/pedo/eval/regeneration_robustness.py:98
↓ 1 callersFunction_strip_response_wrappers
Remove response-only braces, quotes, and surrounding whitespace.
chapter10/generative-agents/action_arena_compat.py:28
↓ 1 callersFunction_stub
(name, **attrs)
chapter8/sesame/test_batch_inference.py:26
↓ 1 callersFunction_stub
()
chapter2/kv-cache/tests/test_negative_size.py:7
↓ 1 callersFunction_stub
()
chapter4/perception-tools/src/test_search_web_num_results_zero.py:17
↓ 1 callersFunction_stub
()
chapter4/perception-tools/src/test_grep_max_results_zero.py:10
↓ 1 callersFunction_stub
()
chapter4/perception-tools/src/test_negative_max_length.py:11
↓ 1 callersFunction_stub_evaluate_deps
()
chapter8/prompt-distillation/test_evaluate_empty_parse_rate.py:6
↓ 1 callersFunction_stub_evaluate_deps
()
chapter8/prompt-distillation/test_evaluate_none_pred_label.py:8
↓ 1 callersFunction_stub_raptor_deps
()
chapter3/structured-index/test_raptor_chunk_step.py:7
↓ 1 callersFunction_subagent_dispatch
(args)
chapter4/collaboration-tools/main.py:96
↓ 1 callersMethod_successful_call
(calls: List[Dict[str, Any]], purpose: str)
chapter3/user-memory/run_evaluation.py:228
↓ 1 callersFunction_sum_usage
(receipts: list[dict[str, Any]])
chapter9/browser-use-rpa/run_experiment_9_5.py:126
↓ 1 callersMethod_switch_tab
Switch to a different tab.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:886
↓ 1 callersFunction_sync
(device: Any)
chapter8/prompt-distillation/run_experiment_8_8.py:500
↓ 1 callersFunction_table_name
(text)
chapter9/harness-safety-gate/stable/tool_dispatcher.py:70
↓ 1 callersMethod_take_item
Pick up an item.
chapter1/learning-from-experience/game_environment.py:318
↓ 1 callersFunction_task_artifacts
(task_dir: Path)
chapter4/active-tool-discovery/run_exact_experiment.py:485
↓ 1 callersFunction_terminal_transcript
Return the terminal header and prompt/output transcript from one cell. The historical Markdown has one stray closing fence immediately before the
chapter8/MiniMind-pretrain/validation/run_training_report_audit.py:116
↓ 1 callersMethod_terminate_process
(self, state: TaskState)
chapter6/async-agent/tasks.py:126
↓ 1 callersMethod_text
(schema: dict[str, Any])
chapter4/active-tool-discovery/run_exact_experiment.py:244
↓ 1 callersFunction_text_of
(provider: str, response: dict)
chapter5/provider-failover/run_continuation.py:103
↓ 1 callersFunction_to_openrouter_model
把模型名映射成 OpenRouter id:含 '/' 视为原生 id;gpt-* -> openai/*; claude-* -> anthropic/claude-opus-4.8;其余回退到 openai/gpt-5.6-luna。
chapter7/tts-quality-eval/pipeline.py:59
↓ 1 callersFunction_to_openrouter_model
把模型名映射成 OpenRouter id:含 '/' 视为原生 id;gpt-* -> openai/*; claude-* -> anthropic/claude-opus-4.8;其余回退到 openai/gpt-5.6-luna。
chapter7/agent-cost-analysis/config.py:34
↓ 1 callersFunction_to_openrouter_model
把模型名映射成 OpenRouter id:含 '/' 视为原生 id;gpt-* -> openai/*; claude-* -> anthropic/claude-opus-4.8;其余回退到 openai/gpt-5.6-luna。
chapter7/model-benchmark/benchmark.py:42
↓ 1 callersFunction_to_openrouter_model
Translate an internal model id into an OpenRouter model id.
chapter7/elo-leaderboard/llm_judge.py:72
↓ 1 callersFunction_to_openrouter_model
把常见模型名映射到 OpenRouter 命名空间。
chapter9/prompt-auto-optimization/config.py:73
↓ 1 callersFunction_to_openrouter_model
把常见模型名映射到 OpenRouter 命名空间。
chapter9/self-evolving-tools/agent.py:42
↓ 1 callersFunction_to_openrouter_model
把模型名映射到 OpenRouter 命名空间(用于无 OPENAI_API_KEY 的回退路径)。
chapter10/book-translation/agents.py:45
↓ 1 callersFunction_to_openrouter_model
把模型名映射到 OpenRouter 命名空间(用于无 OPENAI_API_KEY 的回退路径)。
chapter10/staged-system-prompt/config.py:19
↓ 1 callersFunction_to_openrouter_model
把模型名映射到 OpenRouter 命名空间(用于无 OPENAI_API_KEY 的回退路径)。
chapter10/multi-role-transfer/demo.py:35
↓ 1 callersFunction_to_openrouter_model
把常见模型名映射到 OpenRouter 命名空间(用于无 OPENAI_API_KEY 的兜底路径)。
chapter4/active-tool-discovery/demo.py:32
↓ 1 callersMethod_togglePlay
()
extras/agent-lab/agent-trajectory.js:387
↓ 1 callersFunction_tokenize
粗粒度分词:ASCII 词(如 ADDPS、CR4、XMM)整体保留,中文按单字切。
chapter3/structured-index/structured_vs_flat_demo.py:88
↓ 1 callersFunction_tokens
切换之后目标厂商实际吃进去和吐出来的 token。
chapter5/provider-failover/summarize.py:20
↓ 1 callersFunction_tokens
把中英文混合文本切成词袋 token:英文按词(并拆下划线),中文按字 unigram + bigram。
chapter4/active-tool-discovery/offline_backend.py:36
↓ 1 callersFunction_tool
(name: str, description: str, properties: dict, required: list)
chapter10/staged-system-prompt/tools.py:223
↓ 1 callersFunction_tool
构造一个 OpenAI function-calling tool schema。
chapter4/active-tool-discovery/tools_library.py:25
↓ 1 callersFunction_tool_call
(response: dict[str, Any])
chapter10/autonomous-phone-registration/validate_acceptance.py:86
↓ 1 callersFunction_tool_call_msg
(name, arguments)
tests/test_ch10_multi_role_transfer_unhashable_target.py:20
↓ 1 callersFunction_tool_call_msg
(name, arguments)
chapter10/multi-role-transfer/tests/test_tool_dispatch_errors.py:18
↓ 1 callersMethod_tool_delete_memory
Delete a memory
chapter3/user-memory/agent.py:571
↓ 1 callersMethod_tool_execute_command
Execute shell command
chapter6/agent-with-event-trigger/agent.py:967
↓ 1 callersFunction_tool_fragment
(index, *, call_id=None, name=None, arguments=None)
chapter2/local_llm_serving/test_parallel_tools.py:82
↓ 1 callersMethod_tool_read_file
Read file contents with optional line-based reading
chapter6/agent-with-event-trigger/agent.py:836
↓ 1 callersMethod_tool_rewrite_todo_list
Rewrite TODO list with new pending items
chapter6/agent-with-event-trigger/agent.py:1013
↓ 1 callersFunction_tool_success
(payload: Any, mcp_is_error: bool)
chapter4/perception-tools/run_experiment_4_2.py:322
↓ 1 callersFunction_tool_text
(tool: Dict)
chapter4/active-tool-discovery/discovery.py:27
↓ 1 callersFunction_tool_turns
(trajectory: dict[str, Any], tool: str)
chapter5/log-diagnosis/campaign.py:299
↓ 1 callersFunction_tool_turns
(traj: Dict[str, Any], tool: str)
chapter5/log-diagnosis/replay.py:48
↓ 1 callersMethod_tool_update_memory
Update an existing memory
chapter3/user-memory/agent.py:510
↓ 1 callersMethod_tool_update_todo_status
Update status of TODO items
chapter6/agent-with-event-trigger/agent.py:1038
↓ 1 callersMethod_tool_write_file
Write content to file
chapter6/agent-with-event-trigger/agent.py:921
↓ 1 callersMethod_tools
暴露给模型的工具 = 五个基础工具 + 本轮已解锁(经 search_tools 命中或刚创建)的工具。
chapter9/self-evolving-tools/agent.py:225
↓ 1 callersMethod_tools
(self)
chapter1/search-codegen/agent.py:65
↓ 1 callersMethod_tools_for_current_role
当前角色可见的工具 = 专属工具集 + transfer_to_agent。
chapter10/multi-role-transfer/orchestrator.py:83
↓ 1 callersFunction_trace
(spans: list[dict], **extra)
tests/test_ch6_cost_efficiency_analyzer.py:59
↓ 1 callersFunction_trace
(spans: list[dict], **extra)
tests/test_ch7_cost_efficiency_analyzer.py:59
↓ 1 callersFunction_trace_step
(index: int, result: Any, elapsed_s: float, secrets: list[str])
chapter7/android-world/run_controlled_experiment.py:1053
↓ 1 callersMethod_track_download
Track a completed download and dispatch the appropriate event. Args: file_path: The path to the downloaded file
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/downloads_watchdog.py:273
↓ 1 callersMethod_track_session
Track a browser session for management.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:912
↓ 1 callersFunction_tracked_paths
()
scripts/git_revision_dates.py:70
↓ 1 callersMethod_transcribe
(self, path: Path)
chapter10/voice-werewolf/werewolf/simulator.py:187
↓ 1 callersFunction_transition_signatures
(calls: list[tuple[str, dict]])
chapter10/multi-role-transfer/evaluation.py:60
↓ 1 callersMethod_trigger_framework_events
Trigger framework-aware DOM events after text input completion. This is critical for modern JavaScript frameworks (React, Vue, Angular, etc.)
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/default_action_watchdog.py:1169
↓ 1 callersMethod_trigger_matches
(self, trigger: str, tool_name: str)
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/agentspec_baseline.py:86
↓ 1 callersMethod_try_crafting
Try to craft items (hidden mechanic).
chapter1/learning-from-experience/game_environment.py:423
↓ 1 callersFunction_try_parse
(txt: str)
chapter9/browser-use-rpa/browser-use/examples/apps/news-use/news_monitor.py:141
↓ 1 callersMethod_tts
(self, speaker: str, text: str, round_no: int)
chapter10/voice-werewolf/werewolf/human.py:60
↓ 1 callersFunction_turn_precedes
(candidate: Any, turn: Any)
chapter9/trajectory-verifier/customer_service_env.py:174
↓ 1 callersMethod_type_text
Type text into an element.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:720
↓ 1 callersMethod_type_to_page
Type text to the page (whatever element currently has focus). This is used when index is 0 or when an element can't be found.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/default_action_watchdog.py:580
↓ 1 callersFunction_typical_value
把某列在簇内的原始均值翻译成人话。
chapter3/structured-knowledge-extraction/archetypes.py:185
↓ 1 callersFunction_unique_urls
(text: str)
chapter10/multi-role-transfer/evaluation.py:56
↓ 1 callersFunction_units
Split a string into wrap units: latin words, single spaces, and single wide chars (each wide char is an independent break opportunity).
book-en/svg_lib.py:125
↓ 1 callersFunction_units
Split a string into wrap units: latin words, single spaces, and single wide chars (each wide char is an independent break opportunity).
book-tr/svg_lib.py:125
↓ 1 callersFunction_units
Split a string into wrap units: latin words, single spaces, and single wide chars (each wide char is an independent break opportunity).
book-ar/svg_lib.py:141
↓ 1 callersFunction_units
Split a string into wrap units: latin words, single spaces, and single wide chars (each wide char is an independent break opportunity).
book-ru/svg_lib.py:125
↓ 1 callersFunction_units
Split a string into wrap units: latin words, single spaces, and single wide chars (each wide char is an independent break opportunity).
book-es/svg_lib.py:125
↓ 1 callersFunction_units
Мөрийг таслах нэгжүүдэд хуваана: латин үг, дан зай, нэг нэг өргөн тэмдэгт (өргөн тэмдэгт бүр бие даасан мөр таслах боломж болно).
book-mn/svg_lib.py:125
↓ 1 callersFunction_units
Split a string into wrap units: latin words, single spaces, and single wide chars (each wide char is an independent break opportunity).
book-id/svg_lib.py:125
↓ 1 callersMethod_update_action_indices
Update action indices based on current page state. Returns updated action or None if element cannot be found.
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:1911
↓ 1 callersMethod_update_action_models_for_page
Update action models with page-specific actions
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:2058
↓ 1 callersMethod_update_agent_history_description
Update the agent history description
chapter9/browser-use-rpa/browser-use/browser_use/agent/message_manager/service.py:173
↓ 1 callersMethod_update_available_file_paths
Update available_file_paths with downloaded files.
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:496
↓ 1 callersMethod_update_statistics
Update index statistics
chapter3/sparse-embedding/bm25_engine.py:196
↓ 1 callersFunction_usage_is_complete
(result: dict[str, Any])
chapter5/agent-creator/validator.py:254
↓ 1 callersFunction_usage_totals
(api_calls: list[dict])
chapter10/multi-role-transfer/run_comparison.py:77
↓ 1 callersMethod_use_item
Use an item.
chapter1/learning-from-experience/game_environment.py:357
↓ 1 callersFunction_utc
()
chapter5/video-edit/campaign.py:40
↓ 1 callersFunction_utc
()
chapter5/log-diagnosis/campaign.py:49
← previousnext →4,001–4,100 of 13,003, ranked by callers