MCPcopy Create free account

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

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

↓ 6 callersMethodmodel_dump
Delegate model_dump to the underlying action model
chapter9/browser-use-rpa/browser-use/browser_use/tools/registry/service.py:554
↓ 6 callersMethodmove
Move mouse to the specified coordinates.
chapter9/browser-use-rpa/browser-use/browser_use/actor/mouse.py:77
↓ 6 callersMethodnavigate
Alias for goto.
chapter9/browser-use-rpa/browser-use/browser_use/actor/page.py:284
↓ 6 callersMethodnew_page
Create a new page (tab).
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:885
↓ 6 callersFunctionnormalize_language
Normalize language identifier string to canonical English name.
chapter8/MultilingualReasoning/evaluate_multilingual.py:85
↓ 6 callersMethodobserve
(self, task: Dict[str, Any])
chapter9/self-evolution-eval/agent.py:60
↓ 6 callersFunctionpaired_rows
Builds paired control/treatment comparisons without inventing missing arms.
chapter7/android-world/experiment_core.py:104
↓ 6 callersFunctionparse_iso_timestamp
Parse ISO-8601 timestamps (including fractional seconds and offsets) into UTC.
scripts/gen_star_history.py:97
↓ 6 callersFunctionparse_mapping
Parse a Python dictionary literal without evaluating expressions.
chapter4/collaboration-tools/result_parsing.py:7
↓ 6 callersFunctionparse_page_range
Parse page range string into list of page numbers. Args: page_range: String like "1-5" or "1,3,5" or "1-3,7,9-11" total_
chapter4/perception-tools/src/document_processing_tools.py:311
↓ 6 callersFunctionpath
(d, { arrow = true, dash = false } = {})
web-astro/scripts/chapter3-figure-kit.mjs:138
↓ 6 callersFunctionprepare_animation_data
Prepare data for D3.js bar chart race animation. Args: history_df: DataFrame with columns: date, model, rating, rank top
chapter7/elo-leaderboard/animation.py:11
↓ 6 callersFunctionprint_colored
打印彩色文本
chapter1/web-search-agent/quickstart.py:22
↓ 6 callersFunctionprint_header
Print a formatted header
chapter3/contextual-retrieval/demo.py:29
↓ 6 callersMethodprocess_turn_async
Async version of process_turn.
chapter3/mem0/agent.py:298
↓ 6 callersMethodquery_non_agentic
Non-agentic RAG mode: Simple retrieval + LLM response. Args: user_query: The user's question stream:
chapter3/contextual-retrieval/agent.py:296
↓ 6 callersMethodraw_query
Query without permission checks (for validators).
chapter5/permission-embedded-data-objects/pedo/core/store.py:749
↓ 6 callersMethodread
(self, n: int = -1)
chapter4/execution-tools/test_multilang_output.py:13
↓ 6 callersMethodrecord
( self, agent, prompt_tokens, completion_tokens, note="", latency_seconds=0.0, outcome="succes
chapter10/book-translation/agents.py:190
↓ 6 callersFunctionregister_provider
Register a temporary provider, removed again after the test. Returns: A callable taking a name plus ``Provider`` field overrides, based o
tests/test_providers.py:651
↓ 6 callersFunctionrelease_manifest
( stable_source: str, candidate: Dict[str, Any], diagnosis: Dict[str, Any], checks: Dict[str,
chapter9/self-modifying-agent/evolution.py:268
↓ 6 callersMethodreset
Reset the game to initial state.
chapter1/learning-from-experience/game_environment.py:484
↓ 6 callersFunctionresolve_provider_and_key
Resolve (provider, api_key) applying a universal OpenRouter fallback. Preferred provider (default from LLM_PROVIDER, else 'kimi') is used as toda
chapter6/agent-with-event-trigger/agent.py:58
↓ 6 callersMethodrun
Run the dialogue and always release its inbound loop/transport.
chapter10/autonomous-phone-registration/orchestration.py:154
↓ 6 callersMethodrun
(self)
chapter10/parallel-web-research/agents.py:119
↓ 6 callersMethodrun
(self)
chapter10/parallel-web-research/agents.py:259
↓ 6 callersFunctionrun_benchmark
Module-level entrypoint for executing the compression benchmark. Args: contexts: Input contexts (strings or dicts). tasks: Do
chapter2/context-compression/benchmark_compression.py:325
↓ 6 callersMethodsearch
Search the RAPTOR tree for relevant information.
chapter3/structured-index/raptor_indexer.py:223
↓ 6 callersFunctionsearch_web
Search the web using DuckDuckGo (free, no API key required). Args: query: The search query string num_results: Number of
chapter4/perception-tools/src/search_tools.py:45
↓ 6 callersFunctionsha256
(filePath)
chapter6/live-audio/backend/experiment_validation.js:5
↓ 6 callersFunctionsha256_bytes
(value: bytes)
chapter6/phone-agent/speech.py:19
↓ 6 callersFunctionsha256_file
(path: Path)
chapter6/computer-use-open-model/evidence.py:13
↓ 6 callersFunctionsummarize_review
(review: dict)
chapter5/paper-to-ppt/demo.py:90
↓ 6 callersMethodtext
(self, x, y, content, size=FS_BODY, bold=False, anchor='middle', fill='text', baseline='central', max_width=No
book-tr/svg_lib.py:340
↓ 6 callersMethodtext
(self, x, y, content, size=FS_BODY, bold=False, anchor='middle', fill='text', baseline='central', max_width=No
book-ar/svg_lib.py:366
↓ 6 callersMethodtext
(self, x, y, content, size=FS_BODY, bold=False, anchor='middle', fill='text', baseline='central', max_width=No
book-ru/svg_lib.py:340
↓ 6 callersMethodtext
(self, x, y, content, size=FS_BODY, bold=False, anchor='middle', fill='text', baseline='central', max_width=No
book-es/svg_lib.py:340
↓ 6 callersMethodtext
(self, x, y, content, size=FS_BODY, bold=False, anchor='middle', fill='text', baseline='central', max_width=No
book-mn/svg_lib.py:340
↓ 6 callersMethodtext
(self, x, y, content, size=FS_BODY, bold=False, anchor='middle', fill='text', baseline='central', max_width=No
book-id/svg_lib.py:340
↓ 6 callersMethodto_json
Serialize workflow to JSON string
chapter9/browser-use-rpa/learning_agent/workflow.py:217
↓ 6 callersMethodto_schema
Convert to OpenAI function schema format.
chapter4/active-tool-selection/tool_knowledge_base.py:21
↓ 6 callersMethodtokenize
Tokenize text into words, numbers, and codes. Handles: - Words (preserving case for acronyms) - Numbers (404, 500, 3.
chapter3/sparse-embedding/bm25_engine.py:36
↓ 6 callersFunctionturn
(messages, *, tools=True, reasoning="reason")
chapter1/context/test_experiment_1_1.py:9
↓ 6 callersMethodupdate
(self, object_id: str, changes: dict, accessor: AccessContext, **kw)
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/agentspec_wrap.py:162
↓ 6 callersFunctionutc_now
()
chapter7/model-benchmark/campaign.py:37
↓ 6 callersMethodvalidate
(cls, backend: Optional[str] = None)
chapter1/search-codegen/config.py:68
↓ 6 callersMethodvirtual_terminal
Execute shell command in a virtual terminal. Args: command: Shell command to execute timeout: Timeou
chapter4/execution-tools/execution_tools.py:195
↓ 6 callersFunctionwithBase
(path, base = import.meta.env?.BASE_URL ?? '/')
web-astro/src/lib/site-path.mjs:2
↓ 6 callersFunctionwrap_temperature
(temperature: float)
chapter2/prompt-engineering/tau_bench/model_utils/model/general_model.py:30
↓ 6 callersMethodwrite
(self, value: str)
chapter9/self-modifying-agent/sandbox_runner.py:25
↓ 6 callersFunctionwrite_json
(path: Path, value: Any)
chapter8/prompt-distillation/run_experiment_8_8.py:102
↓ 5 callersMethod_add_stats
(total: GenerationStats | None, current: GenerationStats)
chapter5/agent-creator/creator.py:624
↓ 5 callersFunction_apply_one
尝试应用一条编辑。成功返回(新内容, None),失败返回(原内容, 错误信息)。
chapter9/prompt-auto-optimization/coding_agent.py:51
↓ 5 callersFunction_build_manager
按命令行参数构造对应的记忆管理器(先设置存储目录再实例化)。
chapter3/user-memory/memory_cli.py:54
↓ 5 callersFunction_campaign
()
chapter6/async-agent/test_real_experiment.py:21
↓ 5 callersFunction_cfg
(model="speech-2.8-hd")
chapter7/tts-quality-eval/test_minimax_t2a_refresh.py:24
↓ 5 callersMethod_compute_scores
Compute (final_score, lexical_score, semantic_score) for a node.
chapter3/structured-index/hybrid_retriever.py:289
↓ 5 callersMethod_connection
Borrow the delete transaction without committing it in a helper.
chapter5/permission-embedded-data-objects/pedo/core/store.py:70
↓ 5 callersMethod_decision_record
Attach the model's stated reason to evidence without exposing it publicly.
chapter10/voice-werewolf/werewolf/game.py:103
↓ 5 callersFunction_decoded
(result)
chapter4/perception-tools/test_xquik_tools.py:35
↓ 5 callersMethod_get_files_to_search
Get list of files to search
chapter5/coding-agent/tools/grep_tool.py:120
↓ 5 callersFunction_http_json
(url: str, *, params: dict[str, Any] | None = None, headers: dict[str, str] | None = None
chapter4/perception-tools/src/expanded_catalog.py:494
↓ 5 callersMethod_log
(self, category, content, visible_to)
chapter10/voice-werewolf/werewolf/game.py:99
↓ 5 callersFunction_make_agent
Build a MultimodalAgent without __init__ (which needs API keys).
chapter4/multimodal-agent/test_execute_tool_robust.py:15
↓ 5 callersFunction_make_agent
Build an agent without __init__ (which requires a live Ollama).
chapter3/log-sanitization/tests/test_sanitize_conversation.py:16
↓ 5 callersMethod_normalize_files
Normalize harmless wire-shape variation without altering behavior.
chapter5/agent-creator/creator.py:417
↓ 5 callersMethod_parse_evaluation_response
Parse the LLM's evaluation response.
chapter3/user-memory-evaluation/evaluator.py:236
↓ 5 callersFunction_reasoning_safe_max_tokens
Reasoning models (Kimi K3, GPT-5, ...) spend part of the max_tokens budget on reasoning_content *before* emitting the visible answer. If we pa
chapter2/context-compression/compression_strategies.py:24
↓ 5 callersFunction_reasoning_safe_temperature
Reasoning models (Kimi K3, GPT-5, ...) only accept temperature=1. Return 1 for those; otherwise the requested value so non-reasoning providers
chapter2/context-compression/compression_strategies.py:16
↓ 5 callersMethod_recursive_process_all_strings_inside_pydantic_model
Recursively process all strings inside a Pydantic model, replacing shortened URLs with originals in place.
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:1093
↓ 5 callersFunction_require
(condition: bool, message: str)
chapter10/autonomous-phone-registration/validate_acceptance.py:48
↓ 5 callersFunction_review_issues
Return issue dicts; null/non-list → []; skip non-dict entries.
chapter5/paper-to-ppt/demo.py:80
↓ 5 callersMethod_route_to_tools
Stage 2: Route request to top-k relevant tools within a server. Args: server: Server to search within
chapter4/active-tool-selection/semantic_router.py:161
↓ 5 callersFunction_run
(agent, name, arguments)
chapter4/multimodal-agent/test_execute_tool_robust.py:32
↓ 5 callersFunction_sample_expected
()
chapter7/public-health-reporting-eval/tests/test_null_result.py:16
↓ 5 callersMethod_select
(self, **filters: str)
chapter7/public-health-reporting-eval/reporting_tools.py:43
↓ 5 callersMethod_spoken_target
(text: str, candidates: List[str], allow_none: bool)
chapter10/voice-werewolf/werewolf/human.py:196
↓ 5 callersFunction_stub_http_post
Capture the outgoing request and return a canned decoded JSON body.
chapter7/tts-quality-eval/test_minimax_t2a_refresh.py:29
↓ 5 callersFunction_transform
(html: str)
scripts/mkdocs_figure_captions.py:96
↓ 5 callersMethodadd_message
Add a message to conversation history
chapter4/multimodal-agent/agent.py:407
↓ 5 callersMethodainvoke
(self, messages: list[BaseMessage], output_format: None = None)
chapter9/browser-use-rpa/browser-use/browser_use/llm/groq/chat.py:103
↓ 5 callersMethodanalyze_turn
Analyze a single turn dict into :class:`TurnMetrics`. Uses the absolute ``expensive_cost_threshold`` configured on the analyzer; when
chapter7/agent-cost-analysis/cost_efficiency_analyzer.py:221
↓ 5 callersMethodanswer_question
Answer a question about user conversation history using RAG Args: question: The question to answer t
chapter3/contextual-retrieval-for-user-memory/agent.py:194
↓ 5 callersFunctionbanner
(title)
chapter5/paper-to-ppt/demo.py:46
↓ 5 callersFunctionblender_available
本机是否有 blender 可执行文件(决定 backend=auto 时走 Blender 还是 ffmpeg)。
chapter5/video-edit/blender_editor.py:24
↓ 5 callersFunctionbuild
()
chapter5/code-for-math/build_aime_2024.py:57
↓ 5 callersMethodby_agent
按 Agent 聚合:调用次数、输入/输出总量、上下文峰值。
chapter10/book-translation/agents.py:208
↓ 5 callersMethodcalculate_win_probability
Calculate win probability of model_a against model_b based on current ratings. Args: model_a: First model identi
chapter7/elo-leaderboard/elo_rating.py:123
↓ 5 callersMethodcancel_all
(self)
chapter6/async-agent/tasks.py:243
↓ 5 callersMethodcdp_client_for_node
Get CDP client for a specific DOM node based on its frame.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:2344
↓ 5 callersMethodchat
Send a message using Ollama's native tool calling Args: message: User message use_tools: Whether to
chapter2/local_llm_serving/ollama_native.py:107
↓ 5 callersMethodchat
Send a message to the agent Args: message: User message use_tools: Whether to enable tool calling
chapter2/local_llm_serving/main.py:167
↓ 5 callersMethodchat_stream
Stream a message to the model and handle tool calls in a ReAct loop Yields chunks that include: - type: 'thinking',
chapter2/local_llm_serving/ollama_native.py:191
↓ 5 callersMethodchoose_action
Choose an action using epsilon-greedy strategy.
chapter1/learning-from-experience/rl_agent.py:69
↓ 5 callersMethodclear_history
Clear conversation history
chapter3/agentic-rag/agent.py:456
↓ 5 callersMethodclose
(self)
chapter10/autonomous-phone-registration/browser.py:147
↓ 5 callersMethodcompile_evidence_package
Compile exactly sample_size (default N=100) evidence items uniformly sampled from raw records.
chapter7/model-benchmark/rate_ramp_benchmark.py:135
↓ 5 callersMethodcompute_token_usage
Extract or estimate prompt, completion, reasoning, and total token usage.
chapter8/MultilingualReasoning/evaluate_multilingual.py:279
↓ 5 callersMethodcompute_transfer_efficiency
Calculate cross-lingual transfer efficiency relative to English. If English accuracy is missing or zero, the highest per-language accuracy
chapter8/MultilingualReasoning/evaluate_multilingual.py:436
↓ 5 callersMethodconnect
Connect to the MCP server and discover available tools.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/client.py:80
← previousnext →501–600 of 13,003, ranked by callers