MCPcopy Create free account

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

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

↓ 1 callersFunctiondraft
(value: string)
web-astro/src/scripts/note-editor.ts:29
↓ 1 callersFunctiondraw
(matrices: dict[str, np.ndarray], tokens: list[str], path: Path, title: str)
chapter2/attention_visualization/run_attention_experiment.py:97
↓ 1 callersFunctiondrawChunk
()
chapter2/attention_visualization/frontend/components/AttentionModal.tsx:168
↓ 1 callersFunctiondrawLabelsAndLegend
()
chapter2/attention_visualization/frontend/components/AttentionModal.tsx:211
↓ 1 callersFunctiondraw_dashed_line
(start_x, start_y, end_x, end_y)
chapter9/browser-use-rpa/browser-use/browser_use/browser/python_highlights.py:127
↓ 1 callersFunctiondraw_enhanced_bounding_box_with_text
Draw an enhanced bounding box with much bigger index containers and dashed borders.
chapter9/browser-use-rpa/browser-use/browser_use/browser/python_highlights.py:108
↓ 1 callersFunctiondraw_heatmaps
(records: dict[str, Any], path: Path)
chapter2/attention_visualization/run_status_bar_experiment.py:297
↓ 1 callersFunctiondry_run
离线走通提议者-审核者循环:真实渲染 + 脚本化改稿 + 启发式审查。
chapter5/paper-to-ppt/demo.py:282
↓ 1 callersFunctiondump_output
(path, tracers, pricing, model)
chapter7/agent-cost-analysis/demo.py:183
↓ 1 callersFunctionduplex_timeline
()
scripts/book_figures/chapter6.py:219
↓ 1 callersFunctionduration
(lesson)
slides/review.mjs:42
↓ 1 callersFunctionedges
(source)
web-astro/scripts/collaboration-context-figures.test.mjs:47
↓ 1 callersFunctionedges
(svg)
web-astro/scripts/coding-production-layout.test.mjs:39
↓ 1 callersFunctionedges
(svg)
web-astro/scripts/async-architecture-layout.test.mjs:43
↓ 1 callersFunctionedit_post
(post_id, role, owner_arg, body)
chapter5/permission-embedded-data-objects/pedo/eval/case_studies.py:573
↓ 1 callersFunctioneditingGroups
(nodes, labelCount)
web-astro/scripts/coding-comparison-layout.mjs:219
↓ 1 callersFunctionedition_of
Map a search-index location to an edition slug, or SHARED. Mirrors `slugForPath()` in extras/search-index-router.js.
scripts/split_search_index.py:78
↓ 1 callersFunctioneffective_font_size
Read a text node's effective font size, including CSS class rules.
book-vi/fix_svg_text_layout.py:151
↓ 1 callersFunctionemail
()
scripts/book_figures/chapter6.py:43
↓ 1 callersFunctionembed_probe
(name, base_url, key_env, model, **extra)
chapter7/user-memory-system-evaluation/probe_candidates.py:36
↓ 1 callersFunctionembedding_evolution
()
scripts/book_figures/chapter3.py:135
↓ 1 callersFunctionembedding_unavailable_notice
(method: str)
chapter3/contextual-retrieval/compare_retrieval.py:236
↓ 1 callersFunctionempirical_matrix
(frame: pd.DataFrame, models: list[str])
chapter7/elo-leaderboard/validation/run_experiment.py:178
↓ 1 callersFunctionen
(n)
web-astro/scripts/figure-style.test.mjs:87
↓ 1 callersFunctionencode
(tokenizer, row, max_len)
chapter8/exact-copy-sft/train_sft.py:14
↓ 1 callersFunctionencode
(tokenizer, row, max_length)
chapter8/curly-quote-sft/train_sft.py:20
↓ 1 callersFunctionencode
(text: str)
chapter3/sparse-embedding/cli.py:242
↓ 1 callersMethodencode
(self, texts: Sequence[str], query: bool = False, batch_size: int = 16)
chapter3/dense-embedding/benchmark.py:61
↓ 1 callersFunctionencode_audio
(snac, wave, sample_rate: int, seconds: float)
chapter8/speech-sft-experiment/run_orpheus.py:74
↓ 1 callersFunctionencode_messages
Mask user/prompt tokens and supervise only the teacher assistant trajectory.
chapter8/cot-distillation/train_student.py:85
↓ 1 callersFunctionenergy_vad_endpoints
Compatibility helper returning only acoustic endpoint locations.
chapter6/streaming-speech/whisper_baseline.py:79
↓ 1 callersMethodenqueue
(self, pcm: bytes, receipt: dict[str, Any])
chapter6/phone-agent/webrtc_app.py:114
↓ 1 callersFunctionenrich_existing_tools
Complete the original tool descriptions with real operational contracts.
chapter4/perception-tools/src/expanded_catalog.py:1014
↓ 1 callersFunctionensureStyle
()
extras/nav-collapse.js:40
↓ 1 callersMethodensureTempDirectory
* Ensure temp directory exists
chapter6/live-audio/backend/utils/speechToText.js:46
↓ 1 callersFunctionensure_base
(upstream: Path, storage: Path)
chapter10/generative-agents/run_campaign.py:394
↓ 1 callersFunctionensure_node_modules
确保依赖已安装;首次 npm install 较慢属正常现象。
chapter5/conversational-ui/demo.py:80
↓ 1 callersFunctionensure_viewbox_contains_shapes
(root)
book-vi/fix_svg_text_layout.py:416
↓ 1 callersFunctionentity_key
(name: str)
chapter3/structured-index/campaign.py:232
↓ 1 callersFunctionenv_get
读取环境变量,支持 ENV_ALIASES 中登记的别名,返回第一个非空值(已 strip)。
chapter7/tts-quality-eval/config.py:69
↓ 1 callersMethodenvironment_capabilities
Report, without simulation, whether desktop/mobile backends are actually usable.
chapter4/execution-tools/extended_tools.py:359
↓ 1 callersFunctionequal_rows
(expected: list[tuple[Any, ...]], actual: list[tuple[Any, ...]], tolerance: float = 0.1)
chapter5/erp-agent/campaign_postgres.py:132
↓ 1 callersFunctionestimate_tokens
Estimate token count for a string if exact count is unavailable.
chapter8/MultilingualReasoning/evaluate_multilingual.py:102
↓ 1 callersFunctioneval_stmt
在赋值 t(name->bool, True=骑士) 下求某句话的语义真值。
chapter5/code-for-logic/csp_solver.py:31
↓ 1 callersFunctionevaluate
(report_path: Path, output: Path, model: str)
chapter10/voice-werewolf/evaluate_audio_run.py:47
↓ 1 callersFunctionevaluate
按指定模式索引并检索,返回聚合指标与逐条明细。 mode='plain' 索引文本 = chunk['text'] mode='contextual' 索引文本 = chunk['context'] + '\n' + chunk['text']
chapter3/contextual-retrieval-for-user-memory/contextual_compare.py:96
↓ 1 callersMethodevaluate
(self, trajectory: Dict[str, Any])
chapter9/trajectory-verifier/verifier.py:171
↓ 1 callersMethodevaluate
Score a response by the fraction of gold facts it recalls. The optional ``extracted_memory`` is concatenated with the response so a f
chapter3/user-memory-evaluation/metrics.py:82
↓ 1 callersFunctionevaluate_case
评测单个用例,返回结果 dict。
chapter9/prompt-auto-optimization/evaluate.py:50
↓ 1 callersFunctionevaluate_case
(case: Dict[str, Any], findings: List[Dict[str, Any]])
chapter3/log-sanitization/campaign.py:167
↓ 1 callersMethodevaluate_category
Evaluate all test cases in a category
chapter3/agentic-rag-for-user-memory/main.py:354
↓ 1 callersFunctionevaluate_from_parquet
从 parquet 文件评测
chapter8/Intuitor/evaluate_from_cache.py:198
↓ 1 callersFunctionevaluate_local_arm
(run_dir: Path, arm: str)
chapter8/prompt-distillation/run_experiment_8_8.py:555
↓ 1 callersFunctionevaluate_logic_coverage
Evaluate how many requirements are addressed in generated business logic.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_spec_errors.py:184
↓ 1 callersMethodevaluate_memory_retention
Evaluate memory retention for a user.
chapter3/mem0/agent.py:399
↓ 1 callersFunctionevaluate_model
Evaluate the distilled model on test sentences.
chapter8/prompt-distillation/evaluate.py:78
↓ 1 callersFunctionevaluate_one
对单个 (配置, 语料) 跑完整链路。任一步失败返回 error 记录,不抛出。
chapter7/tts-quality-eval/demo.py:55
↓ 1 callersFunctionevaluate_prompt
在全部用例上评测一份 prompt,返回分组正确率与明细。 cases 为 None 时评测全部用例;也可传入用例子集(如 --quick 模式)以控制成本。
chapter9/prompt-auto-optimization/evaluate.py:97
↓ 1 callersMethodevaluate_response
Evaluate a single response
chapter3/contextual-retrieval/evaluation/evaluate.py:36
↓ 1 callersFunctionevaluate_single
Evaluate a single prompt under a single condition.
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/harness.py:555
↓ 1 callersMethodevaluate_single_test
Evaluate a single test case
chapter3/agentic-rag-for-user-memory/main.py:255
↓ 1 callersFunctionevaluate_spec_coverage
Evaluate how many requirements are addressed in generated spec code.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_spec_errors.py:133
↓ 1 callersMethodevaluate_specific_test_case
Evaluate a specific test case selected by the user
chapter3/contextual-retrieval-for-user-memory/main.py:454
↓ 1 callersMethodevaluate_strategy
Benchmark a single compression strategy over multiple contexts and tasks.
chapter2/context-compression/benchmark_compression.py:204
↓ 1 callersMethodevaluate_test_cases
Run evaluation on all test cases in a category
chapter3/contextual-retrieval-for-user-memory/main.py:618
↓ 1 callersMethodevaluate_test_suite
Evaluate multiple test cases. Args: test_cases: List of test cases to evaluate agent_responses: Dict
chapter3/user-memory-evaluation/evaluator.py:333
↓ 1 callersFunctionevent_overlaps
(event: dict[str, Any], start: datetime, end: datetime)
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:312
↓ 1 callersFunctionevents
()
scripts/book_figures/chapter6.py:6
↓ 1 callersFunctionevolution
()
scripts/book_figures/chapter9.py:6
↓ 1 callersFunctionexact_711_config
(readiness=True)
chapter7/user-memory-system-evaluation/test_experiment.py:298
↓ 1 callersFunctionexact_711_records
()
chapter7/user-memory-system-evaluation/test_experiment.py:309
↓ 1 callersFunctionexact_correct
(answer: str, patterns: list[str])
chapter4/multimodal-agent/campaign.py:202
↓ 1 callersFunctionexact_neighbors
(matrix: np.ndarray, queries: np.ndarray, k: int)
chapter3/dense-embedding/benchmark.py:102
↓ 1 callersFunctionexample_anthropic_bedrock
Example using ChatAnthropicBedrock - convenience class for Claude models.
chapter9/browser-use-rpa/browser-use/examples/models/aws.py:21
↓ 1 callersFunctionexample_aws_bedrock
Example using ChatAWSBedrock - general client for any Bedrock model.
chapter9/browser-use-rpa/browser-use/examples/models/aws.py:48
↓ 1 callersFunctionexample_code_interpreter
Example: Code interpreter with analysis.
chapter4/execution-tools/examples.py:41
↓ 1 callersFunctionexample_custom_task
Example: Custom task from user input.
chapter9/browser-use-rpa/quickstart.py:68
↓ 1 callersFunctionexample_data_pipeline
Example: Data processing pipeline.
chapter4/active-tool-selection/examples.py:36
↓ 1 callersFunctionexample_devops_automation
Example: DevOps automation task.
chapter4/active-tool-selection/examples.py:64
↓ 1 callersFunctionexample_efficiency_comparison
Example: Show efficiency comparison with metrics.
chapter4/active-tool-selection/examples.py:153
↓ 1 callersFunctionexample_file_operations
Example: File operations with verification.
chapter4/execution-tools/examples.py:10
↓ 1 callersFunctionexample_github_workflow
Example: GitHub development workflow.
chapter4/active-tool-selection/examples.py:10
↓ 1 callersFunctionexample_multi_turn_discovery
Example: Multi-turn conversation with progressive tool discovery.
chapter4/active-tool-selection/examples.py:121
↓ 1 callersFunctionexample_search
Example: Search on Google.
chapter9/browser-use-rpa/quickstart.py:18
↓ 1 callersFunctionexample_semantic_search
Example: Demonstrate semantic search capabilities.
chapter4/active-tool-selection/examples.py:91
↓ 1 callersFunctionexample_virtual_terminal
Example: Virtual terminal.
chapter4/execution-tools/examples.py:77
↓ 1 callersFunctionexample_weather
Example: Check weather.
chapter9/browser-use-rpa/quickstart.py:36
↓ 1 callersMethodexcel_create_with_formula_and_screenshot
Create a real XLSX, apply formulas, and render a screenshot via LibreOffice.
chapter4/execution-tools/extended_tools.py:36
↓ 1 callersFunctionexec_code
Execute generated code and return result.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_final_comprehensive.py:210
↓ 1 callersFunctionexecute
(adapter: DesktopToolAdapter, index: int)
chapter6/gemini-xlerobot-navigation/desktop_planner.py:172
↓ 1 callersMethodexecute
(self, invocable_or_invokables: Callable[..., T] | list[Callable[..., T]])
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:17
↓ 1 callersMethodexecute
(self, name: str, arguments: dict[str, Any], turn: int)
chapter9/trajectory-verifier/customer_service_env.py:132
↓ 1 callersMethodexecute
(self)
chapter1/search-codegen/agent.py:392
↓ 1 callersMethodexecute_agent
Executes an agent on a task and measures latency.
chapter9/hermes-self-evolution/run_downstream_ablation.py:159
↓ 1 callersFunctionexecute_api
Execute generated code against traditional API (code is responsible for checks).
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety.py:412
↓ 1 callersFunctionexecute_arms
(manifest: dict[str, Any], selected: Iterable[str])
chapter7/openvla-robotwin2-eval/experiment.py:417
↓ 1 callersFunctionexecute_db_condition
Execute against raw/api/harness conditions.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety_v2.py:256
↓ 1 callersFunctionexecute_expanded_tool
(spec: ExpandedToolSpec, query: str, options_json: str = "{}")
chapter4/perception-tools/src/expanded_catalog.py:927
↓ 1 callersFunctionexecute_parallel
(registry: ToolRegistry, calls: list[dict[str, Any]])
chapter2/local_llm_serving/run_experiment.py:173
↓ 1 callersFunctionexecute_pedo
Execute against PEDO condition.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety_v2.py:285
← previousnext →4,801–4,900 of 13,003, ranked by callers