Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bojieli/ai-agent-book
/ functions
Functions
2,925 in github.com/bojieli/ai-agent-book
⨍
Functions
2,925
◇
Types & classes
570
↳
Endpoints
80
↓ 1 callers
Function
strip_and_lower
(s: str)
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:97
↓ 1 callers
Method
summarize_for_conversation
Summarize memory cards for a specific conversation. This creates a conversation-specific summary of relevant memory cards
chapter3/contextual-retrieval-for-user-memory/advanced_memory_manager.py:327
↓ 1 callers
Function
summarize_text
Summarize long text content. Args: text: Text to summarize max_length: Target summary length use_llm: Whether to
chapter4/perception-tools/src/filesystem_tools.py:193
↓ 1 callers
Method
switchProvider
* Switch ASR provider dynamically * @param {string} providerName - Provider name to switch to
chapter9/live-audio/backend/utils/speechToText.js:33
↓ 1 callers
Method
synthesize
(text, options = {})
chapter9/live-audio/backend/tests/test-tts-providers.js:38
↓ 1 callers
Method
synthesizeAndStreamAudio
(text)
chapter9/live-audio/backend/server.js:590
↓ 1 callers
Function
tbar
(y, t0, t1, fill, label, h_bar=22)
book/gen_ch4_figs.py:533
↓ 1 callers
Function
testLLMEndpoint
()
chapter9/live-audio/backend/test_llm.js:4
↓ 1 callers
Function
test_agent_error_propagation
Test that errors are properly formatted for the agent
chapter2/local_llm_serving/test_code_interpreter_full.py:132
↓ 1 callers
Function
test_basic_conversation
Test basic conversation capabilities
chapter1/context/test_kimi.py:17
↓ 1 callers
Function
test_basic_functionality
Test basic agent functionality without API calls
chapter2/system-hint/test_basic.py:9
↓ 1 callers
Function
test_basic_functionality
Test basic functionality of the system
chapter3/contextual-retrieval/test_simple.py:12
↓ 1 callers
Function
test_basic_functionality
Test basic functionality of the system
chapter3/agentic-rag/test_simple.py:12
↓ 1 callers
Function
test_basic_functionality
Test basic agent functionality
chapter3/multimodal-agent/quickstart.py:69
↓ 1 callers
Function
test_bm25_scoring
Test BM25 scoring algorithm
chapter3/sparse-embedding/test_engine.py:89
↓ 1 callers
Function
test_browser_tools
Test browser tools (basic initialization).
chapter4/collaboration-tools/test_basic.py:106
↓ 1 callers
Function
test_cache_invalidation
Test that incorrect modes properly invalidate KV cache each iteration
chapter2/kv-cache/test_cache_invalidation.py:15
↓ 1 callers
Function
test_cached_tokens
Test that cached tokens are correctly parsed from API response
chapter2/kv-cache/test_cached_tokens.py:10
↓ 1 callers
Function
test_code_interpreter
Test code interpreter integration
chapter1/context/test_code_interpreter.py:9
↓ 1 callers
Function
test_code_interpreter
Test code interpreter functionality.
chapter4/execution-tools/test_execution_tools.py:8
↓ 1 callers
Function
test_command_execution
Test command execution tool
chapter2/system-hint/test_basic.py:117
↓ 1 callers
Function
test_completion_logic
Test that the agent correctly handles responses without tool calls as final answers
chapter2/kv-cache/test_completion.py:11
↓ 1 callers
Function
test_config
Test configuration loading.
chapter4/collaboration-tools/test_basic.py:14
↓ 1 callers
Function
test_conversation_history
Test that conversation history persists between tasks
chapter1/context/test_conversation_history.py:14
↓ 1 callers
Function
test_conversation_mode
Test conversation mode with streaming
chapter3/multimodal-agent/quickstart.py:153
↓ 1 callers
Function
test_currency_conversion
Test currency conversion tool
chapter1/context/test_kimi.py:103
↓ 1 callers
Function
test_datetime_parsing
Test datetime parsing.
chapter4/execution-tools/test_external_tools.py:58
↓ 1 callers
Function
test_doubao
Test Doubao provider with a simple task
chapter1/context/test_doubao.py:9
↓ 1 callers
Function
test_dual_memory_system
Test the dual memory system with a sample scenario
chapter3/contextual-retrieval-for-user-memory/test_contextual_system.py:16
↓ 1 callers
Function
test_edge_cases
Test edge cases and special scenarios
chapter3/sparse-embedding/test_engine.py:198
↓ 1 callers
Function
test_error_handling
Test that the agent continues when tools return errors
chapter2/kv-cache/test_error_handling.py:11
↓ 1 callers
Function
test_error_handling
Test that errors are properly captured and formatted
chapter2/local_llm_serving/test_code_interpreter_full.py:47
↓ 1 callers
Function
test_evaluation_dataset
Test evaluation dataset generation
chapter3/contextual-retrieval/test_simple.py:129
↓ 1 callers
Function
test_evaluation_dataset
Test evaluation dataset generation
chapter3/agentic-rag/test_simple.py:129
↓ 1 callers
Function
test_evaluation_system
Test the evaluation system with Layer 1 test cases
chapter3/contextual-retrieval-for-user-memory/test_contextual_system.py:147
↓ 1 callers
Function
test_experiment_runner
Test that the experiment runner works.
chapter1/learning-from-experience/test_basic.py:120
↓ 1 callers
Function
test_file_edit
Test file edit functionality.
chapter4/execution-tools/test_file_tools.py:43
↓ 1 callers
Function
test_file_range_reading
Test reading files with offset and size parameters
chapter2/kv-cache/test_file_range.py:8
↓ 1 callers
Function
test_file_tools
Test the local file system tools
chapter2/kv-cache/test_tools.py:12
↓ 1 callers
Function
test_file_write
Test file write functionality.
chapter4/execution-tools/test_file_tools.py:11
↓ 1 callers
Function
test_full_environment_access
Test that the code interpreter has access to full Python environment
chapter2/local_llm_serving/test_code_interpreter_full.py:92
↓ 1 callers
Function
test_game_environment
Test that the game environment works.
chapter1/learning-from-experience/test_basic.py:13
↓ 1 callers
Function
test_get_conversation_context_logging
Test get_conversation_context with full logging
chapter3/agentic-rag-for-user-memory/test_logging.py:123
↓ 1 callers
Function
test_get_conversation_context_logging
Test get_conversation_context with full logging
chapter3/contextual-retrieval-for-user-memory/test_logging.py:123
↓ 1 callers
Function
test_get_full_conversation_logging
Test get_full_conversation with full logging
chapter3/agentic-rag-for-user-memory/test_logging.py:169
↓ 1 callers
Function
test_get_full_conversation_logging
Test get_full_conversation with full logging
chapter3/contextual-retrieval-for-user-memory/test_logging.py:169
↓ 1 callers
Function
test_github_pr
Test GitHub PR creation.
chapter4/execution-tools/test_external_tools.py:32
↓ 1 callers
Function
test_google_calendar
Test Google Calendar integration.
chapter4/execution-tools/test_external_tools.py:8
↓ 1 callers
Function
test_graphrag_backend
Test Agentic RAG with GraphRAG knowledge graph backend
chapter3/agentic-rag/test_structured_backends.py:51
↓ 1 callers
Function
test_hint_behavior
Test and demonstrate the system hint behavior
chapter2/system-hint/test_hint_behavior.py:11
↓ 1 callers
Function
test_hitl_tools
Test human-in-the-loop functionality.
chapter4/collaboration-tools/test_basic.py:72
↓ 1 callers
Function
test_imports
Test all imports work
chapter3/agentic-rag-for-user-memory/test_startup.py:12
↓ 1 callers
Function
test_imports
Test all imports work
chapter3/contextual-retrieval-for-user-memory/test_startup.py:12
↓ 1 callers
Function
test_indexer
Test the modified indexer
chapter3/agentic-rag-for-user-memory/test_pipeline.py:93
↓ 1 callers
Function
test_indexer
Test the modified indexer
chapter3/contextual-retrieval-for-user-memory/test_pipeline.py:93
↓ 1 callers
Function
test_indexing
Test both RAPTOR and GraphRAG indexing with sample documentation.
chapter3/structured-index/test_indexing.py:115
↓ 1 callers
Function
test_initialization
Test component initialization
chapter3/agentic-rag-for-user-memory/test_startup.py:28
↓ 1 callers
Function
test_initialization
Test component initialization
chapter3/contextual-retrieval-for-user-memory/test_startup.py:28
↓ 1 callers
Method
test_intent_matching
Test 3: Intent matching algorithm.
chapter8/browser-use-rpa/test_validation.py:161
↓ 1 callers
Function
test_inverted_index
Test inverted index functionality
chapter3/sparse-embedding/test_engine.py:50
↓ 1 callers
Method
test_knowledge_base
Test 2: Knowledge base storage and retrieval.
chapter8/browser-use-rpa/test_validation.py:120
↓ 1 callers
Function
test_language
Test a specific language.
chapter4/execution-tools/test_multilang.py:8
↓ 1 callers
Function
test_llm_agent
Test that the LLM agent works (without API calls).
chapter1/learning-from-experience/test_basic.py:76
↓ 1 callers
Function
test_llm_evaluation_integration
Test that LLM evaluation is properly integrated
chapter3/agentic-rag-for-user-memory/test_llm_evaluation.py:23
↓ 1 callers
Function
test_llm_evaluation_integration
Test that LLM evaluation is properly integrated
chapter3/contextual-retrieval-for-user-memory/test_llm_evaluation.py:23
↓ 1 callers
Function
test_logging
Test that LLM responses are properly logged
chapter3/agentic-rag-for-user-memory/test_enhanced_logging.py:22
↓ 1 callers
Function
test_logging
Test that LLM responses are properly logged
chapter3/contextual-retrieval-for-user-memory/test_enhanced_logging.py:22
↓ 1 callers
Function
test_mode_selection
Test the interactive mode selection without running the agent
chapter2/kv-cache/test_interactive.py:9
↓ 1 callers
Function
test_model_info
Test and display model information
chapter1/context/test_kimi.py:146
↓ 1 callers
Function
test_native_tools
Test Ollama's native tool calling
chapter2/local_llm_serving/ollama_native.py:447
↓ 1 callers
Function
test_new_tools
Test the new perception tools.
chapter4/perception-tools/test_new_tools.py:18
↓ 1 callers
Function
test_non_agentic_mode
Test non-agentic mode with structured backends
chapter3/agentic-rag/test_structured_backends.py:145
↓ 1 callers
Function
test_notification_tools
Test notification tools (without actually sending).
chapter4/collaboration-tools/test_basic.py:86
↓ 1 callers
Function
test_openrouter
Test direct API call to OpenRouter
chapter2/prompt-engineering/test_openrouter_direct.py:11
↓ 1 callers
Function
test_pattern_matching
Test various pattern matching scenarios
chapter2/kv-cache/test_tools.py:87
↓ 1 callers
Function
test_pdf_with_currencies
Test PDF parsing with currency conversion
chapter1/context/test_pdf_task.py:10
↓ 1 callers
Method
test_performance_improvement
Test 5: Performance improvement validation.
chapter8/browser-use-rpa/test_validation.py:249
↓ 1 callers
Function
test_pipeline
Test the complete retrieval pipeline.
chapter3/retrieval-pipeline/test_pipeline.py:62
↓ 1 callers
Function
test_proactive_service
Test the agent's ability to provide proactive service
chapter3/contextual-retrieval-for-user-memory/test_proactive_service.py:14
↓ 1 callers
Function
test_provider_switching
Test switching between different providers
chapter1/context/test_provider_switching.py:14
↓ 1 callers
Function
test_providers
Test different provider configurations
chapter1/context/test_provider.py:9
↓ 1 callers
Method
test_query
Test a query against the system
chapter3/contextual-retrieval-for-user-memory/main.py:389
↓ 1 callers
Function
test_ranking_quality
Test the quality of search result ranking
chapter3/sparse-embedding/test_engine.py:250
↓ 1 callers
Function
test_raptor_backend
Test Agentic RAG with RAPTOR tree-based backend
chapter3/agentic-rag/test_structured_backends.py:14
↓ 1 callers
Function
test_retrieval_pipeline
Test if retrieval pipeline is available and working
chapter3/agentic-rag-for-user-memory/test_pipeline.py:10
↓ 1 callers
Function
test_retrieval_pipeline
Test if retrieval pipeline is available and working
chapter3/contextual-retrieval-for-user-memory/test_pipeline.py:10
↓ 1 callers
Function
test_rl_agent
Test that the RL agent works.
chapter1/learning-from-experience/test_basic.py:45
↓ 1 callers
Function
test_rl_learning
Test that Q-learning can learn the game. Args: stochastic: If True, use stochastic environment episodes: List of episode coun
chapter1/learning-from-experience/test_rl_learning.py:18
↓ 1 callers
Function
test_safety_checks
Test safety checks for file operations.
chapter4/execution-tools/test_file_tools.py:69
↓ 1 callers
Function
test_search_engine
Test the complete search engine
chapter3/sparse-embedding/test_engine.py:134
↓ 1 callers
Function
test_search_memory_logging
Test search_memory tool with full logging
chapter3/agentic-rag-for-user-memory/test_logging.py:77
↓ 1 callers
Function
test_search_memory_logging
Test search_memory tool with full logging
chapter3/contextual-retrieval-for-user-memory/test_logging.py:77
↓ 1 callers
Function
test_server_startup
Test that the server starts without deprecation warnings.
chapter3/retrieval-pipeline/test_improvements.py:10
↓ 1 callers
Function
test_simple_task
Test with a very simple task to check if the agent is working
chapter1/context/test_simple.py:11
↓ 1 callers
Function
test_single_evaluation
Test evaluation with a single simple test case
chapter3/contextual-retrieval-for-user-memory/test_fixes.py:14
↓ 1 callers
Function
test_sparse_service
Test the sparse service directly to ensure it handles external doc_ids.
chapter3/retrieval-pipeline/test_pipeline.py:19
↓ 1 callers
Function
test_specific_document_retrieval
Test retrieving specific documents by ID
chapter3/sparse-embedding/demo.py:229
↓ 1 callers
Function
test_streaming
Test streaming functionality with various queries
chapter2/local_llm_serving/test_streaming.py:12
↓ 1 callers
Function
test_successful_execution
Test that code executes successfully with full Python environment
chapter2/local_llm_serving/test_code_interpreter_full.py:7
↓ 1 callers
Function
test_syntax_verification
Test syntax verification.
chapter4/execution-tools/test_execution_tools.py:60
← previous
next →
1,601–1,700 of 2,925, ranked by callers