MCPcopy Create free account

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

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

↓ 1 callersFunctionclean_sql
(text: str)
chapter5/erp-agent/campaign_postgres.py:104
↓ 1 callersFunctionclean_top_level_keys
(d: dict[str, Any])
chapter2/prompt-engineering/tau_bench/model_utils/model/utils.py:69
↓ 1 callersFunctionclean_up
(value, prompt)
chapter10/generative-agents/tests/test_runner_helpers.py:90
↓ 1 callersMethodcleanup
* Cleanup resources
chapter6/live-audio/backend/utils/vad.js:289
↓ 1 callersMethodcleanupTempFiles
* Clean up old temporary files
chapter6/live-audio/backend/utils/speechToText.js:81
↓ 1 callersFunctioncleanup_cloud_client
Clean up the global cloud client.
chapter9/browser-use-rpa/browser-use/browser_use/browser/cloud.py:282
↓ 1 callersMethodcleanup_existing_index
Clean up existing indexes and document store
chapter3/contextual-retrieval/index_local_laws_contextual.py:80
↓ 1 callersMethodcleanup_existing_index
Clean up existing indexes and document store
chapter3/agentic-rag/index_local_laws.py:66
↓ 1 callersMethodcleanup_test_data
Clean up test knowledge base.
chapter9/browser-use-rpa/test_validation.py:70
↓ 1 callersMethodclear
(self)
chapter3/agentic-rag-for-user-memory/indexer.py:49
↓ 1 callersFunctionclearTimer
(id)
web-astro/scripts/reader-navigation.test.mjs:53
↓ 1 callersMethodclear_auth
Clear stored authentication
chapter9/browser-use-rpa/browser-use/browser_use/sync/auth.py:351
↓ 1 callersMethodclear_cache
Clear the page cache
chapter2/context-compression/web_tools.py:303
↓ 1 callersMethodclear_cache
Clear cached DOM state to force rebuild on next access.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/dom_watchdog.py:553
↓ 1 callersFunctionclear_index
Clear the index before demo
chapter3/sparse-embedding/demo.py:37
↓ 1 callersFunctionclient
(payload, response_id)
chapter10/voice-werewolf/test_live_human.py:213
↓ 1 callersMethodclose
(self)
chapter9/browser-use-rpa/browser-use/browser_use/logging_config.py:275
↓ 1 callersMethodclose
(self)
chapter10/autonomous-phone-registration/webrtc_channel.py:603
↓ 1 callersFunctionclose_browser
Close browser session.
chapter4/collaboration-tools/src/browser_tools.py:54
↓ 1 callersMethodclose_page
Close a page by Page object or target ID.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:932
↓ 1 callersMethodclose_tab
(params: CloseTabAction, browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/browser_use/tools/service.py:559
↓ 1 callersMethodcluster_nodes
Cluster embeddings using Gaussian Mixture Model.
chapter3/structured-index/raptor_indexer.py:100
↓ 1 callersFunctioncode_interpreter
在 **独立子进程** 中执行 Python 代码(沙箱),用于验证从网上找到的库 / API。 - pip_install: 需要先安装的第三方包列表;安装到临时目录 .sandbox_packages(--target), 不污染系统环境,并通过 PYTHONPA
chapter9/self-evolving-tools/base_tools.py:142
↓ 1 callersFunctioncognition
()
scripts/book_figures/chapter6.py:136
↓ 1 callersFunctioncollectStreamingResponse
* Collect streaming response data
chapter6/live-audio/backend/tests/test-llm-providers.js:60
↓ 1 callersFunctioncollect_live
(keys, pricing, warmup: bool)
chapter7/agent-cost-analysis/demo.py:74
↓ 1 callersFunctioncollect_live_logs
(run_dir: Path)
chapter5/adaptive-log-parser/campaign.py:168
↓ 1 callersFunctioncollect_offline
(keys, pricing, trace_path)
chapter7/agent-cost-analysis/demo.py:107
↓ 1 callersFunctioncollect_result_metadata
(events: list[dict])
chapter2/agent-skills-ppt/validate_official_run.py:77
↓ 1 callersFunctioncollect_teacher
(run_dir: Path, concurrency: int, max_retries: int)
chapter8/prompt-distillation/run_experiment_8_8.py:208
↓ 1 callersFunctioncolor
(hex, p, property)
web-astro/scripts/figure-style.mjs:33
↓ 1 callersFunctioncolumn_label
列名 -> 中文可读标签。
chapter3/structured-knowledge-extraction/archetypes.py:82
↓ 1 callersFunctioncombine_results
(first: RunResult, second: RunResult | None = None)
chapter2/prompt-injection/run_campaign.py:90
↓ 1 callersFunctioncommandVersion
(command, args)
chapter6/live-audio/backend/run_real_validation.js:71
↓ 1 callersFunctioncommand_for
(args: argparse.Namespace, arm: str)
chapter10/generative-agents/supervise_campaigns.py:71
↓ 1 callersFunctioncommand_output
(*args: str)
chapter6/streaming-speech/demo.py:51
↓ 1 callersFunctioncommand_receipt
(command: list[str], *, cwd: Path | None = None)
chapter4/perception-tools/run_experiment_4_2.py:117
↓ 1 callersFunctioncommit
(discardDraft: boolean)
web-astro/src/scripts/note-editor.ts:100
↓ 1 callersFunctioncommitAudio
()
chapter6/phone-agent/static/app.js:191
↓ 1 callersFunctioncompact_middle
( section: str, retained_chars: int, label: str )
chapter7/android-world/run_controlled_experiment.py:323
↓ 1 callersFunctioncompact_tool_data
(tool_name: str, payload: dict[str, Any])
chapter4/active-tool-discovery/run_exact_experiment.py:439
↓ 1 callersFunctioncompact_vertical_space
Shorten empty horizontal bands without changing text or graph topology. Protect text, horizontal edges and diagonal segments. Vertical connectors
scripts/book_figures/typography.py:72
↓ 1 callersMethodcomparative_search
比较搜索 - 搜索并比较多个项目 Args: items: 要比较的项目列表 aspect: 比较的方面 Returns: 比较结果
chapter1/web-search-agent/examples.py:75
↓ 1 callersFunctioncompare
按多重集合(忽略行顺序)比对期望与实际结果,数值带容差。
chapter5/erp-agent/demo.py:62
↓ 1 callersFunctioncompare_ann
(base: np.ndarray, queries: np.ndarray, top_k: int, backends: List[str], annoy_n_trees: int, h
chapter3/dense-embedding/cli.py:280
↓ 1 callersFunctioncompare_backends
Compare results from different backends for the same query
chapter3/agentic-rag/test_structured_backends.py:99
↓ 1 callersFunctioncompare_extraction_modes
Compare different extraction modes for the same content
chapter4/multimodal-agent/demo.py:31
↓ 1 callersFunctioncompare_implementations
Compare different KV cache implementations Args: api_key: API key for Kimi task: Task to execute root_dir: Root dire
chapter2/kv-cache/agent.py:834
↓ 1 callersMethodcompare_learning_curves
Create visualization comparing learning curves of both methods.
chapter1/learning-from-experience/experiment.py:265
↓ 1 callersFunctioncompare_models
Compare different models for the same task
chapter4/multimodal-agent/demo.py:138
↓ 1 callersMethodcompare_modes
Compare agentic vs non-agentic performance
chapter3/contextual-retrieval/evaluation/evaluate.py:257
↓ 1 callersMethodcompare_modes
Compare agentic vs non-agentic performance
chapter3/agentic-rag/evaluation/evaluate.py:265
↓ 1 callersFunctioncompare_on_prompt
Compare three models on the same prompt
chapter8/continued-pretraining/compare_models.py:70
↓ 1 callersMethodcompare_retrieval_methods
Compare contextual vs non-contextual retrieval
chapter3/contextual-retrieval/index_local_laws_contextual.py:472
↓ 1 callersFunctioncompare_streaming_vs_regular
Compare streaming vs regular responses
chapter2/local_llm_serving/test_streaming.py:110
↓ 1 callersFunctioncompare_win_rates
Compare predicted win rates from Elo with empirical win rates. Args: elo_system: Trained Elo rating system empirical_df:
chapter7/elo-leaderboard/leaderboard.py:94
↓ 1 callersFunctioncomparison
()
scripts/book_figures/chapter8.py:66
↓ 1 callersFunctioncomplete_rubric
(row: dict)
chapter7/user-memory-system-evaluation/supplement_73_missing.py:34
↓ 1 callersFunctioncomponent_scores
(suite: str, case: dict, events: list[dict], root: Path)
chapter2/system-hint/run_experiment_2_8.py:390
↓ 1 callersFunctioncomponents
()
scripts/book_figures/introduction.py:35
↓ 1 callersMethodcompress
Apply a specific compression strategy to a given context string.
chapter2/context-compression/benchmark_compression.py:163
↓ 1 callersMethodcompress
Compress cluster into a summary
chapter3/memobase/agent.py:88
↓ 1 callersMethodcompress_for_history
Compress content for message history (used in windowed context strategy) Args: content: Content to compress
chapter2/context-compression/compression_strategies.py:133
↓ 1 callersMethodcompress_search_results
Compress search results based on the selected strategy Args: search_results: Raw search results from web tool
chapter2/context-compression/compression_strategies.py:100
↓ 1 callersFunctioncompression_flows
()
scripts/book_figures/chapter2.py:356
↓ 1 callersFunctioncompression_results
()
scripts/book_figures/chapter2.py:342
↓ 1 callersMethodcompute_aggregate_metrics
Compute aggregate metrics from results
chapter3/contextual-retrieval/evaluation/evaluate.py:198
↓ 1 callersMethodcompute_aggregate_metrics
Compute aggregate metrics from results
chapter3/agentic-rag/evaluation/evaluate.py:206
↓ 1 callersFunctioncompute_online_elo_leaderboard
Compute leaderboard using online Elo updates (K=4, official value). This method updates ratings sequentially as matches are processed.
chapter7/elo-leaderboard/main.py:23
↓ 1 callersFunctioncomputer_loop
()
scripts/book_figures/chapter6.py:155
↓ 1 callersFunctioncomputer_tools
()
scripts/book_figures/chapter6.py:168
↓ 1 callersFunctionconcat_segments
(run_dir: Path, pages: list[dict[str, Any]], output: Path)
chapter5/paper-to-video/campaign.py:309
↓ 1 callersFunctionconcat_segments
用 concat demuxer 把各分段无损拼接为最终 mp4。
chapter5/paper-to-video/demo.py:360
↓ 1 callersMethodcondition_comparison
Compare all conditions for a given model.
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/metrics.py:159
↓ 1 callersFunctionconfigure
(translate, conf)
extras/auto-translate.js:92
↓ 1 callersFunctionconfigure_arm
(server: Any, arm: str, starting_step: int)
chapter10/generative-agents/run_campaign.py:456
↓ 1 callersFunctionconfigure_imports
(upstream: Path, storage: Path, temp_storage: Path)
chapter10/generative-agents/run_campaign.py:73
↓ 1 callersMethodconfigure_settings
Configure RAG and evaluation settings
chapter3/agentic-rag-for-user-memory/main.py:199
↓ 1 callersMethodconfigure_settings
Configure system settings
chapter3/contextual-retrieval-for-user-memory/main.py:699
↓ 1 callersMethodconfigured
(self)
chapter7/tts-quality-eval/config.py:86
↓ 1 callersFunctionconfigured_languages
Read inline ``extra.languages`` entries without a YAML dependency.
scripts/site_i18n.py:79
↓ 1 callersMethodconnect
Connect to a remote chromium-based browser via CDP using cdp-use. This MUST succeed or the browser is unusable. Fails hard on any error.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1223
↓ 1 callersMethodconnect
Connect to MCP server and discover available tools.
chapter9/browser-use-rpa/browser-use/browser_use/mcp/controller.py:51
↓ 1 callersFunctionconnect_playwright_to_cdp
Connect Playwright to the same Chrome instance Browser-Use is using. This enables custom actions to use Playwright functions.
chapter9/browser-use-rpa/browser-use/examples/browser/playwright_integration.py:128
↓ 1 callersMethodconnect_server
Connect to an MCP server with proper error isolation NOTE: This stores tool metadata only. For actual tool execution,
chapter6/agent-with-event-trigger/agent.py:144
↓ 1 callersMethodconnect_server
Connect to an MCP server and discover its tools.
chapter9/browser-use-rpa/browser-use/examples/mcp/advanced_server.py:56
↓ 1 callersFunctionconnections
(svg)
web-astro/scripts/evaluation-overview-layout.test.mjs:48
↓ 1 callersFunctionconnectorSegments
(svg)
web-astro/scripts/collaboration-manager-figures.test.mjs:83
↓ 1 callersFunctionconsistent_hash
( value: Hashable, )
chapter2/prompt-engineering/tau_bench/envs/base.py:38
↓ 1 callersFunctionconsolidate_schema
(cache: CachedCalls, raw_factors: List[Dict[str, Any]])
chapter3/structured-knowledge-extraction/campaign.py:227
↓ 1 callersFunctioncontains_secret
(path: Path)
chapter10/generative-agents/validate_campaign.py:43
↓ 1 callersFunctioncontains_term
(value: str, term: str)
chapter7/user-memory-policy-eval/runner.py:157
↓ 1 callersFunctioncontains_terms
(node: dict[str, Any], terms: Iterable[str])
chapter10/generative-agents/analyze_campaign.py:43
↓ 1 callersFunctioncontext_ablation
()
scripts/book_figures/chapter1.py:71
↓ 1 callersFunctioncontext_example
()
scripts/book_figures/chapter2.py:42
↓ 1 callersFunctioncontext_history
()
scripts/book_figures/chapter4.py:88
↓ 1 callersFunctioncontext_layout
()
scripts/book_figures/chapter2.py:128
↓ 1 callersFunctioncontexts
()
scripts/book_figures/chapter10.py:6
↓ 1 callersFunctioncontextual
()
scripts/book_figures/chapter3.py:331
↓ 1 callersFunctioncontextualize
(case: Dict[str, Any], chunks: List[Dict[str, Any]], recorder: ChatRecorder, args: argparse.Namespace)
chapter3/memory_rag_campaign.py:195
← previousnext →4,501–4,600 of 13,003, ranked by callers