MCPcopy Create free account

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

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

↓ 1 callersFunction_client
(provider: str)
chapter9/harness-safety-gate/llm_generator.py:33
↓ 1 callersMethod_client
(self)
chapter9/browser-use-rpa/browser-use/browser_use/llm/deepseek/chat.py:50
↓ 1 callersFunction_clients_and_models
()
chapter10/autonomous-phone-registration/decision.py:15
↓ 1 callersMethod_close_all_sessions
Close all active browser sessions.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:980
↓ 1 callersMethod_close_browser
Close the browser session.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:863
↓ 1 callersMethod_close_extension_options_pages
Close any extension options/welcome pages that have opened.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1772
↓ 1 callersMethod_close_tab
Close a specific tab.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:899
↓ 1 callersFunction_code
(query: str, options: dict[str, Any])
chapter4/perception-tools/src/expanded_catalog.py:912
↓ 1 callersFunction_coerce
把命令行传入的字符串按函数注解转换成合适的类型。
chapter4/perception-tools/cli.py:195
↓ 1 callersMethod_coerce_float
(value: Any)
chapter7/agent-cost-analysis/cost_efficiency_analyzer.py:149
↓ 1 callersMethod_coerce_int
Coerce nullable/numeric JSON values to int (None -> 0).
chapter7/agent-cost-analysis/cost_efficiency_analyzer.py:139
↓ 1 callersFunction_collect_app_provenance
Records the exact official app-package state visible to the benchmark.
chapter7/android-world/run_controlled_experiment.py:256
↓ 1 callersFunction_collect_artifacts
(paths)
chapter5/cad-vs-diffusion/run_experiment.py:38
↓ 1 callersMethod_combine_results
Combine dense and sparse results for reranking. Args: dense_results: Results from dense search sparse_results
chapter3/retrieval-pipeline/retrieval_pipeline.py:189
↓ 1 callersFunction_command_receipt
(path: str)
chapter6/phone-agent/speech.py:52
↓ 1 callersFunction_commit_microphone
(runtime: CallRuntime)
chapter6/phone-agent/webrtc_app.py:496
↓ 1 callersMethod_complaint
(self, email: dict[str, Any])
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:393
↓ 1 callersFunction_completion_params_for
按模型返回安全的采样参数。 Moonshot kimi-k3 是【推理模型】:必须 temperature=1 且 max_tokens>=2048, 否则可能报错或截断。其余模型用 temperature=0.2 保证决策稳定。
chapter6/async-agent/demo.py:40
↓ 1 callersFunction_compute_bradley_terry
Bradley-Terry MLE 评分(可选 bootstrap 置信区间)。
chapter7/elo-leaderboard/cli.py:93
↓ 1 callersFunction_compute_online_elo
在线增量 Elo(按记录顺序处理),返回带 model/rating 列的 DataFrame。
chapter7/elo-leaderboard/cli.py:84
↓ 1 callersFunction_config
(tmp_path: Path)
tests/test_site_edit_urls.py:25
↓ 1 callersFunction_configure_mcp_server_logging
Configure logging for MCP server mode - redirect all logs to stderr to prevent JSON RPC interference.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:59
↓ 1 callersFunction_consume_microphone
(track: Any, runtime: CallRuntime)
chapter6/phone-agent/webrtc_app.py:422
↓ 1 callersFunction_contains_all
(text: str, expected: list[str])
chapter5/agent-creator/validator.py:217
↓ 1 callersFunction_contains_in_order
Return whether ``required`` occurs as an ordered subsequence.
chapter10/multi-role-transfer/evaluation.py:47
↓ 1 callersMethod_content_from_call
(call: Dict[str, Any])
chapter3/user-memory/run_evaluation.py:242
↓ 1 callersMethod_context_aware_summary
Strategy 3: Context-aware summarization considering the query
chapter2/context-compression/compression_strategies.py:454
↓ 1 callersMethod_context_aware_with_citations
Strategy 4: Context-aware summarization with citations
chapter2/context-compression/compression_strategies.py:559
↓ 1 callersMethod_context_for_create
(self, obj: DataObject, accessor: AccessContext)
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/agentspec_wrap.py:198
↓ 1 callersMethod_convert_initial_actions
Convert dictionary-based actions to ActionModel instances
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:1988
↓ 1 callersMethod_convert_to_openai_format
Convert Anthropic message format to OpenAI format
chapter5/coding-agent/agent.py:421
↓ 1 callersMethod_convert_tools_to_openai_format
Convert Anthropic tool format to OpenAI format
chapter5/coding-agent/agent.py:473
↓ 1 callersFunction_cosine
(a: List[float], b: List[float])
chapter4/active-tool-discovery/discovery.py:32
↓ 1 callersFunction_cosine
(a: Dict[str, int], b: Dict[str, int])
chapter3/structured-index/structured_vs_flat_demo.py:95
↓ 1 callersMethod_cosine
(left: list[float], right: list[float])
chapter4/active-tool-discovery/run_exact_experiment.py:263
↓ 1 callersMethod_cost_usd
USD cost for one turn given per-million-token pricing.
chapter7/agent-cost-analysis/cost_efficiency_analyzer.py:113
↓ 1 callersFunction_count_by
(issues: list[QualityIssue], key)
chapter8/cot-distillation/sft_data_auditor.py:647
↓ 1 callersMethod_count_excluded_nodes
Count how many nodes were excluded (for debugging).
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/serializer.py:706
↓ 1 callersFunction_covered
返回被检索结果命中的金标准法条列表。
chapter3/agentic-rag/compare_offline.py:34
↓ 1 callersFunction_covered_markers
判断每条决定性事实是否被检索到的文本覆盖。
chapter3/agentic-rag-for-user-memory/offline_demo.py:83
↓ 1 callersMethod_create_basic_chunks
Create basic chunks using traditional chunking
chapter3/contextual-retrieval/contextual_chunking.py:179
↓ 1 callersMethod_create_chunk
Create a LegalChunk object
chapter3/agentic-rag/index_local_laws.py:218
↓ 1 callersMethod_create_client
Create OpenAI-compatible client.
chapter3/user-memory-evaluation/evaluator.py:42
↓ 1 callersMethod_create_default_files
Create default results and todo files
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:205
↓ 1 callersFunction_create_issues_via_mcp
通过 stdio 连接官方 GitHub MCP Server,逐个调用 create_issue 工具。 返回创建成功的 Issue URL 列表。需要已安装 `mcp` Python SDK 与可用的 GitHub MCP Server(默认 Docker 镜像,可用 GITH
chapter5/log-diagnosis/github_mcp.py:95
↓ 1 callersMethod_create_item
Create an item by name.
chapter1/learning-from-experience/game_environment.py:468
↓ 1 callersMethod_create_sample_chunks
Create sample conversation chunks for demo
chapter3/contextual-retrieval-for-user-memory/main.py:182
↓ 1 callersMethod_create_sample_test_cases
Create sample test cases based on LOCOMO structure
chapter3/user-memory/locomo_benchmark.py:69
↓ 1 callersMethod_create_simplified_tree
Step 1: Create a simplified tree with enhanced element detection.
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/serializer.py:424
↓ 1 callersMethod_create_system_message
Create system message explaining active tool discovery.
chapter4/active-tool-selection/agent.py:111
↓ 1 callersMethod_create_system_prompt
()
chapter1/search-codegen/agent.py:47
↓ 1 callersFunction_create_task_frame
Create initial frame showing the task.
chapter9/browser-use-rpa/browser-use/browser_use/agent/gif.py:212
↓ 1 callersFunction_credential_free
(payload: Any, extra_env: dict[str, str] | None)
chapter5/agent-creator/validator.py:267
↓ 1 callersFunction_credential_scan
(paths: list[Path])
chapter6/phone-agent/run_acceptance.py:180
↓ 1 callersFunction_custom_task_score
Score task-specific observable gates without inferring hidden reasoning.
chapter10/multi-role-transfer/evaluation.py:67
↓ 1 callersFunction_cut_here
(state: Partial, where: str, limits: dict)
chapter5/provider-failover/streaming.py:35
↓ 1 callersFunction_declared_simulation_markers
Scan provenance-like fields, not arbitrary fetched page text.
chapter4/perception-tools/run_experiment_4_2.py:295
↓ 1 callersMethod_decode_audio
Decode generated token IDs into audio waveforms. Args: generated_ids: Tensor of generated token IDs
chapter8/orpheus/inference.py:150
↓ 1 callersFunction_default_image
()
chapter9/self-modifying-agent/candidate_sandbox.py:29
↓ 1 callersFunction_default_slug
(config: Any)
scripts/split_search_index.py:96
↓ 1 callersFunction_default_temperature
()
chapter9/prompt-auto-optimization/config.py:211
↓ 1 callersMethod_delete_in_transaction
(self, object_id: str, accessor: AccessContext, reaction_depth: int)
chapter5/permission-embedded-data-objects/pedo/core/store.py:322
↓ 1 callersMethod_delete_object
(self, object_id: str)
chapter5/permission-embedded-data-objects/pedo/core/store.py:669
↓ 1 callersFunction_demo
()
chapter4/collaboration-tools/main.py:205
↓ 1 callersFunction_demo
(offline: bool)
chapter4/perception-tools/cli.py:337
↓ 1 callersFunction_describe_detector
(detector: Dict[str, Any])
chapter9/ai-style-skill/skill_manager.py:69
↓ 1 callersMethod_describe_known
(self, known)
chapter3/structured-knowledge-extraction/advisor_agent.py:93
↓ 1 callersFunction_detect_holes
Z 向中截面轮廓分析:返回孔列表 [{diameter_mm, radius_mm}]。
chapter5/cad-vs-diffusion/measure.py:42
↓ 1 callersMethod_detect_patterns
Return the ordered list of risk-pattern labels found in ``code``.
chapter5/coding-agent/sandbox_evaluator.py:220
↓ 1 callersFunction_detect_sensitive_key_name
Detect which sensitive key name corresponds to the given text value.
chapter9/browser-use-rpa/browser-use/browser_use/tools/service.py:68
↓ 1 callersMethod_direct_capture
Should not be thread blocking because posthog magically handles it
chapter9/browser-use-rpa/browser-use/browser_use/telemetry/service.py:67
↓ 1 callersFunction_dispatch
把模型的工具调用路由到对应模式的环境方法。
chapter5/small-model-codified-rules/agent.py:175
↓ 1 callersMethod_dispatch
执行一次工具调用,并记录轨迹。
chapter9/self-evolving-tools/agent.py:251
↓ 1 callersMethod_dispatcher
事件分流:实现设计文档 5.1 的两种处理机制。
chapter6/async-agent/runtime.py:198
↓ 1 callersFunction_document
(name: str, query: str, options: dict[str, Any])
chapter4/perception-tools/src/expanded_catalog.py:742
↓ 1 callersFunction_download
(path: str)
chapter5/code-for-logic/build_hf_puzzles.py:42
↓ 1 callersFunction_download
(url: str, destination: Path)
chapter5/paper-to-ppt/paper_source.py:70
↓ 1 callersMethod_download_and_convert_image
Download an image from URL and convert to base64 bytes.
chapter9/browser-use-rpa/browser-use/browser_use/llm/aws/serializer.py:61
↓ 1 callersMethod_download_extension
Download extension .crx file.
chapter9/browser-use-rpa/browser-use/browser_use/browser/profile.py:991
↓ 1 callersFunction_drawtext
(text, size, y_expr, color="white", box=False)
chapter5/video-edit/make_test_video.py:24
↓ 1 callersMethod_drop_item
Drop an item.
chapter1/learning-from-experience/game_environment.py:347
↓ 1 callersFunction_dry_first_draft
脚本化“拥挤初稿”:把整篇论文压进约 4 页,每页塞多段原文(必然溢出)。
chapter5/paper-to-ppt/demo.py:225
↓ 1 callersFunction_dry_revised
脚本化“修订稿”:一段一页、要点化,图表单独成页——明显更宽松,可通过启发式。
chapter5/paper-to-ppt/demo.py:242
↓ 1 callersFunction_dump
(value: Any)
chapter9/trajectory-verifier/evidence_client.py:20
↓ 1 callersFunction_duration
(path: Path)
chapter6/controllable-tts/voice_library.py:46
↓ 1 callersFunction_edit_distance
Levenshtein 距离(字符级)。
chapter7/tts-quality-eval/pipeline.py:307
↓ 1 callersFunction_edition_tables
Return (prefix table, suffix->slug map) derived from `extra.languages`. The prefix table is sorted longest-first so `book-en/` wins over `book/`
scripts/split_search_index.py:50
↓ 1 callersMethod_emit
记录一条 ReAct 轨迹步骤,并在 verbose 模式下实时打印。
chapter1/web-search-agent/agent.py:156
↓ 1 callersFunction_encode_sft
(tokenizer: Any, messages: list[dict[str, str]], max_length: int)
chapter8/prompt-distillation/run_experiment_8_8.py:363
↓ 1 callersFunction_encoder
按当前模型取 tiktoken 编码器(离线可用),用于估算「工具返回注入」的 token。
chapter7/agent-cost-analysis/agent.py:174
↓ 1 callersFunction_end_date
(e, today)
chapter5/erp-agent/reference.py:16
↓ 1 callersMethod_ensure_default_extensions_downloaded
Ensure default extensions are downloaded and cached locally. Returns list of paths to extension directories.
chapter9/browser-use-rpa/browser-use/browser_use/browser/profile.py:835
↓ 1 callersFunction_ensure_image
(image: str)
chapter9/self-modifying-agent/candidate_sandbox.py:40
↓ 1 callersMethod_ensure_model_downloaded
Check if model is cached and download if needed with progress. Args: model_name: HuggingFace model name
chapter3/retrieval-pipeline/reranker.py:34
↓ 1 callersFunction_env_float
(name: str, default: float)
chapter6/async-agent/tasks.py:27
↓ 1 callersFunction_env_float
Read a float env var; fall back to default (with a warning) if malformed.
chapter4/execution-tools/config.py:26
↓ 1 callersFunction_env_int
Read an integer env var; fall back to default (with a warning) if malformed.
chapter6/agent-with-event-trigger/server_fastapi.py:20
↓ 1 callersFunction_env_int
Read an integer env var; fall back to default (with a warning) if malformed.
chapter6/agent-with-event-trigger/server.py:21
↓ 1 callersFunction_env_int
Read an integer env var; fall back to default (with a warning) if malformed.
chapter4/collaboration-tools/src/config.py:14
↓ 1 callersFunction_env_int
Read an integer env var; fall back to default (with a warning) if malformed.
chapter4/execution-tools/config.py:13
← previousnext →3,101–3,200 of 13,003, ranked by callers