MCPcopy Create free account

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

Functions2,925 in github.com/bojieli/ai-agent-book

↓ 1 callersMethodfrom_env
Create configuration from environment variables
chapter2/system-hint/config.py:36
↓ 1 callersMethodfrom_general_model
( cls, model: GeneralModel, sampling_strategy: SamplingStrategy | None = None,
chapter2/prompt-engineering/tau_bench/model_utils/api/api.py:84
↓ 1 callersMethodfrom_json
Deserialize workflow from JSON string
chapter8/browser-use-rpa/learning_agent/workflow.py:158
↓ 1 callersMethodfrom_trace
(cls, d: dict[str, Any])
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:113
↓ 1 callersMethodfrom_yaml
Create test case from YAML data
chapter3/contextual-retrieval-for-user-memory/contextual_evaluator.py:67
↓ 1 callersFunctiongenerate
(prompt, out)
book/gen_cover.py:75
↓ 1 callersMethodgenerateAIResponse
()
chapter9/live-audio/backend/server.js:346
↓ 1 callersMethodgenerateMessageId
()
chapter9/live-audio/backend/server.js:217
↓ 1 callersFunctiongenerate_conversation_round
Generate a single conversation round based on scenario
chapter3/user-memory-evaluation/generate_test_cases.py:207
↓ 1 callersFunctiongenerate_distillation_data
Generate prompt distillation training data. Args: input_file: Path to file containing sentences to classify (one per line)
chapter8/prompt-distillation/create_data.py:144
↓ 1 callersMethodgenerate_from_prompt
(self, prompt: str, temperature: float | None = None)
chapter2/prompt-engineering/tau_bench/model_utils/model/completion.py:245
↓ 1 callersFunctiongenerate_html_animation
Generate standalone HTML file with D3.js bar chart race animation. Args: animation_data: Dictionary from prepare_animation_data
chapter6/elo-leaderboard/animation.py:58
↓ 1 callersMethodgenerate_next_step
( self, messages: List[Dict[str, Any]] )
chapter2/prompt-engineering/tau_bench/agents/chat_react_agent.py:37
↓ 1 callersFunctiongenerate_openai
OpenAI Images API. Uses gpt-image-1 if available, else dall-e-3.
book/gen_cover.py:40
↓ 1 callersMethodgenerate_report
Generate a comprehensive report of the ablation study Args: results: List of test results analysis:
chapter1/context/main.py:319
↓ 1 callersMethodgenerate_report
Generate a summary report of evaluation results.
chapter3/user-memory-evaluation/evaluator.py:286
↓ 1 callersMethodgenerate_report
Generate and save evaluation report.
chapter3/user-memory-evaluation/main.py:183
↓ 1 callersMethodgenerate_report
Generate evaluation report Args: output_file: Optional file path to save report Returns:
chapter3/contextual-retrieval-for-user-memory/evaluator.py:521
↓ 1 callersMethodgenerate_report
Generate evaluation report
chapter3/contextual-retrieval-for-user-memory/contextual_evaluator.py:644
↓ 1 callersFunctiongenerate_report_location
()
chapter2/prompt-engineering/tau_bench/model_utils/api/exception.py:28
↓ 1 callersFunctiongenerate_response
生成多语言推理响应 Args: model: 训练好的模型 tokenizer: 分词器 reasoning_language: 推理使用的语言 user_prompt: 用户提问 max_n
chapter7/MultilingualReasoning/gpt_oss_20b_sft.py:354
↓ 1 callersFunctiongenerate_speech
Generate speech from text. Args: model: The loaded model processor: The processor text: Text to convert to speec
chapter7/sesame/inference.py:66
↓ 1 callersFunctiongenerate_speech_batch
Generate speech for multiple texts.
chapter7/sesame/batch_inference.py:81
↓ 1 callersMethodgenerate_summary
Generate and log a summary of all results
chapter2/context-compression/run_all_strategies.py:280
↓ 1 callersFunctiongenerate_summary_report
Generate a comprehensive summary report
chapter2/prompt-engineering/analyze_results.py:238
↓ 1 callersFunctiongenerate_test_case
Generate a complete test case structure
chapter3/user-memory-evaluation/generate_test_cases.py:242
↓ 1 callersFunctiongenerate_text
Generate text without streaming
chapter7/continued-pretraining/compare_models.py:51
↓ 1 callersMethodgenerate_with_attention_streaming
Generate text with streaming output while tracking attention, returning GenerationResult format Args: prompt: In
chapter2/attention_visualization/main.py:207
↓ 1 callersMethodgenerate_with_streaming
Generate text with token-by-token streaming and stop at EOS Args: prompt: Input prompt max_new_token
chapter2/attention_visualization/main.py:85
↓ 1 callersMethodgetHeaders
()
chapter9/live-audio/backend/utils/providers/llmProviders.js:90
↓ 1 callersMethodgetProviderInfo
* Get current provider information * @returns {Object} Current provider information
chapter9/live-audio/backend/utils/speechToText.js:133
↓ 1 callersMethodget_all_legal_documents
Get all legal documents from local laws directory
chapter3/contextual-retrieval/index_local_laws_contextual.py:112
↓ 1 callersMethodget_all_legal_documents
Get all legal documents from local laws directory
chapter3/agentic-rag/index_local_laws.py:98
↓ 1 callersFunctionget_api_config
Get API configuration from environment.
chapter3/structured-index/config.py:84
↓ 1 callersMethodget_api_key
Get API key for the specified provider Args: provider: Provider name (defaults to LLM_PROVIDER)
chapter1/context/config.py:68
↓ 1 callersFunctionget_archived_content
Get content from archived webpage. Args: url: URL to retrieve timestamp: Wayback timestamp (YYYYMMDDhhmmss)
chapter4/perception-tools/src/wayback_enhanced.py:21
↓ 1 callersFunctionget_article_categories
Get categories for Wikipedia article. Args: title: Article title language: Language code Returns: T
chapter4/perception-tools/src/wiki_enhanced.py:83
↓ 1 callersFunctionget_article_content
Get full Wikipedia article content. Args: title: Article title language: Language code Returns: Tex
chapter4/perception-tools/src/wiki_enhanced.py:23
↓ 1 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
↓ 1 callersFunctionget_article_links
Get links from Wikipedia article. Args: title: Article title language: Language code Returns: TextC
chapter4/perception-tools/src/wiki_enhanced.py:131
↓ 1 callersFunctionget_arxiv_categories
Get list of ArXiv subject categories. Returns: TextContent with categories
chapter4/perception-tools/src/arxiv_enhanced.py:157
↓ 1 callersMethodget_attention_steps
Convert cached data into AttentionStep objects
chapter2/attention_visualization/agent.py:131
↓ 1 callersFunctionget_bootstrap_result
Compute bootstrap confidence intervals for Elo ratings. Args: battles: DataFrame with battle data func_compute_elo: Func
chapter6/elo-leaderboard/bradley_terry.py:153
↓ 1 callersMethodget_by_id
Get a specific test case by ID.
chapter3/user-memory-evaluation/models.py:108
↓ 1 callersFunctionget_calendar_events
Get events from Google Calendar. Args: start_date: Start date (ISO format, defaults to today) end_date: End date (ISO fo
chapter4/perception-tools/src/private_data_tools.py:20
↓ 1 callersMethodget_capability
Return the capability of the model, a float between 0.0 and 1.0.
chapter2/prompt-engineering/tau_bench/model_utils/model/model.py:35
↓ 1 callersMethodget_client_config
Get OpenAI client configuration
chapter3/agentic-rag-for-user-memory/config.py:87
↓ 1 callersMethodget_client_config
Get OpenAI client configuration
chapter3/agentic-rag/config.py:96
↓ 1 callersMethodget_command_history
Get recent command history. Args: count: Number of recent commands Returns: Dic
chapter4/execution-tools/terminal_controller.py:480
↓ 1 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:539
↓ 1 callersMethodget_current_directory
Get the current working directory. Returns: Dictionary with current directory path
chapter4/execution-tools/terminal_controller.py:92
↓ 1 callersMethodget_data_hash
(self)
chapter2/prompt-engineering/tau_bench/envs/base.py:121
↓ 1 callersFunctionget_default_sampling_strategy
()
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:231
↓ 1 callersMethodget_documents_by_ids
Retrieve multiple documents by their IDs. Args: doc_ids: List of document IDs Returns:
chapter3/dense-embedding/document_store.py:153
↓ 1 callersMethodget_evaluator_config
Get configuration for the specified evaluator.
chapter3/user-memory-evaluation/config.py:33
↓ 1 callersMethodget_history
Get the current conversation history
chapter1/search-codegen/agent.py:315
↓ 1 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:654
↓ 1 callersMethodget_index_info
Get comprehensive information about the index
chapter3/sparse-embedding/bm25_engine.py:465
↓ 1 callersMethodget_index_structure
Get a visualization-friendly representation of the index
chapter3/sparse-embedding/bm25_engine.py:210
↓ 1 callersMethodget_info
()
chapter2/prompt-engineering/tau_bench/envs/tool.py:11
↓ 1 callersMethodget_llm_config
Get LLM configuration based on provider.
chapter4/execution-tools/config.py:81
↓ 1 callersMethodget_output
(self)
chapter2/context-compression/run_all_strategies.py:156
↓ 1 callersFunctionget_output_non_blocking
Read output non-blocking to avoid hanging.
chapter4/execution-tools/multilang_executor.py:26
↓ 1 callersFunctionget_paper_details
Get detailed information about an ArXiv paper. Args: paper_id: ArXiv paper ID (e.g., '2301.07041') Returns:
chapter4/perception-tools/src/arxiv_enhanced.py:20
↓ 1 callersMethodget_recent_turns
Get recent conversation turns Args: limit: Maximum number of turns to return Returns:
chapter3/user-memory/conversation_history.py:114
↓ 1 callersMethodget_retrieval_metrics
Get detailed retrieval metrics for analysis
chapter3/contextual-retrieval/contextual_agent.py:285
↓ 1 callersMethodget_session_id
Get the current session ID
chapter3/user-memory/conversational_agent.py:259
↓ 1 callersMethodget_statistics
Get pipeline statistics. Returns: Statistics dictionary
chapter3/retrieval-pipeline/retrieval_pipeline.py:388
↓ 1 callersMethodget_stats
Get store statistics.
chapter3/retrieval-pipeline/document_store.py:82
↓ 1 callersFunctionget_stock_price
Get stock price information. Args: symbol: Stock ticker symbol (e.g., AAPL, TSLA) interval: Data interval (1d, 1h, etc.)
chapter4/perception-tools/src/public_data_tools.py:149
↓ 1 callersFunctionget_tool_definitions
Get OpenAI-format tool definitions
chapter3/contextual-retrieval/tools.py:481
↓ 1 callersFunctionget_tool_definitions
Get OpenAI-format tool definitions
chapter3/agentic-rag/tools.py:457
↓ 1 callersMethodget_total_cost
(self)
chapter2/prompt-engineering/tau_bench/envs/user.py:84
↓ 1 callersMethodget_user_input
Get user input with a nice prompt
chapter5/coding-agent/main.py:289
↓ 1 callersFunctiongoogle_search_api
Search Google using Custom Search API. Args: query: Search query num_results: Number of results (1-10) safe_sear
chapter4/perception-tools/src/google_search_enhanced.py:22
↓ 1 callersFunctiongreet
Return a friendly greeting for the given name.
chapter5/coding-agent/hello_world.py:5
↓ 1 callersFunctiongreet
(name)
chapter4/execution-tools/test_script.py:1
↓ 1 callersFunctiongrep_search
Search for a pattern in files using grep-like functionality. Args: pattern: Regular expression pattern to search for dir
chapter4/perception-tools/src/filesystem_tools.py:87
↓ 1 callersFunctionhandleInterrupt
()
chapter9/live-audio/frontend/pages/index.tsx:495
↓ 1 callersFunctionhandleTrajectorySelect
(index: number)
chapter2/attention_visualization/frontend/pages/index.tsx:160
↓ 1 callersMethodhandle_command
Handle special commands. Returns True if it was a command, False otherwise.
chapter5/coding-agent/main.py:151
↓ 1 callersMethodhasSufficientAudio
* Check if audio buffer has sufficient content for transcription * @param {Buffer} audioBuffer - Audio buffer to check * @returns {boolean} True
chapter9/live-audio/backend/utils/speechToText.js:110
↓ 1 callersFunctionhash_func_call
(func: Callable[..., Any], args: tuple[Any], kwargs: dict[str, Any])
chapter2/prompt-engineering/tau_bench/model_utils/api/cache.py:46
↓ 1 callersFunctionhash_item
(item: Any)
chapter2/prompt-engineering/tau_bench/model_utils/api/cache.py:32
↓ 1 callersMethodindex_batch
Index multiple documents at once
chapter3/sparse-embedding/bm25_engine.py:402
↓ 1 callersMethodindex_chunk
Index a contextual chunk in the retrieval pipeline
chapter3/contextual-retrieval/index_local_laws_contextual.py:236
↓ 1 callersMethodindex_chunk
Index a chunk in the retrieval pipeline
chapter3/agentic-rag/index_local_laws.py:260
↓ 1 callersMethodindex_conversation
Index a conversation turn in Dify Args: turn: Conversation turn to index
chapter3/user-memory/conversation_history.py:186
↓ 1 callersMethodindex_document_dense
Index a document in the dense embedding service.
chapter3/retrieval-pipeline/retrieval_client.py:30
↓ 1 callersMethodindex_document_sparse
Index a document in the sparse embedding service.
chapter3/retrieval-pipeline/retrieval_client.py:48
↓ 1 callersFunctionindex_documents
Index documents into knowledge base
chapter3/agentic-rag/quickstart.py:97
↓ 1 callersFunctionindex_sample_documents
Index a collection of sample documents
chapter3/sparse-embedding/demo.py:46
↓ 1 callersFunctionindex_to_alpha
(index: int)
chapter2/prompt-engineering/tau_bench/model_utils/model/utils.py:29
↓ 1 callersFunctioninit_agent
Initialize the agent with optional MCP tools
chapter4/agent-with-event-trigger/server_fastapi.py:97
↓ 1 callersFunctioninit_agent
Initialize the agent with optional MCP tools
chapter4/agent-with-event-trigger/server.py:97
↓ 1 callersMethodinitializeLLMProvider
* Initialize LLM provider based on configuration
chapter9/live-audio/backend/server.js:83
↓ 1 callersMethodinitializeProvider
* Initialize ASR provider based on configuration
chapter9/live-audio/backend/utils/speechToText.js:18
↓ 1 callersMethodinitializeSileroVAD
* Initialize the Silero VAD ONNX model
chapter9/live-audio/backend/utils/vad.js:41
↓ 1 callersMethodinitialize_agent
Initialize the agent
chapter5/coding-agent/main.py:114
↓ 1 callersMethodinsert_file_content
Insert content at specific line in file. Args: file_path: File path content: Content to insert
chapter4/execution-tools/terminal_controller.py:297
← previousnext →1,101–1,200 of 2,925, ranked by callers