MCPcopy Create free account

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

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

Functionembodied
()
scripts/book_figures/chapter7.py:147
Methodemit
(self, record)
chapter9/browser-use-rpa/browser-use/browser_use/logging_config.py:254
Methodemit
(self, record)
chapter9/browser-use-rpa/browser-use/browser_use/cli.py:270
Methodemit
(self, record)
chapter9/browser-use-rpa/browser-use/browser_use/cli.py:818
Functionemit_phi_access_log
Reaction: every read or modification of clinical PHI logs to audit trail. Note: the read-path doesn't currently fire reactions; this fires on writ
chapter5/permission-embedded-data-objects/pedo/scenarios/healthcare.py:39
Methodempty_filesystem
Create a temporary FileSystem without default files.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:201
Functionenable_cache
()
chapter2/prompt-engineering/tau_bench/model_utils/api/cache.py:41
Methodencode
(self, texts, **kwargs)
chapter3/structured-index/test_graphrag_search_top_k.py:17
Functionenrich_case
(path: Path, evaluator_type: str, model: str, test_cases_dir: Path)
chapter7/user-memory-system-evaluation/enrich_rubrics.py:20
Methodensure_additional_properties_false
Ensure all objects have additionalProperties: false
chapter9/browser-use-rpa/browser-use/browser_use/llm/schema.py:123
Functionensure_memory_cleared
Ensures that all memory is cleared for a given memory manager. Used primarily for testing and evaluation to ensure clean state before each te
chapter3/user-memory/memory_manager.py:762
Methodensure_pricing_loaded
Ensure pricing data is loaded in the background. Call this after creating the service.
chapter9/browser-use-rpa/browser-use/browser_use/tokens/service.py:564
Functionenvironments
()
scripts/book_figures/chapter7.py:19
FunctionescapeHtml
(value)
slides/chapter1-pilot.mjs:1
Methodestimate_tokens
Estimate token count for text (rough approximation) Args: text: Text to estimate tokens for
chapter2/context-compression/compression_strategies.py:683
Methodevaluate
(self, api: tau_bench.model_utils.API)
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:127
Methodevaluate
(self, api: tau_bench.model_utils.API)
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:138
Methodevaluate
(self, api: tau_bench.model_utils.API)
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:157
Methodevaluate
(self, api: tau_bench.model_utils.API)
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:175
Methodevaluate
(self, api: tau_bench.model_utils.API)
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:185
Methodevaluate
(self, api: tau_bench.model_utils.API)
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:199
Methodevaluate
(self, api: tau_bench.model_utils.API)
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:210
Methodevaluate_batch
Evaluate multiple test cases Args: test_ids: List of test IDs to evaluate (evaluates all if None) ca
chapter3/contextual-retrieval-for-user-memory/evaluator.py:472
Methodevaluate_batch
Evaluate multiple test cases
chapter3/contextual-retrieval-for-user-memory/contextual_evaluator.py:642
Functionevaluate_offline
Deterministically compare tool-selection strategies (no API calls). Returns a dict with per-strategy aggregate metrics and per-task retrieva
chapter4/active-tool-selection/benchmark.py:149
Functionevaluator
Evaluator with the default (most restrictive) sandbox config.
tests/test_ch5_sandbox_evaluator.py:34
Functionevent_collector
Helper to collect all events emitted during tests
chapter9/browser-use-rpa/browser-use/tests/ci/conftest.py:217
Functionevolved_agent
(inp)
tests/test_ch9_hermes_downstream_ablation.py:71
Functionevolved_agent
(inp)
tests/test_ch8_hermes_downstream_ablation.py:71
Functionevolved_agent
(input_data: Any)
chapter9/hermes-self-evolution/run_downstream_ablation.py:492
Functionexample_basic_search
基础搜索示例
chapter1/web-search-agent/examples.py:129
Functionexample_batch_search
批量搜索示例
chapter1/web-search-agent/examples.py:149
Functionexample_comparative_search
比较搜索示例
chapter1/web-search-agent/examples.py:190
Functionexample_contextual_search
带上下文的搜索示例
chapter1/web-search-agent/examples.py:171
Functionexample_fact_check
事实核查示例
chapter1/web-search-agent/examples.py:210
Functionexample_github_pr
Example: GitHub Pull Request creation.
chapter4/execution-tools/examples.py:117
Functionexample_google_calendar
Example: Google Calendar integration.
chapter4/execution-tools/examples.py:99
Functionexample_research_assistant
研究助手示例 - 深度研究某个主题
chapter1/web-search-agent/examples.py:231
Methodexcluded_action
(text: str)
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:461
Functionexecute
(name: str, args: dict)
chapter5/provider-failover/tools.py:43
Functionexecute
()
tests/js/auto-translate.test.js:48
Functionexecute
(index_and_call)
chapter2/local_llm_serving/run_experiment.py:177
Methodexecute
(self, invocable_or_invokables: Callable[..., T])
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:41
Methodexecute
(self, invocable_or_invokables: Callable[..., T] | list[Callable[..., T]])
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:52
Methodexecute
(self, invocable_or_invokables: Callable[..., T])
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:68
Methodexecute
(self, invocable_or_invokables: Callable[..., T] | list[Callable[..., T]])
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:93
Methodexecute
(self, invocable_or_invokables: Callable[..., T] | list[Callable[..., T]])
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:151
Methodexecute
(self, invocable_or_invokables: Callable[..., T] | list[Callable[..., T]])
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:185
Functionexecute_cadquery
在子进程中真实执行 CadQuery 代码并导出 STEP/STL。
chapter5/cad-vs-diffusion/route_a_codegen.py:57
Methodexecute_js
(code: str, browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/browser_use/tools/service.py:998
Methodexecute_task
Retrieve top-k relevant tools for the task, then execute in one shot.
chapter4/active-tool-selection/agent.py:308
Methodexecute_tool
(self, name, arguments)
tests/test_ch2_ollama_native_nonstream_react_loop.py:55
Methodexit_cli
Exit the application
chapter1/search-codegen/main.py:177
Functionexpanded_tool
( query: str = Field(description=query_description), options_json: str = Field(default="{}", d
chapter4/perception-tools/src/expanded_catalog.py:965
Methodexpect_refundable
(self)
chapter5/small-model-codified-rules/tasks.py:29
Methodextension
File extension (e.g. 'txt', 'md')
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:33
Methodextension
(self)
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:87
Methodextension
(self)
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:95
Methodextension
(self)
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:103
Methodextension
(self)
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:111
Methodextension
(self)
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:119
Functionextract_code_block
从 LLM 回复中提取 ```python 代码块。
chapter5/cad-vs-diffusion/llm.py:80
Methodextract_code_blocks
Extract code blocks or instruction examples from text.
chapter3/structured-index/document_processor.py:253
Methodextract_content
(params: ExtractAction, browser_session: BrowserSession, page_extraction_llm: BaseChatModel)
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:589
Methodextract_content
( goal: str, page_extraction_llm, include_links: bool = False, )
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:847
Methodextract_content
Extract structured content from the current page using LLM. Extracts clean markdown from the page and sends it to LLM for structured data extractio
chapter9/browser-use-rpa/browser-use/browser_use/actor/page.py:455
Methodextract_disable_features
(args)
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_profile_disable_security.py:25
Methodextract_intel_opcodes
Extract Intel instruction opcodes and their descriptions. Specific to Intel architecture manuals.
chapter3/structured-index/document_processor.py:272
Methodextract_options_recursive
Recursively extract option elements, including from optgroups.
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/serializer.py:332
Methodextract_sections
Extract sections from text based on patterns. Useful for structured documents like Intel manuals.
chapter3/structured-index/document_processor.py:222
Methodextract_structured_data
( query: str, extract_links: bool, browser_session: BrowserSession, page_extraction_llm: BaseChatM
chapter9/browser-use-rpa/browser-use/browser_use/tools/service.py:602
Methodextract_task_website
(task_text: str)
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:2082
Methodextracted_content
Get all extracted content from history
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:603
Functionextraction_batch
(cache: CachedCalls, schema: Dict[str, Any], rows: List[Dict[str, Any]], index: int)
chapter3/structured-knowledge-extraction/campaign.py:252
Functionextraction_case
Resume a provider-sensitive missing batch one case at a time. Some real CAIL fact combinations can make a whole ten-case request stall or tri
chapter3/structured-knowledge-extraction/campaign.py:269
Functionfactory
( *, name="web_search", arguments=None, call_id="call-1", )
chapter1/web-search-agent/tests/conftest.py:42
Functionfail
(**_)
chapter1/learning-from-experience/test_experiment_8_2_evidence.py:51
Functionfail_second
(client, tracker, agent, messages, json_mode=False, note="")
chapter10/book-translation/test_official_experiment.py:106
Functionfailing_agent
(inp)
tests/test_ch9_hermes_downstream_ablation.py:220
Functionfailing_agent
(inp)
tests/test_ch8_hermes_downstream_ablation.py:220
Functionfailing_handler
(msg, ctx)
tests/test_ch4_notification_dispatcher.py:278
Methodfailing_handler
()
chapter9/harness-safety-gate/test_safety_policy_gate.py:224
Functionfailing_model
(prompt)
tests/test_ch7_evaluate_multilingual.py:197
Functionfailing_model
(prompt)
tests/test_ch8_evaluate_multilingual.py:197
Functionfailing_reaction
(event, st)
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_reactions.py:352
Functionfake_analyze
(path, query)
chapter4/multimodal-agent/test_execute_tool_robust.py:20
Methodfake_auth
()
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:478
Functionfake_call
(provider, payload)
chapter5/provider-failover/tests/test_offline.py:228
Functionfake_call
(messages)
chapter3/user-memory-evaluation/test_structured_rubric.py:95
Functionfake_chat
(messages, **kwargs)
chapter9/ai-style-skill/test_pipeline.py:51
Functionfake_chat
(instruction, players, max_tokens, json_mode=False)
chapter10/voice-werewolf/test_user_simulator.py:142
Functionfake_completion
(messages)
chapter2/prompt-engineering/test_user_empty_response.py:26
Functionfake_create
(**kwargs)
chapter2/local_llm_serving/test_parallel_tools.py:98
Functionfake_create
(_client, **kwargs)
chapter10/voice-werewolf/test_user_simulator.py:75
Functionfake_distill
(client, problem, args, semaphore)
chapter8/cot-distillation/test_empty_problems.py:94
Functionfake_exec
(code, language, timeout=30.0, stdin=None, files=None)
chapter4/execution-tools/test_null_language.py:25
Functionfake_execute_code
(**_kwargs)
chapter4/execution-tools/test_execution_tools.py:49
Functionfake_get
(url, params=None, timeout=None)
chapter4/perception-tools/test_pubchem_async.py:35
Functionfake_get
(url, **kwargs)
chapter3/contextual-retrieval-for-user-memory/test_top_k.py:33
Functionfake_interactive_mode
(api_key, provider, model)
chapter1/context/tests/test_openrouter_notice.py:78
← previousnext →8,801–8,900 of 13,003, ranked by callers