Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bojieli/ai-agent-book
/ functions
Functions
13,003 in github.com/bojieli/ai-agent-book
⨍
Functions
13,003
◇
Types & classes
1,574
↳
Endpoints
161
↓ 1 callers
Function
draft
(value: string)
web-astro/src/scripts/note-editor.ts:29
↓ 1 callers
Function
draw
(matrices: dict[str, np.ndarray], tokens: list[str], path: Path, title: str)
chapter2/attention_visualization/run_attention_experiment.py:97
↓ 1 callers
Function
drawChunk
()
chapter2/attention_visualization/frontend/components/AttentionModal.tsx:168
↓ 1 callers
Function
drawLabelsAndLegend
()
chapter2/attention_visualization/frontend/components/AttentionModal.tsx:211
↓ 1 callers
Function
draw_dashed_line
(start_x, start_y, end_x, end_y)
chapter9/browser-use-rpa/browser-use/browser_use/browser/python_highlights.py:127
↓ 1 callers
Function
draw_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 callers
Function
draw_heatmaps
(records: dict[str, Any], path: Path)
chapter2/attention_visualization/run_status_bar_experiment.py:297
↓ 1 callers
Function
dry_run
离线走通提议者-审核者循环:真实渲染 + 脚本化改稿 + 启发式审查。
chapter5/paper-to-ppt/demo.py:282
↓ 1 callers
Function
dump_output
(path, tracers, pricing, model)
chapter7/agent-cost-analysis/demo.py:183
↓ 1 callers
Function
duplex_timeline
()
scripts/book_figures/chapter6.py:219
↓ 1 callers
Function
duration
(lesson)
slides/review.mjs:42
↓ 1 callers
Function
edges
(source)
web-astro/scripts/collaboration-context-figures.test.mjs:47
↓ 1 callers
Function
edges
(svg)
web-astro/scripts/coding-production-layout.test.mjs:39
↓ 1 callers
Function
edges
(svg)
web-astro/scripts/async-architecture-layout.test.mjs:43
↓ 1 callers
Function
edit_post
(post_id, role, owner_arg, body)
chapter5/permission-embedded-data-objects/pedo/eval/case_studies.py:573
↓ 1 callers
Function
editingGroups
(nodes, labelCount)
web-astro/scripts/coding-comparison-layout.mjs:219
↓ 1 callers
Function
edition_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 callers
Function
effective_font_size
Read a text node's effective font size, including CSS class rules.
book-vi/fix_svg_text_layout.py:151
↓ 1 callers
Function
email
()
scripts/book_figures/chapter6.py:43
↓ 1 callers
Function
embed_probe
(name, base_url, key_env, model, **extra)
chapter7/user-memory-system-evaluation/probe_candidates.py:36
↓ 1 callers
Function
embedding_evolution
()
scripts/book_figures/chapter3.py:135
↓ 1 callers
Function
embedding_unavailable_notice
(method: str)
chapter3/contextual-retrieval/compare_retrieval.py:236
↓ 1 callers
Function
empirical_matrix
(frame: pd.DataFrame, models: list[str])
chapter7/elo-leaderboard/validation/run_experiment.py:178
↓ 1 callers
Function
en
(n)
web-astro/scripts/figure-style.test.mjs:87
↓ 1 callers
Function
encode
(tokenizer, row, max_len)
chapter8/exact-copy-sft/train_sft.py:14
↓ 1 callers
Function
encode
(tokenizer, row, max_length)
chapter8/curly-quote-sft/train_sft.py:20
↓ 1 callers
Function
encode
(text: str)
chapter3/sparse-embedding/cli.py:242
↓ 1 callers
Method
encode
(self, texts: Sequence[str], query: bool = False, batch_size: int = 16)
chapter3/dense-embedding/benchmark.py:61
↓ 1 callers
Function
encode_audio
(snac, wave, sample_rate: int, seconds: float)
chapter8/speech-sft-experiment/run_orpheus.py:74
↓ 1 callers
Function
encode_messages
Mask user/prompt tokens and supervise only the teacher assistant trajectory.
chapter8/cot-distillation/train_student.py:85
↓ 1 callers
Function
energy_vad_endpoints
Compatibility helper returning only acoustic endpoint locations.
chapter6/streaming-speech/whisper_baseline.py:79
↓ 1 callers
Method
enqueue
(self, pcm: bytes, receipt: dict[str, Any])
chapter6/phone-agent/webrtc_app.py:114
↓ 1 callers
Function
enrich_existing_tools
Complete the original tool descriptions with real operational contracts.
chapter4/perception-tools/src/expanded_catalog.py:1014
↓ 1 callers
Function
ensureStyle
()
extras/nav-collapse.js:40
↓ 1 callers
Method
ensureTempDirectory
* Ensure temp directory exists
chapter6/live-audio/backend/utils/speechToText.js:46
↓ 1 callers
Function
ensure_base
(upstream: Path, storage: Path)
chapter10/generative-agents/run_campaign.py:394
↓ 1 callers
Function
ensure_node_modules
确保依赖已安装;首次 npm install 较慢属正常现象。
chapter5/conversational-ui/demo.py:80
↓ 1 callers
Function
ensure_viewbox_contains_shapes
(root)
book-vi/fix_svg_text_layout.py:416
↓ 1 callers
Function
entity_key
(name: str)
chapter3/structured-index/campaign.py:232
↓ 1 callers
Function
env_get
读取环境变量,支持 ENV_ALIASES 中登记的别名,返回第一个非空值(已 strip)。
chapter7/tts-quality-eval/config.py:69
↓ 1 callers
Method
environment_capabilities
Report, without simulation, whether desktop/mobile backends are actually usable.
chapter4/execution-tools/extended_tools.py:359
↓ 1 callers
Function
equal_rows
(expected: list[tuple[Any, ...]], actual: list[tuple[Any, ...]], tolerance: float = 0.1)
chapter5/erp-agent/campaign_postgres.py:132
↓ 1 callers
Function
estimate_tokens
Estimate token count for a string if exact count is unavailable.
chapter8/MultilingualReasoning/evaluate_multilingual.py:102
↓ 1 callers
Function
eval_stmt
在赋值 t(name->bool, True=骑士) 下求某句话的语义真值。
chapter5/code-for-logic/csp_solver.py:31
↓ 1 callers
Function
evaluate
(report_path: Path, output: Path, model: str)
chapter10/voice-werewolf/evaluate_audio_run.py:47
↓ 1 callers
Function
evaluate
按指定模式索引并检索,返回聚合指标与逐条明细。 mode='plain' 索引文本 = chunk['text'] mode='contextual' 索引文本 = chunk['context'] + '\n' + chunk['text']
chapter3/contextual-retrieval-for-user-memory/contextual_compare.py:96
↓ 1 callers
Method
evaluate
(self, trajectory: Dict[str, Any])
chapter9/trajectory-verifier/verifier.py:171
↓ 1 callers
Method
evaluate
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 callers
Function
evaluate_case
评测单个用例,返回结果 dict。
chapter9/prompt-auto-optimization/evaluate.py:50
↓ 1 callers
Function
evaluate_case
(case: Dict[str, Any], findings: List[Dict[str, Any]])
chapter3/log-sanitization/campaign.py:167
↓ 1 callers
Method
evaluate_category
Evaluate all test cases in a category
chapter3/agentic-rag-for-user-memory/main.py:354
↓ 1 callers
Function
evaluate_from_parquet
从 parquet 文件评测
chapter8/Intuitor/evaluate_from_cache.py:198
↓ 1 callers
Function
evaluate_local_arm
(run_dir: Path, arm: str)
chapter8/prompt-distillation/run_experiment_8_8.py:555
↓ 1 callers
Function
evaluate_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 callers
Method
evaluate_memory_retention
Evaluate memory retention for a user.
chapter3/mem0/agent.py:399
↓ 1 callers
Function
evaluate_model
Evaluate the distilled model on test sentences.
chapter8/prompt-distillation/evaluate.py:78
↓ 1 callers
Function
evaluate_one
对单个 (配置, 语料) 跑完整链路。任一步失败返回 error 记录,不抛出。
chapter7/tts-quality-eval/demo.py:55
↓ 1 callers
Function
evaluate_prompt
在全部用例上评测一份 prompt,返回分组正确率与明细。 cases 为 None 时评测全部用例;也可传入用例子集(如 --quick 模式)以控制成本。
chapter9/prompt-auto-optimization/evaluate.py:97
↓ 1 callers
Method
evaluate_response
Evaluate a single response
chapter3/contextual-retrieval/evaluation/evaluate.py:36
↓ 1 callers
Function
evaluate_single
Evaluate a single prompt under a single condition.
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/harness.py:555
↓ 1 callers
Method
evaluate_single_test
Evaluate a single test case
chapter3/agentic-rag-for-user-memory/main.py:255
↓ 1 callers
Function
evaluate_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 callers
Method
evaluate_specific_test_case
Evaluate a specific test case selected by the user
chapter3/contextual-retrieval-for-user-memory/main.py:454
↓ 1 callers
Method
evaluate_strategy
Benchmark a single compression strategy over multiple contexts and tasks.
chapter2/context-compression/benchmark_compression.py:204
↓ 1 callers
Method
evaluate_test_cases
Run evaluation on all test cases in a category
chapter3/contextual-retrieval-for-user-memory/main.py:618
↓ 1 callers
Method
evaluate_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 callers
Function
event_overlaps
(event: dict[str, Any], start: datetime, end: datetime)
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:312
↓ 1 callers
Function
events
()
scripts/book_figures/chapter6.py:6
↓ 1 callers
Function
evolution
()
scripts/book_figures/chapter9.py:6
↓ 1 callers
Function
exact_711_config
(readiness=True)
chapter7/user-memory-system-evaluation/test_experiment.py:298
↓ 1 callers
Function
exact_711_records
()
chapter7/user-memory-system-evaluation/test_experiment.py:309
↓ 1 callers
Function
exact_correct
(answer: str, patterns: list[str])
chapter4/multimodal-agent/campaign.py:202
↓ 1 callers
Function
exact_neighbors
(matrix: np.ndarray, queries: np.ndarray, k: int)
chapter3/dense-embedding/benchmark.py:102
↓ 1 callers
Function
example_anthropic_bedrock
Example using ChatAnthropicBedrock - convenience class for Claude models.
chapter9/browser-use-rpa/browser-use/examples/models/aws.py:21
↓ 1 callers
Function
example_aws_bedrock
Example using ChatAWSBedrock - general client for any Bedrock model.
chapter9/browser-use-rpa/browser-use/examples/models/aws.py:48
↓ 1 callers
Function
example_code_interpreter
Example: Code interpreter with analysis.
chapter4/execution-tools/examples.py:41
↓ 1 callers
Function
example_custom_task
Example: Custom task from user input.
chapter9/browser-use-rpa/quickstart.py:68
↓ 1 callers
Function
example_data_pipeline
Example: Data processing pipeline.
chapter4/active-tool-selection/examples.py:36
↓ 1 callers
Function
example_devops_automation
Example: DevOps automation task.
chapter4/active-tool-selection/examples.py:64
↓ 1 callers
Function
example_efficiency_comparison
Example: Show efficiency comparison with metrics.
chapter4/active-tool-selection/examples.py:153
↓ 1 callers
Function
example_file_operations
Example: File operations with verification.
chapter4/execution-tools/examples.py:10
↓ 1 callers
Function
example_github_workflow
Example: GitHub development workflow.
chapter4/active-tool-selection/examples.py:10
↓ 1 callers
Function
example_multi_turn_discovery
Example: Multi-turn conversation with progressive tool discovery.
chapter4/active-tool-selection/examples.py:121
↓ 1 callers
Function
example_search
Example: Search on Google.
chapter9/browser-use-rpa/quickstart.py:18
↓ 1 callers
Function
example_semantic_search
Example: Demonstrate semantic search capabilities.
chapter4/active-tool-selection/examples.py:91
↓ 1 callers
Function
example_virtual_terminal
Example: Virtual terminal.
chapter4/execution-tools/examples.py:77
↓ 1 callers
Function
example_weather
Example: Check weather.
chapter9/browser-use-rpa/quickstart.py:36
↓ 1 callers
Method
excel_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 callers
Function
exec_code
Execute generated code and return result.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_final_comprehensive.py:210
↓ 1 callers
Function
execute
(adapter: DesktopToolAdapter, index: int)
chapter6/gemini-xlerobot-navigation/desktop_planner.py:172
↓ 1 callers
Method
execute
(self, invocable_or_invokables: Callable[..., T] | list[Callable[..., T]])
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:17
↓ 1 callers
Method
execute
(self, name: str, arguments: dict[str, Any], turn: int)
chapter9/trajectory-verifier/customer_service_env.py:132
↓ 1 callers
Method
execute
(self)
chapter1/search-codegen/agent.py:392
↓ 1 callers
Method
execute_agent
Executes an agent on a task and measures latency.
chapter9/hermes-self-evolution/run_downstream_ablation.py:159
↓ 1 callers
Function
execute_api
Execute generated code against traditional API (code is responsible for checks).
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety.py:412
↓ 1 callers
Function
execute_arms
(manifest: dict[str, Any], selected: Iterable[str])
chapter7/openvla-robotwin2-eval/experiment.py:417
↓ 1 callers
Function
execute_db_condition
Execute against raw/api/harness conditions.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety_v2.py:256
↓ 1 callers
Function
execute_expanded_tool
(spec: ExpandedToolSpec, query: str, options_json: str = "{}")
chapter4/perception-tools/src/expanded_catalog.py:927
↓ 1 callers
Function
execute_parallel
(registry: ToolRegistry, calls: list[dict[str, Any]])
chapter2/local_llm_serving/run_experiment.py:173
↓ 1 callers
Function
execute_pedo
Execute against PEDO condition.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety_v2.py:285
← previous
next →
4,801–4,900 of 13,003, ranked by callers