MCPcopy Create free account

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

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

↓ 1 callersMethod_check_retrieval_pipeline
Check if the retrieval pipeline service is available
chapter3/contextual-retrieval-for-user-memory/indexer.py:70
↓ 1 callersMethod_check_victory
Check if the player has won.
chapter1/learning-from-experience/game_environment.py:464
↓ 1 callersMethod_chunk_by_paragraphs
Chunk text respecting paragraph boundaries
chapter3/contextual-retrieval/contextual_chunking.py:182
↓ 1 callersMethod_chunk_by_paragraphs
Chunk text respecting paragraph boundaries
chapter3/contextual-retrieval/chunking.py:45
↓ 1 callersMethod_chunk_by_paragraphs
Chunk text respecting paragraph boundaries
chapter3/agentic-rag/chunking.py:45
↓ 1 callersMethod_chunk_by_size
Simple size-based chunking
chapter3/contextual-retrieval/contextual_chunking.py:240
↓ 1 callersMethod_chunk_by_size
Simple size-based chunking
chapter3/contextual-retrieval/chunking.py:106
↓ 1 callersMethod_chunk_by_size
Simple size-based chunking
chapter3/agentic-rag/chunking.py:106
↓ 1 callersMethod_chunk_fixed_rounds
Chunk conversation using fixed number of rounds Args: conversation_id: Conversation identifier test_
chapter3/agentic-rag-for-user-memory/chunker.py:167
↓ 1 callersMethod_chunk_fixed_rounds
Chunk conversation using fixed number of rounds Args: conversation_id: Conversation identifier test_
chapter3/contextual-retrieval-for-user-memory/chunker.py:167
↓ 1 callersMethod_combine_results
Combine dense and sparse results for reranking. Args: dense_results: Results from dense search sparse_results
chapter3/retrieval-pipeline/retrieval_pipeline.py:188
↓ 1 callersMethod_context_aware_summary
Strategy 3: Context-aware summarization considering the query
chapter2/context-compression/compression_strategies.py:427
↓ 1 callersMethod_context_aware_with_citations
Strategy 4: Context-aware summarization with citations
chapter2/context-compression/compression_strategies.py:532
↓ 1 callersMethod_convert_to_openai_format
Convert Anthropic message format to OpenAI format
chapter5/coding-agent/agent.py:412
↓ 1 callersMethod_convert_tools_to_openai_format
Convert Anthropic tool format to OpenAI format
chapter5/coding-agent/agent.py:464
↓ 1 callersMethod_create_basic_chunks
Create basic chunks using traditional chunking
chapter3/contextual-retrieval/contextual_chunking.py:171
↓ 1 callersMethod_create_chunk
Create a LegalChunk object
chapter3/agentic-rag/index_local_laws.py:218
↓ 1 callersMethod_create_client
Create OpenAI-compatible client.
chapter3/user-memory-evaluation/evaluator.py:19
↓ 1 callersMethod_create_item
Create an item by name.
chapter1/learning-from-experience/game_environment.py:455
↓ 1 callersMethod_create_new_index
Create a new empty index.
chapter8/gaia-experience/knowledge_base.py:86
↓ 1 callersMethod_create_sample_chunks
Create sample conversation chunks for demo
chapter3/contextual-retrieval-for-user-memory/main.py:182
↓ 1 callersMethod_create_sample_test_cases
Create sample test cases based on LOCOMO structure
chapter3/user-memory/locomo_benchmark.py:69
↓ 1 callersMethod_create_summary_prompt
Create a prompt for LLM summarization. Args: question: The original question answer: The final answe
chapter8/gaia-experience/trajectory_summarizer.py:101
↓ 1 callersMethod_create_system_prompt
Create the system prompt for the agent Returns: System prompt string
chapter1/search-codegen/agent.py:68
↓ 1 callersMethod_decode_audio
Decode generated token IDs into audio waveforms. Args: generated_ids: Tensor of generated token IDs
chapter7/orpheus/inference.py:150
↓ 1 callersMethod_detect_best_backend
Detect the best backend for current platform
chapter2/local_llm_serving/main.py:42
↓ 1 callersMethod_drop_item
Drop an item.
chapter1/learning-from-experience/game_environment.py:334
↓ 1 callersMethod_ensure_model_downloaded
Check if model is cached and download if needed with progress. Args: model_name: HuggingFace model name
chapter3/retrieval-pipeline/reranker.py:34
↓ 1 callersMethod_execute_click
Execute click action with smart waiting.
chapter8/browser-use-rpa/learning_agent/replay.py:250
↓ 1 callersMethod_execute_impl
Implement tool-specific logic Args: params: Tool input parameters Returns: Dict
chapter5/coding-agent/tools/base.py:87
↓ 1 callersMethod_execute_input
Execute text input action.
chapter8/browser-use-rpa/learning_agent/replay.py:270
↓ 1 callersMethod_execute_navigate
Execute navigation action.
chapter8/browser-use-rpa/learning_agent/replay.py:242
↓ 1 callersMethod_execute_scroll
Execute scroll action.
chapter8/browser-use-rpa/learning_agent/replay.py:294
↓ 1 callersMethod_execute_select
Execute select option action.
chapter8/browser-use-rpa/learning_agent/replay.py:286
↓ 1 callersMethod_execute_step
Execute a single workflow step. Args: step: The step to execute
chapter8/browser-use-rpa/learning_agent/replay.py:145
↓ 1 callersMethod_execute_switch_tab
Execute tab switching (simplified for single tab replay).
chapter8/browser-use-rpa/learning_agent/replay.py:316
↓ 1 callersMethod_execute_tool
Execute a tool and return the result
chapter2/kv-cache/agent.py:541
↓ 1 callersMethod_execute_tool
Execute a tool and return the result with optional compression Args: tool_name: Name of the tool to execute
chapter2/context-compression/agent.py:170
↓ 1 callersMethod_execute_tool
Execute a tool and return the result with detailed error information Returns: Tuple of (result, error_detail)
chapter2/system-hint/agent.py:443
↓ 1 callersMethod_execute_tool
Execute a tool and return the result with detailed error information
chapter4/agent-with-event-trigger/agent.py:676
↓ 1 callersMethod_execute_tool
Execute a tool and return the result Returns: Tuple of (result, error_message)
chapter3/user-memory/agent.py:374
↓ 1 callersMethod_execute_tool
Execute a tool and return the result
chapter3/contextual-retrieval/agent.py:93
↓ 1 callersMethod_execute_tool
Execute a tool and return the result
chapter3/agentic-rag/agent.py:93
↓ 1 callersMethod_execute_tool
Execute a tool call
chapter3/multimodal-agent/agent.py:984
↓ 1 callersMethod_execute_tool
Execute a tool and return results
chapter3/contextual-retrieval-for-user-memory/contextual_agent.py:199
↓ 1 callersMethod_execute_tool_calls
Execute tool calls and return results. Ensures that error messages from failed tool executions are properly formatted.
chapter2/local_llm_serving/agent.py:95
↓ 1 callersMethod_execute_upload
Execute file upload action.
chapter8/browser-use-rpa/learning_agent/replay.py:322
↓ 1 callersMethod_execute_wait
Execute wait action.
chapter8/browser-use-rpa/learning_agent/replay.py:311
↓ 1 callersMethod_extract_action_data
Extract action data for workflow capture. Args: action: The action object from browser-use result: T
chapter8/browser-use-rpa/learning_agent/agent.py:140
↓ 1 callersMethod_extract_approach
Extract approach from metadata steps. Args: metadata: Annotator metadata Returns:
chapter8/gaia-experience/knowledge_base.py:164
↓ 1 callersMethod_extract_audio_to_text
Extract audio to text transcript
chapter3/multimodal-agent/agent.py:644
↓ 1 callersMethod_extract_intel_instructions
Extract and format Intel x86/x64 instructions.
chapter3/structured-index/document_processor.py:131
↓ 1 callersMethod_extract_key_patterns
Extract key patterns from trajectory. Args: trajectory: Execution trajectory Returns:
chapter8/gaia-experience/trajectory_summarizer.py:334
↓ 1 callersFunction_extract_result
Extract text content from MCP result.
chapter4/collaboration-tools/quickstart.py:147
↓ 1 callersMethod_extract_section_info
Extract section/chapter/article information from legal text
chapter3/agentic-rag/index_local_laws.py:242
↓ 1 callersMethod_extract_task_parameters
Extract parameters from task description for workflow. Args: task: Task description workflow: Workfl
chapter8/browser-use-rpa/learning_agent/agent.py:449
↓ 1 callersMethod_extract_to_text
Extract multimodal content to text first
chapter3/multimodal-agent/agent.py:531
↓ 1 callersMethod_extract_tools
Extract tools used from metadata. Args: metadata: Annotator metadata Returns: L
chapter8/gaia-experience/knowledge_base.py:192
↓ 1 callersMethod_fallback_extraction
Fallback extraction method if LLM is unavailable
chapter3/contextual-retrieval-for-user-memory/contextual_indexer.py:376
↓ 1 callersFunction_fallback_google_search
Fallback to DuckDuckGo if Google API not available.
chapter4/perception-tools/src/google_search_enhanced.py:92
↓ 1 callersMethod_fallback_llm_evaluation
Fallback LLM evaluation using direct API call when llm_evaluator module isn't available
chapter3/contextual-retrieval-for-user-memory/contextual_evaluator.py:557
↓ 1 callersMethod_find_relevant_memory_cards
Find which memory cards might be relevant to the question
chapter3/contextual-retrieval-for-user-memory/contextual_agent.py:439
↓ 1 callersMethod_format_bool
Format boolean value with color
chapter2/context-compression/experiment.py:159
↓ 1 callersMethod_format_experiences
Format experiences for inclusion in system prompt. Args: experiences: List of experience dictionaries
chapter8/gaia-experience/experience_agent.py:179
↓ 1 callersMethod_format_messages
Format messages based on mode - recreated each iteration for incorrect modes
chapter2/kv-cache/agent.py:471
↓ 1 callersMethod_format_reranked_results
Format reranked results for response. Args: reranked: List of reranked results Returns:
chapter3/retrieval-pipeline/retrieval_pipeline.py:261
↓ 1 callersMethod_format_table
Format a table into structured text.
chapter3/structured-index/document_processor.py:158
↓ 1 callersMethod_format_todo_list
Format TODO list for display
chapter2/system-hint/agent.py:256
↓ 1 callersMethod_format_todo_list
Format TODO list for display
chapter4/agent-with-event-trigger/agent.py:467
↓ 1 callersMethod_format_trajectory
Format trajectory for readability. Args: trajectory: Raw trajectory data Returns:
chapter8/gaia-experience/trajectory_summarizer.py:200
↓ 1 callersMethod_generate_chunk_context
Generate contextual description for a chunk using Anthropic's exact approach. This follows Anthropic's Contextual Retrieval
chapter3/contextual-retrieval/contextual_chunking.py:375
↓ 1 callersMethod_generate_chunk_context
Generate contextual description for a conversation chunk. This follows Anthropic's Contextual Retrieval approach adapted for
chapter3/contextual-retrieval-for-user-memory/contextual_chunking.py:255
↓ 1 callersMethod_generate_contextual_chunks
Generate contextual enhancements for chunks. Educational Note: Following Anthropic's Contextual Retrieval approach:
chapter3/contextual-retrieval/contextual_chunking.py:282
↓ 1 callersMethod_generate_diff
Generate a simple diff preview.
chapter4/execution-tools/file_tools.py:190
↓ 1 callersMethod_generate_semantic_tags
Generate semantic tags for better retrieval Args: chunk: Conversation chunk Returns:
chapter3/agentic-rag-for-user-memory/indexer.py:157
↓ 1 callersMethod_generate_semantic_tags
Generate semantic tags for better retrieval Args: chunk: Conversation chunk Returns:
chapter3/contextual-retrieval-for-user-memory/indexer.py:157
↓ 1 callersMethod_generate_summary_cards
Generate summary cards from conversation chunks using LLM extraction. Uses an LLM to analyze conversation chunks and extract
chapter3/contextual-retrieval-for-user-memory/contextual_indexer.py:237
↓ 1 callersMethod_get_contextual_tool_definitions
Get tool definitions with contextual search capabilities
chapter3/contextual-retrieval/contextual_agent.py:203
↓ 1 callersMethod_get_current_context_summary
Get a summary of current context for context-aware compression
chapter2/context-compression/agent.py:204
↓ 1 callersMethod_get_detailed_error
Get detailed error information for debugging
chapter4/agent-with-event-trigger/agent.py:731
↓ 1 callersMethod_get_document_dify
Get document from Dify
chapter3/contextual-retrieval/tools.py:354
↓ 1 callersMethod_get_document_dify
Get document from Dify
chapter3/agentic-rag/tools.py:330
↓ 1 callersMethod_get_document_graphrag
Get entity or community from GraphRAG index
chapter3/contextual-retrieval/tools.py:417
↓ 1 callersMethod_get_document_graphrag
Get entity or community from GraphRAG index
chapter3/agentic-rag/tools.py:393
↓ 1 callersMethod_get_document_local
Get document from local retrieval pipeline
chapter3/contextual-retrieval/tools.py:337
↓ 1 callersMethod_get_document_local
Get document from local retrieval pipeline
chapter3/agentic-rag/tools.py:313
↓ 1 callersMethod_get_document_raptor
Get document/node from RAPTOR index
chapter3/contextual-retrieval/tools.py:380
↓ 1 callersMethod_get_document_raptor
Get document/node from RAPTOR index
chapter3/agentic-rag/tools.py:356
↓ 1 callersMethod_get_element_info
Get element information from selector map. Args: index: Element index selector_map: Browser-use sele
chapter8/browser-use-rpa/learning_agent/agent.py:237
↓ 1 callersMethod_get_enhanced_tool_definitions
Get enhanced tool definitions for contextual search
chapter3/contextual-retrieval-for-user-memory/contextual_agent.py:115
↓ 1 callersMethod_get_error_suggestions
Get suggestions for fixing common errors
chapter2/system-hint/agent.py:502
↓ 1 callersMethod_get_error_suggestions
Get suggestions for fixing common errors
chapter4/agent-with-event-trigger/agent.py:748
↓ 1 callersMethod_get_files_to_search
Get list of files to search
chapter5/coding-agent/tools/grep_tool.py:101
↓ 1 callersMethod_get_git_branch
Get current git branch
chapter5/coding-agent/agent.py:79
↓ 1 callersMethod_get_git_branch
Get current git branch
chapter5/coding-agent/agent_new.py:65
↓ 1 callersMethod_get_git_status
Get git status
chapter5/coding-agent/agent.py:100
↓ 1 callersMethod_get_github_client
Get or create GitHub client.
chapter4/execution-tools/external_tools.py:73
↓ 1 callersMethod_get_google_calendar_service
Get or create Google Calendar service.
chapter4/execution-tools/external_tools.py:39
↓ 1 callersMethod_get_main_branch
Get main branch name
chapter5/coding-agent/agent.py:87
↓ 1 callersMethod_get_main_branch
Get main branch name
chapter5/coding-agent/agent_new.py:73
← previousnext →601–700 of 2,925, ranked by callers