MCPcopy Create free account

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

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

↓ 1 callersFunctioncall
(case: str, tool: str, arguments: dict[str, Any])
chapter4/collaboration-tools/run_experiment_4_5.py:269
↓ 1 callersFunctioncall
(case: str, tool: str, arguments: dict[str, Any])
chapter4/execution-tools/run_experiment_4_4.py:101
↓ 1 callersFunctioncall_anthropic
(prompt: str, api_key: str, model: str)
chapter10/generative-agents/judge_plausibility.py:166
↓ 1 callersFunctioncall_ark
(model, messages, api_key, max_tokens=1600)
chapter9/tau2-escalation-experience/derive_rules.py:66
↓ 1 callersFunctioncall_case
( client: Client, case: str, arguments: dict[str, Any], paths: dict[str, Path], )
chapter4/perception-tools/run_experiment_4_2.py:388
↓ 1 callersFunctioncall_judge
( test: dict[str, Any], *, endpoint: str, model: str, api_key: str, timeout: float, )
chapter8/continued-pretraining/validation/run_report_audit.py:280
↓ 1 callersFunctioncall_model
(client: Any, model: str, messages: list[dict[str, Any]])
chapter7/model-action-threshold/experiment.py:368
↓ 1 callersFunctioncall_model
Run one trajectory and retain credential-free provider receipts.
chapter5/code-for-logic/demo.py:227
↓ 1 callersFunctioncall_signatures
(tool_calls: Iterable[Dict[str, Any]])
chapter1/context/run_experiment_1_1.py:136
↓ 1 callersFunctioncall_totals
(calls: list[dict[str, Any]])
chapter3/structured-index/campaign.py:392
↓ 1 callersMethodcalled_fingerprints
(self)
chapter5/provider-failover/neutral_trace.py:79
↓ 1 callersFunctioncampaign
(args: argparse.Namespace)
chapter9/browser-use-rpa/run_experiment_9_5.py:334
↓ 1 callersFunctioncancel
()
web-astro/src/scripts/reader-navigation.ts:74
↓ 1 callersFunctioncancel_subagent
Cancel a sub-agent. For async sub-agents this cancels the background task.
chapter4/collaboration-tools/src/subagent_tools.py:506
↓ 1 callersFunctioncancellation
()
scripts/book_figures/chapter6.py:62
↓ 1 callersFunctioncandidates
(catalog, receipt, task, seed)
chapter4/active-tool-discovery/selection_ablation.py:22
↓ 1 callersFunctioncanonical_bytes
(value)
chapter10/parallel-web-research/test_official_experiment.py:15
↓ 1 callersFunctioncanonical_event
(email: dict[str, Any], sequence: int)
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:320
↓ 1 callersFunctioncanonical_hash
(value: Any)
chapter8/prompt-distillation/run_experiment_8_8.py:97
↓ 1 callersFunctioncanonical_json
(value: Any)
chapter6/async-agent/run_real_experiment.py:25
↓ 1 callersFunctioncanonical_json_bytes
(value: Any)
chapter8/MiniMind-pretrain/validation/run_training_report_audit.py:104
↓ 1 callersFunctioncanonical_json_bytes
(value: Any)
chapter8/MiniMind-pretrain/validation/run_vlm_training_report_audit.py:224
↓ 1 callersFunctioncanonical_json_bytes
(value: Any)
chapter8/continued-pretraining/validation/run_report_audit.py:88
↓ 1 callersFunctioncanonical_non_accounting_hash
(records: list[RunRecord])
chapter7/user-memory-system-evaluation/rebuild_report.py:29
↓ 1 callersFunctioncanonical_videos
(run_dir: Path)
chapter7/openvla-robotwin2-eval/finalize_evidence.py:42
↓ 1 callersFunctioncaption
(content, x, y, width, height, align = 'center')
web-astro/scripts/context-flow-figures.mjs:65
↓ 1 callersFunctioncapture
()
web-astro/src/scripts/reading-position.ts:24
↓ 1 callersFunctioncapture
(model, ids: torch.Tensor, layers: list[int])
chapter2/attention_visualization/run_attention_experiment.py:82
↓ 1 callersFunctioncapture_attention
(model, full_ids: torch.Tensor, context_length: int, regions)
chapter2/attention_visualization/run_status_bar_experiment.py:272
↓ 1 callersFunctioncard
(x, y, width, height, fill = '#edf2f8')
web-astro/scripts/grpo-rollouts-figure.mjs:474
↓ 1 callersFunctioncardLabels
(source)
web-astro/scripts/retrieval-workflow-layout.mjs:4
↓ 1 callersMethodcards_only
(self, question: str, cards: List[Dict[str, Any]])
chapter7/user-memory-system-evaluation/experiment.py:639
↓ 1 callersFunctioncarriers
()
scripts/book_figures/chapter9.py:40
↓ 1 callersFunctioncase_dimensions
Derive the three dimensions used by Experiment 9-3. The full project would consume Experiment 9-1 reports. This compact airline simulation e
chapter9/prompt-auto-optimization/learning_signal.py:12
↓ 1 callersFunctioncase_prompt
(suite: str, case: dict[str, Any])
chapter2/system-hint/run_experiment_2_8.py:79
↓ 1 callersFunctioncat_visible
(cat)
chapter10/voice-werewolf/demo.py:94
↓ 1 callersFunctioncategory
(text: str)
chapter8/speech-sft-experiment/run_sesame.py:58
↓ 1 callersFunctioncell
(id, column, y, height, { bold = false, muted = false } = {})
web-astro/scripts/pairwise-figure.mjs:119
↓ 1 callersFunctioncell
(index, column, y, height, options = {})
web-astro/scripts/training-foundations-figures.mjs:254
↓ 1 callersFunctioncell
(v: float | None)
chapter2/prompt-injection/demo.py:150
↓ 1 callersFunctioncell_id
(*parts: Any)
chapter7/model-benchmark/campaign.py:793
↓ 1 callersFunctioncer
(reference: str, hypothesis: str)
chapter6/streaming-speech/demo.py:34
↓ 1 callersFunctioncfg_pairs
(protocol: dict[str, Any])
chapter2/local_llm_serving/run_experiment.py:442
↓ 1 callersFunctionchanged_files
(before: dict[str, str], repo: Path)
chapter7/model-action-threshold/experiment.py:188
↓ 1 callersFunctionchapter
(edition, number)
web-astro/scripts/book-math.test.mjs:32
↓ 1 callersFunctionchapterMap
(lesson)
slides/generate.mjs:110
↓ 1 callersFunctionchapter_suffix
章节 README 后缀:中文(zh-CN)默认为空 → README.md;其它如 en → .en。
scripts/check_i18n_consistency.py:38
↓ 1 callersFunctionchar_weight
(char: str)
book-vi/fix_svg_text_layout.py:179
↓ 1 callersFunctionchartGeometry
(source)
web-astro/scripts/evaluation-spectrum-figures.mjs:156
↓ 1 callersMethodchat
Chat using OpenAI-compatible endpoint
chapter2/local_llm_serving/ollama_native.py:399
↓ 1 callersFunctionchat_probe
(name, base_url, key_env, model, max_tokens=1, **extra)
chapter7/user-memory-system-evaluation/probe_candidates.py:55
↓ 1 callersFunctionchat_with_tools
发起一轮带 function tools 的 chat completions,必要时降级重试一次。 只配了 OPENAI_API_KEY 的读者会直连 OpenAI,而直连的 chat completions 端点 对 gpt-5.x 只允许 reasoning_effort="
chapter2/agent-skills-ppt/demo.py:234
↓ 1 callersFunctioncheck
(cond, msg)
chapter7/user-memory-system-evaluation/validation/verify_full_matrix_20260731.py:26
↓ 1 callersFunctioncheckLink
(value, from)
web-astro/scripts/check-deployment.mjs:32
↓ 1 callersMethodcheck_action
Check a proposed tool call against all rules. Returns: (allowed, message): whether the action is permitted.
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/agentspec_baseline.py:55
↓ 1 callersFunctioncheck_agent_error_recovery
Run the live agent against an intentionally failing tool path.
chapter2/kv-cache/tests/manual/check_agent_error_recovery.py:14
↓ 1 callersFunctioncheck_all
(files)
book-vi/fix_svg_text_layout.py:580
↓ 1 callersFunctioncheck_api_key
检查 API Key 配置
chapter1/web-search-agent/quickstart.py:40
↓ 1 callersFunctioncheck_arm
(name: str, record: dict[str, Any], run_dir: Path, failures: list[str])
chapter6/phone-agent/verify_acceptance.py:145
↓ 1 callersFunctioncheck_code_interpreter
Manual smoke test of the code_interpreter tool (requires a live agent/API).
chapter1/context/tests/manual/check_code_interpreter.py:9
↓ 1 callersFunctioncheck_dependencies
Check if all dependencies are available
chapter3/agentic-rag-for-user-memory/test_llm_evaluation.py:127
↓ 1 callersFunctioncheck_dependencies
Check if all dependencies are available
chapter3/contextual-retrieval-for-user-memory/test_llm_evaluation.py:127
↓ 1 callersFunctioncheck_environment
Check if the environment is properly set up
chapter2/prompt-engineering/test_ablation.py:228
↓ 1 callersFunctioncheck_environment
Check if environment is properly configured
chapter2/context-compression/quickstart.py:13
↓ 1 callersFunctioncheck_environment
Check if required environment variables are set
chapter3/agentic-rag-for-user-memory/quickstart.py:17
↓ 1 callersFunctioncheck_environment
Check if environment is properly configured
chapter3/agentic-rag/quickstart.py:10
↓ 1 callersFunctioncheck_environment
Check if required environment variables are set
chapter3/contextual-retrieval-for-user-memory/quickstart.py:17
↓ 1 callersMethodcheck_for_pdf_viewer
Check if the current target is a PDF using network-based detection. This method avoids JavaScript execution that can crash WebSocket connections.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/downloads_watchdog.py:608
↓ 1 callersMethodcheck_format
Validate the structural shape of one example. Issues are returned with ``line_number=0``; the caller (``audit_lines``) stamps the rea
chapter8/cot-distillation/sft_data_auditor.py:193
↓ 1 callersMethodcheck_label_noise
Flag placeholder text and self-contradictory assistant responses.
chapter8/cot-distillation/sft_data_auditor.py:426
↓ 1 callersFunctioncheck_latest_browser_use_version
Check the latest version of browser-use from PyPI asynchronously. Returns: The latest version string if successful, None if failed
chapter9/browser-use-rpa/browser-use/browser_use/utils.py:582
↓ 1 callersMethodcheck_length
Flag examples whose approximate token count is an outlier.
chapter8/cot-distillation/sft_data_auditor.py:321
↓ 1 callersFunctioncheck_record
(path: Path, record: dict[str, Any])
chapter8/MiniMind-pretrain/validation/validate_evidence.py:74
↓ 1 callersFunctioncheck_record
(path: Path, record: dict[str, Any])
chapter8/continued-pretraining/validation/validate_evidence.py:64
↓ 1 callersFunctioncheck_retrieval_pipeline
Check if local retrieval pipeline is running
chapter3/agentic-rag/quickstart.py:71
↓ 1 callersFunctioncheck_row
(row)
chapter8/curly-quote-sft/quality_audit.py:24
↓ 1 callersFunctioncheck_state_violation
Check if status transition was valid.
chapter5/permission-embedded-data-objects/run_targeted_eval.py:288
↓ 1 callersFunctioncheck_system
Check system compatibility
chapter2/local_llm_serving/check_compatibility.py:12
↓ 1 callersMethodcheck_tokenizer_compatibility
Flag characters that tokenize inconsistently across tokenizers.
chapter8/cot-distillation/sft_data_auditor.py:466
↓ 1 callersFunctioncheck_violations
Check for integrity violations.
chapter5/permission-embedded-data-objects/run_targeted_eval.py:241
↓ 1 callersFunctioncheck_violations
Check for violations after execution.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_harness_focused.py:99
↓ 1 callersFunctioncheck_violations
(conn)
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_final_comprehensive.py:162
↓ 1 callersMethodcheck_violations
Check for all violation types.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety_v2.py:101
↓ 1 callersMethodcheckpoint_path
(self, case: Dict[str, Any])
chapter3/memory_rag_campaign.py:390
↓ 1 callersMethodchildren
(self)
chapter9/browser-use-rpa/browser-use/browser_use/dom/views.py:391
↓ 1 callersFunctionchoose_account
(accounts: list[dict[str, Any]], requested: str | None)
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:638
↓ 1 callersMethodchoose_action
Choose action (simplified for demonstration).
chapter1/learning-from-experience/rl_agent.py:371
↓ 1 callersFunctionchrome_path
()
chapter6/phone-agent/run_acceptance.py:64
↓ 1 callersMethodchunk_document_smart
Smart chunking that respects paragraph boundaries with soft and hard limits. Strategy: - Accumulate paragraphs until
chapter3/agentic-rag/index_local_laws.py:139
↓ 1 callersMethodchunk_test_case_conversations
Chunk all conversations in a test case Args: test_case: Test case containing conversation histories
chapter3/agentic-rag-for-user-memory/chunker.py:259
↓ 1 callersFunctionchunk_text
按字符窗口把文档切成带重叠的 chunk。 短文档(长度 <= chunk_size)原样返回单个 chunk。真实场景中 chunk 是检索的最小 单元;这里用字符级滑窗保持实现简单、语言无关。 Args: text: 原始文档文本。 c
chapter3/retrieval-pipeline/evaluate.py:112
↓ 1 callersMethodchunk_text
Split text into chunks with overlap.
chapter3/structured-index/graphrag_indexer.py:78
↓ 1 callersFunctionchunks_to_docs
(ranked_chunks: List[Tuple[str, float]], chunk_to_doc: Dict[str, str])
chapter3/retrieval-pipeline/evaluate.py:330
↓ 1 callersFunctioncitations
(answer: str, valid_ids: Iterable[str])
chapter3/agentic-rag/campaign.py:60
↓ 1 callersFunctionclaim
Return an observation, or ``None`` when there was nothing to observe. Args: value: The claim's value as computed from the arm. ev
chapter1/context/run_experiment_1_1.py:482
↓ 1 callersFunctionclassify
根据文件扩展名返回类别文件夹名。 扩展名匹配不区分大小写;无扩展名(含以 . 开头的隐藏文件) 或未识别的扩展名一律归入 Others。 Args: file_path: 待分类的文件路径。 Returns: 类别文件夹名,如 "
chapter10/staged-system-prompt/runs/staged-system-prompt-kimi-k3-20260730-v3/workspace/organize_downloads.py:40
↓ 1 callersMethodclassify
( self, instruction: str, text: str, options: list[str], examples: lis
chapter2/prompt-engineering/tau_bench/model_utils/model/general_model.py:43
↓ 1 callersFunctionclassify_email
(email: dict[str, Any])
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:287
↓ 1 callersFunctionclassify_urgency
根据用户消息内容判定紧急度。 规则(简单、可解释,便于书中讲清楚): 1. 含打断关键词(取消/停止/stop...) -> INTERRUPT(紧急,取消式处理) 2. 是一个提问(带问号或疑问词) -> IMMEDIATE(立即回应,但不打断后台任务)
chapter6/async-agent/events.py:44
↓ 1 callersFunctioncleanPathname
()
extras/lang-switcher.js:677
← previousnext →4,401–4,500 of 13,003, ranked by callers