MCPcopy Create free account

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

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

↓ 2 callersFunctionget_article_history
Get historical version of Wikipedia article. Args: title: Article title date: Target date (YYYY/MM/DD) language:
chapter4/perception-tools/src/wiki_enhanced.py:180
↓ 2 callersFunctionget_backend_metadata
()
chapter9/prompt-auto-optimization/config.py:162
↓ 2 callersFunctionget_background_log_path
Return a platform-appropriate path for a background job log.
chapter5/coding-agent/tools/shell_session.py:21
↓ 2 callersFunctionget_bootstrap_result
Compute bootstrap confidence intervals for Elo ratings. Args: battles: DataFrame with battle data func_compute_elo: Func
chapter7/elo-leaderboard/bradley_terry.py:177
↓ 2 callersMethodget_by_category
Get all test cases in a specific category.
chapter3/user-memory-evaluation/models.py:143
↓ 2 callersFunctionget_client
OpenAI 直连 client:用于 TTS 合成与 Whisper 回译(这两项不能走 OpenRouter)。
chapter7/tts-quality-eval/pipeline.py:35
↓ 2 callersFunctionget_client
创建 LLM 客户端。 通用回退策略: 1) 有 OPENAI_API_KEY -> 直连 OpenAI(尊重可选的 OPENAI_BASE_URL); 2) 否则有 OPENROUTER_API_KEY -> 自动改走 OpenRouter 网关,并把 MODEL
chapter10/book-translation/agents.py:56
↓ 2 callersFunctionget_client
返回全局共享的 LLM 客户端(懒加载,进程内单例)。 仅在线模式(真实调用 LLM)才会用到;离线模式不导入 openai、不构造客户端。 1) 有 ARK/Moonshot key -> 使用其 OpenAI-compatible real endpoint;
chapter10/voice-werewolf/werewolf/agent.py:62
↓ 2 callersMethodget_client_config
Get OpenAI client configuration
chapter3/contextual-retrieval/config.py:134
↓ 2 callersMethodget_conversation_context
Get surrounding context for a specific chunk Args: chunk_id: The chunk ID to get context for context
chapter3/contextual-retrieval-for-user-memory/tools.py:104
↓ 2 callersMethodget_conversation_history
Get conversation history in OpenAI format
chapter4/multimodal-agent/agent.py:1132
↓ 2 callersFunctionget_cross_platform_font
Get a cross-platform compatible font with caching to prevent memory leaks. Args: font_size: Size of the font to load Returns: ImageFont
chapter9/browser-use-rpa/browser-use/browser_use/browser/python_highlights.py:36
↓ 2 callersFunctionget_crypto_price
Get cryptocurrency price information using CoinGecko API (free, no API key required). Args: symbol: Cryptocurrency symbol or ID
chapter4/perception-tools/src/public_data_tools.py:551
↓ 2 callersFunctionget_default_llm
Get default LLM config from config dict.
chapter9/browser-use-rpa/browser-use/browser_use/config.py:503
↓ 2 callersFunctionget_default_profile
Get default browser profile from config dict.
chapter9/browser-use-rpa/browser-use/browser_use/config.py:498
↓ 2 callersMethodget_document
Retrieve the entire document from the knowledge base. Args: doc_id: Document ID Returns:
chapter3/contextual-retrieval/tools.py:308
↓ 2 callersMethodget_document
Retrieve the entire document from the knowledge base. Args: doc_id: Document ID Returns:
chapter3/agentic-rag/tools.py:301
↓ 2 callersMethodget_element_by_prompt
Get an element by a prompt.
chapter9/browser-use-rpa/browser-use/browser_use/actor/page.py:365
↓ 2 callersMethodget_elements_by_css_selector
Get elements by CSS selector.
chapter9/browser-use-rpa/browser-use/browser_use/actor/page.py:333
↓ 2 callersMethodget_email
(self, email_id: str)
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:212
↓ 2 callersMethodget_embedding_dimension
Get the dimension of the embeddings.
chapter3/dense-embedding/embedding_service.py:180
↓ 2 callersFunctionget_excel_metadata
Get Excel file metadata. Args: file_path: Path to Excel file Returns: Dictionary with metadata
chapter4/collaboration-tools/src/excel_tools.py:233
↓ 2 callersMethodget_file_info
Get detailed information about a file. Args: file_path: Path to the file Returns:
chapter4/execution-tools/filesystem_enhanced.py:369
↓ 2 callersMethodget_full_conversation
Retrieve all chunks from a specific conversation Args: conversation_id: Conversation identifier test
chapter3/contextual-retrieval-for-user-memory/tools.py:188
↓ 2 callersFunctionget_image_metadata
Get detailed image metadata including EXIF data. Args: image_path: Path to image file Returns: TextContent
chapter4/perception-tools/src/media_processing_tools.py:768
↓ 2 callersMethodget_json
(self, path: str)
chapter2/local_llm_serving/run_experiment.py:66
↓ 2 callersMethodget_layer3_test_cases
Get only Layer 3 test cases (most complex)
chapter3/log-sanitization/test_loader.py:81
↓ 2 callersMethodget_leaderboard
Get sorted leaderboard using NumPy's fast sorting. Returns: List of tuples (model, rating, matches, wins)
chapter7/elo-leaderboard/optimized_elo.py:211
↓ 2 callersFunctionget_llm
Get the language model based on config and available API keys.
chapter9/browser-use-rpa/browser-use/browser_use/cli.py:223
↓ 2 callersFunctionget_llm_by_name
Factory function to create LLM instances from string names with API keys from environment. Args: model_name: String name like 'azure_gpt_4_1_
chapter9/browser-use-rpa/browser-use/browser_use/llm/models.py:57
↓ 2 callersFunctionget_majority
(results: list[T])
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:127
↓ 2 callersMethodget_or_create_inbox_client
Create a default inbox profile for this API key (assume that agent is on free tier) If you are not on free tier it is recommended to create 1 in
chapter9/browser-use-rpa/browser-use/examples/integrations/agentmail/email_tools.py:77
↓ 2 callersMethodget_pages
Get all available pages.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:918
↓ 2 callersMethodget_performance_summary
Get performance summary for a session or all sessions.
chapter3/mem0/agent.py:422
↓ 2 callersMethodget_prompt_description
Get a description of all actions for the prompt If page_url is provided, only include actions that are available for that URL based on their doma
chapter9/browser-use-rpa/browser-use/browser_use/tools/registry/service.py:568
↓ 2 callersFunctionget_rating_history
Extract rating history for all models over time. Args: historical_leaderboards: List of (date, leaderboard_df) tuples
chapter7/elo-leaderboard/leaderboard.py:162
↓ 2 callersFunctionget_sample_task
Get the sample task for summarizing week1 and week2 projects
chapter2/system-hint/main.py:84
↓ 2 callersFunctionget_sample_tasks
Get sample tasks for demonstration
chapter2/local_llm_serving/main.py:191
↓ 2 callersMethodget_screenshot
Load screenshot from disk and return as base64 string
chapter9/browser-use-rpa/browser-use/browser_use/browser/views.py:99
↓ 2 callersMethodget_serialized_dom_tree
Get the serialized DOM tree representation for LLM consumption. Returns: Tuple of (serialized_dom_state, enhanced_dom_tree_root, timing_info)
chapter9/browser-use-rpa/browser-use/browser_use/dom/service.py:717
↓ 2 callersMethodget_stats
Get store statistics.
chapter3/retrieval-pipeline/document_store.py:90
↓ 2 callersMethodget_stats
Get service statistics.
chapter3/dense-embedding/test_client.py:48
↓ 2 callersMethodget_status
Get agent status
chapter6/agent-with-event-trigger/client.py:86
↓ 2 callersFunctionget_sys_prompt
(condition)
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety_final.py:115
↓ 2 callersMethodget_target_info
(self)
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:185
↓ 2 callersMethodget_target_info
Get target information.
chapter9/browser-use-rpa/browser-use/browser_use/actor/page.py:261
↓ 2 callersMethodget_test_case_conversations
Get detailed conversation histories for a specific test case
chapter3/log-sanitization/test_loader.py:86
↓ 2 callersFunctionget_timer_status
Get status of a specific timer. Args: timer_id: ID of the timer to check Returns: Dictionary with timer status
chapter4/collaboration-tools/src/timer_tools.py:236
↓ 2 callersMethodget_title
Get the current title.
chapter9/browser-use-rpa/browser-use/browser_use/actor/page.py:272
↓ 2 callersMethodget_todo_contents
Get todo file contents
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:454
↓ 2 callersFunctionget_tool_definitions
Get OpenAI function calling tool definitions Returns: List of tool definitions for OpenAI API
chapter3/agentic-rag-for-user-memory/tools.py:252
↓ 2 callersFunctionget_tool_definitions
Get OpenAI function calling tool definitions Returns: List of tool definitions for OpenAI API
chapter3/contextual-retrieval-for-user-memory/tools.py:252
↓ 2 callersMethodget_tool_schemas
Get OpenAI-compatible tool schemas
chapter2/attention_visualization/tools.py:110
↓ 2 callersFunctionget_weather
Get current weather information for a location using Open-Meteo API. Args: location: City name for display purposes lati
chapter4/perception-tools/src/public_data_tools.py:24
↓ 2 callersFunctionglyph_info
(char, cmap)
scripts/book_figures/typography.py:24
↓ 2 callersMethodgrep
Search for pattern in files (similar to Unix grep command) Args: pattern: Regular expression pattern to search f
chapter2/kv-cache/agent.py:257
↓ 2 callersMethodhandleError
(error)
chapter6/live-audio/backend/server.js:169
↓ 2 callersMethodhandle_parse_force_response
(self, prompt: str, content: str)
chapter2/prompt-engineering/tau_bench/model_utils/model/completion.py:254
↓ 2 callersMethodhandoff_chain_str
返回可读的移交链,如 triage → research → data_analysis → writing → triage。
chapter10/multi-role-transfer/orchestrator.py:277
↓ 2 callersMethodhas_gold
Whether gold facts are available for the given test case.
chapter3/user-memory-evaluation/metrics.py:78
↓ 2 callersFunctionhas_llm
True when at least one usable LLM credential is configured.
chapter4/collaboration-tools/src/llm_fallback.py:44
↓ 2 callersFunctionhelpers
(labels)
web-astro/scripts/training-systems-figures.mjs:34
↓ 2 callersFunctionhelpers
(labels)
web-astro/scripts/training-sequences-figures.mjs:41
↓ 2 callersFunctionhelpers
(labels)
web-astro/scripts/evolution-methods-figures.mjs:66
↓ 2 callersFunctionhelpers
(labels)
web-astro/scripts/training-workflows-figures.mjs:40
↓ 2 callersMethodhide_intro_panels
Hide the intro panels, show info panels and the three-column view.
chapter9/browser-use-rpa/browser-use/browser_use/cli.py:715
↓ 2 callersMethodhierarchical_summarization
Create hierarchical summaries of communities.
chapter3/structured-index/graphrag_indexer.py:311
↓ 2 callersFunctionimage_targets
(text: str)
chapter10/book-translation/run_official_experiment.py:135
↓ 2 callersMethodindex_batch
Index multiple documents at once
chapter3/sparse-embedding/bm25_engine.py:450
↓ 2 callersMethodindex_contextual_chunks
Index contextual chunks for both BM25 and semantic search. Educational Note: This demonstrates the dual indexing str
chapter3/contextual-retrieval/contextual_tools.py:108
↓ 2 callersMethodindex_directory
Index all files in a directory. Args: dir_path: Directory path extensions: File extensions to includ
chapter3/contextual-retrieval/chunking.py:203
↓ 2 callersMethodindex_directory
Index all files in a directory. Args: dir_path: Directory path extensions: File extensions to includ
chapter3/agentic-rag/chunking.py:203
↓ 2 callersMethodindex_document
Index a document.
chapter3/retrieval-pipeline/test_client.py:20
↓ 2 callersMethodindex_document
Index a document.
chapter3/retrieval-pipeline/demo.py:20
↓ 2 callersMethodindex_document
Index a document.
chapter3/dense-embedding/test_client.py:16
↓ 2 callersMethodindex_graphrag_data
Bulk ingest GraphRAG entities, relationships, and communities.
chapter3/structured-index/hybrid_retriever.py:219
↓ 2 callersMethodindex_raptor_nodes
Bulk ingest RAPTOR tree nodes (objects or dicts).
chapter3/structured-index/hybrid_retriever.py:187
↓ 2 callersFunctionindices
(value)
web-astro/scripts/chapter3-figure-kit.mjs:69
↓ 2 callersMethodinfer_text
( self, prompt: str, *, max_new_tokens: int = 256 )
chapter6/end-to-end-speech/speech_model.py:142
↓ 2 callersMethodinitialize_agent
Initialize the agent. Optional overrides (model/provider/base_url) take precedence over the values in the .env file; anything left as
chapter5/coding-agent/main.py:114
↓ 2 callersMethodinject_review_fault
Insert one real, auditable lint defect for the rollback campaign. The normal demo never calls this method. The strict acceptance runner
chapter10/staged-system-prompt/tools.py:147
↓ 2 callersFunctioninset
(id, options)
web-astro/scripts/coding-production-layout.mjs:644
↓ 2 callersFunctioninteractive_chat
Interactive chat session with the agent
chapter4/multimodal-agent/main.py:95
↓ 2 callersMethodintersects
(self, other: 'Rect')
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/paint_order.py:28
↓ 2 callersMethodinvalidate_workflow
Remove a broken workflow from retrieval and preserve it for audit.
chapter9/browser-use-rpa/learning_agent/knowledge_base.py:107
↓ 2 callersMethodinvoke
(*args, **kwargs)
chapter2/prompt-engineering/tau_bench/envs/tool.py:7
↓ 2 callersFunctionisChapterStart
(lesson)
slides/generate.mjs:106
↓ 2 callersFunctionisDemoHeavy
(lesson)
slides/generate.mjs:92
↓ 2 callersMethodisOpened
(self)
chapter4/perception-tools/test_analyze_video_release_on_error.py:66
↓ 2 callersFunctionisVisible
(element: HTMLElement | null)
web-astro/src/scripts/reader-navigation.ts:111
↓ 2 callersMethodis_authenticated
Check if Gmail service is authenticated
chapter9/browser-use-rpa/browser-use/browser_use/integrations/gmail/service.py:73
↓ 2 callersFunctionis_clarifying_question
(result: Dict[str, Any])
chapter1/search-codegen/run_experiment_1_3.py:160
↓ 2 callersMethodis_file_input
Check if element is a file input.
chapter9/browser-use-rpa/browser-use/browser_use/browser/watchdogs/dom_watchdog.py:560
↓ 2 callersFunctionis_running_in_docker
Detect if we are running in a docker container, for the purpose of optimizing chrome launch flags (dev shm usage, gpu settings, etc.)
chapter9/browser-use-rpa/browser-use/browser_use/config.py:20
↓ 2 callersMethodjson
(self)
chapter1/search-codegen/test_config_and_usage.py:57
↓ 2 callersFunctionjson_request
(url: str)
chapter6/phone-agent/run_acceptance.py:39
↓ 2 callersFunctionjsonable
(value: Any)
chapter5/erp-agent/campaign_postgres.py:67
↓ 2 callersFunctionjudge
Judge wire events and task output separately; an ACK alone never passes.
chapter6/astra-async-steering/validation/runs/pilot-20260905-v1/source/experiment.py:97
↓ 2 callersFunctionjudge
Judge wire events and task output separately; an ACK alone never passes.
chapter6/astra-async-steering/validation/runs/pilot-20260905-v2/source/experiment.py:97
↓ 2 callersFunctionjudge_chapter
( client: OpenAI, model: str, source: str, x_translation: str, y_translation: str, dis
chapter10/book-translation/run_official_experiment.py:257
← previousnext →2,301–2,400 of 13,003, ranked by callers