MCPcopy Create free account

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

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

Methodget_model_config
Get model configuration as dictionary Returns: Model configuration dict
chapter3/user-memory/config.py:141
Methodget_perf_string
(mode)
chapter1/context/main.py:388
Functionget_rating_history
Extract rating history for all models over time. Args: historical_leaderboards: List of (date, leaderboard_df) tuples
chapter6/elo-leaderboard/leaderboard.py:159
Functionget_recent_logs
Get recent application logs for educational purposes
chapter3/sparse-embedding/server.py:478
Functionget_report_dir
()
chapter2/prompt-engineering/tau_bench/model_utils/api/exception.py:19
Methodget_session_turns
Get all turns from a specific session Args: session_id: Session identifier Returns:
chapter3/user-memory/conversation_history.py:126
Methodget_size
Get the number of documents in the store.
chapter3/dense-embedding/document_store.py:141
Methodget_size
Get the current number of items in the index.
chapter3/dense-embedding/indexing.py:31
Methodget_size
Get the current number of items in the index.
chapter3/dense-embedding/indexing.py:206
Functionget_statistics
Get detailed statistics about the indexes.
chapter3/structured-index/api_service.py:325
Functionget_statistics
Get pipeline statistics and configuration.
chapter3/retrieval-pipeline/main.py:186
Functionget_statistics
Get index statistics
chapter3/sparse-embedding/server.py:441
Methodget_statistics
Get comprehensive statistics
chapter3/contextual-retrieval/contextual_tools.py:644
Methodget_statistics
Get memory statistics
chapter3/contextual-retrieval-for-user-memory/advanced_memory_manager.py:373
Methodget_statistics
Get chunking statistics
chapter3/contextual-retrieval-for-user-memory/contextual_chunking.py:328
Methodget_statistics
Get agent statistics
chapter3/contextual-retrieval-for-user-memory/contextual_agent.py:459
Functionget_stats
Get service statistics.
chapter3/dense-embedding/main.py:348
Functionget_status
Get the status of the indexes.
chapter3/structured-index/api_service.py:308
Functionget_time_slices
Split data into time slices for historical analysis. Args: df: Input DataFrame with 'tstamp' column interval: Pandas fre
chapter6/elo-leaderboard/data_loader.py:182
Methodget_tools_prompt
Get formatted prompt describing available tools in Qwen3 format
chapter2/attention_visualization/tools.py:124
Methodget_total_cost
(self)
chapter2/prompt-engineering/tau_bench/envs/user.py:22
Methodget_total_cost
(self)
chapter2/prompt-engineering/tau_bench/envs/user.py:33
Methodget_total_cost
(self)
chapter2/prompt-engineering/tau_bench/envs/user.py:152
Methodget_total_cost
(self)
chapter2/prompt-engineering/tau_bench/envs/user.py:193
Methodget_total_cost
(self)
chapter2/prompt-engineering/tau_bench/envs/user.py:308
Methodget_user_question
Get the user question for a test case. Args: test_id: The test case ID Returns:
chapter3/user-memory-evaluation/framework.py:191
Methodget_win_rate_matrix
Calculate pairwise win probability matrix for all models. Returns: Dictionary mapping (model_a, model_b) to win
chapter6/elo-leaderboard/elo_rating.py:133
Methodget_win_rate_matrix
Calculate pairwise win probability matrix using vectorized operations. Returns: Dictionary mapping (model_a, mod
chapter6/elo-leaderboard/optimized_elo.py:249
Functiongoogle_search_enhanced
Enhanced Google search.
chapter4/perception-tools/src/main.py:489
Functiongrep
Search files for pattern.
chapter4/perception-tools/src/main.py:175
FunctionhandleChatScroll
()
chapter9/live-audio/frontend/pages/index.tsx:512
MethodhandleClose
()
chapter9/live-audio/backend/server.js:164
MethodhandleError
(error)
chapter9/live-audio/backend/server.js:169
FunctionhandleEscape
(e: KeyboardEvent)
chapter2/attention_visualization/frontend/components/AttentionModal.tsx:310
FunctionhandleLogsScroll
()
chapter9/live-audio/frontend/pages/index.tsx:519
MethodhandleMessage
(message)
chapter9/live-audio/backend/server.js:114
FunctionhandleMouseMove
(e: React.MouseEvent<HTMLCanvasElement>)
chapter2/attention_visualization/frontend/components/AttentionModal.tsx:275
Functionhandle_call_tool
Handle tool calls.
chapter4/execution-tools/server.py:194
Functionhandle_event
Handle incoming event
chapter4/agent-with-event-trigger/server_fastapi.py:262
Functionhandle_event
Handle incoming event
chapter4/agent-with-event-trigger/server.py:262
Functionhandle_list_tools
List available tools.
chapter4/execution-tools/server.py:29
Functionhealth
Health check endpoint.
chapter3/retrieval-pipeline/main.py:108
Functionhealth_check
Health check endpoint
chapter4/agent-with-event-trigger/server_fastapi.py:211
Functionhealth_check
Health check endpoint
chapter4/agent-with-event-trigger/server.py:211
Functionimage_analyze
Analyze image with AI.
chapter4/perception-tools/src/main.py:428
Functionimage_metadata
Get image metadata.
chapter4/perception-tools/src/main.py:467
Functionimage_ocr
Extract text from image using OCR.
chapter4/perception-tools/src/main.py:419
Functionimage_parser
Parse image content.
chapter4/perception-tools/src/main.py:142
Functionindex_batch
Index multiple documents at once
chapter3/sparse-embedding/server.py:393
Functionindex_document
Index a document in both dense and sparse services. This endpoint: 1. Stores the document locally 2. Indexes in dense embedding servi
chapter3/retrieval-pipeline/main.py:115
Functionindex_document
Index a new document. This endpoint: 1. Generates embeddings using BGE-M3 2. Adds the document to the document store 3. Adds
chapter3/dense-embedding/main.py:178
Functionindex_document
Index a single document
chapter3/sparse-embedding/server.py:367
Methodindex_document
Index a document in both dense and sparse services. Args: text: Document text doc_id: Optional document ID (g
chapter3/retrieval-pipeline/retrieval_pipeline.py:37
Methodindex_document
Index a document in both services in parallel.
chapter3/retrieval-pipeline/retrieval_client.py:68
Methodinvoke
(data: Dict[str, Any], user_id: str)
chapter2/prompt-engineering/tau_bench/envs/retail/tools/get_user_details.py:10
Methodinvoke
(data: Dict[str, Any], first_name: str, last_name: str, zip: str)
chapter2/prompt-engineering/tau_bench/envs/retail/tools/find_user_id_by_name_zip.py:9
Methodinvoke
(data: Dict[str, Any])
chapter2/prompt-engineering/tau_bench/envs/retail/tools/list_all_product_types.py:10
Methodinvoke
( data: Dict[str, Any], order_id: str, item_ids: List[str], payment_method_id: str )
chapter2/prompt-engineering/tau_bench/envs/retail/tools/return_delivered_order_items.py:10
Methodinvoke
(data: Dict[str, Any], email: str)
chapter2/prompt-engineering/tau_bench/envs/retail/tools/find_user_id_by_email.py:9
Methodinvoke
( data: Dict[str, Any], order_id: str, payment_method_id: str, )
chapter2/prompt-engineering/tau_bench/envs/retail/tools/modify_pending_order_payment.py:10
Methodinvoke
( data: Dict[str, Any], order_id: str, item_ids: List[str], new_item_ids: List
chapter2/prompt-engineering/tau_bench/envs/retail/tools/modify_pending_order_items.py:10
Methodinvoke
( data: Dict[str, Any], user_id: str, address1: str, address2: str, ci
chapter2/prompt-engineering/tau_bench/envs/retail/tools/modify_user_address.py:10
Methodinvoke
(data: Dict[str, Any], order_id: str)
chapter2/prompt-engineering/tau_bench/envs/retail/tools/get_order_details.py:10
Methodinvoke
(data: Dict[str, Any], thought: str)
chapter2/prompt-engineering/tau_bench/envs/retail/tools/think.py:9
Methodinvoke
( data: Dict[str, Any], order_id: str, address1: str, address2: str, c
chapter2/prompt-engineering/tau_bench/envs/retail/tools/modify_pending_order_address.py:10
Methodinvoke
(data: Dict[str, Any], order_id: str, reason: str)
chapter2/prompt-engineering/tau_bench/envs/retail/tools/cancel_pending_order.py:10
Methodinvoke
( data: Dict[str, Any], order_id: str, item_ids: List[str], new_item_ids: List
chapter2/prompt-engineering/tau_bench/envs/retail/tools/exchange_delivered_order_items.py:11
Methodinvoke
(data: Dict[str, Any], summary: str)
chapter2/prompt-engineering/tau_bench/envs/retail/tools/transfer_to_human_agents.py:9
Methodinvoke
(data: Dict[str, Any], product_id: str)
chapter2/prompt-engineering/tau_bench/envs/retail/tools/get_product_details.py:10
Methodinvoke
(data: Dict[str, Any], expression: str)
chapter2/prompt-engineering/tau_bench/envs/retail/tools/calculate.py:9
Methodinvoke
(data: Dict[str, Any], user_id: str)
chapter2/prompt-engineering/tau_bench/envs/airline/tools/get_user_details.py:10
Methodinvoke
( data: Dict[str, Any], reservation_id: str, )
chapter2/prompt-engineering/tau_bench/envs/airline/tools/cancel_reservation.py:10
Methodinvoke
( data: Dict[str, Any], user_id: str, origin: str, destination: str, f
chapter2/prompt-engineering/tau_bench/envs/airline/tools/book_reservation.py:11
Methodinvoke
( data: Dict[str, Any], reservation_id: str, cabin: str, flights: List[Dict[st
chapter2/prompt-engineering/tau_bench/envs/airline/tools/update_reservation_flights.py:11
Methodinvoke
( data: Dict[str, Any], reservation_id: str, passengers: List[Dict[str, Any]], )
chapter2/prompt-engineering/tau_bench/envs/airline/tools/update_reservation_passengers.py:10
Methodinvoke
(data: Dict[str, Any], origin: str, destination: str, date: str)
chapter2/prompt-engineering/tau_bench/envs/airline/tools/search_onestop_flight.py:10
Methodinvoke
(data: Dict[str, Any], thought: str)
chapter2/prompt-engineering/tau_bench/envs/airline/tools/think.py:9
Methodinvoke
(data: Dict[str, Any], reservation_id: str)
chapter2/prompt-engineering/tau_bench/envs/airline/tools/get_reservation_details.py:10
Methodinvoke
(data: Dict[str, Any], origin: str, destination: str, date: str)
chapter2/prompt-engineering/tau_bench/envs/airline/tools/search_direct_flight.py:10
Methodinvoke
(data: Dict[str, Any])
chapter2/prompt-engineering/tau_bench/envs/airline/tools/list_all_airports.py:10
Methodinvoke
( data: Dict[str, Any], reservation_id: str, total_baggages: int, nonfree_bagg
chapter2/prompt-engineering/tau_bench/envs/airline/tools/update_reservation_baggages.py:10
Methodinvoke
( data: Dict[str, Any], summary: str, )
chapter2/prompt-engineering/tau_bench/envs/airline/tools/transfer_to_human_agents.py:9
Methodinvoke
( data: Dict[str, Any], user_id: str, amount: int, )
chapter2/prompt-engineering/tau_bench/envs/airline/tools/send_certificate.py:9
Methodinvoke
(data: Dict[str, Any], expression: str)
chapter2/prompt-engineering/tau_bench/envs/airline/tools/calculate.py:9
Functionknowledge_base_search
Search local knowledge base.
chapter4/perception-tools/src/main.py:109
Functionlayer_diagram
Stacked horizontal layers (top = first layer).
book/svg_lib.py:323
Functionlifespan
Lifespan context manager for startup and shutdown
chapter4/agent-with-event-trigger/server_fastapi.py:46
Functionlifespan
Lifespan context manager for startup and shutdown
chapter4/agent-with-event-trigger/server.py:46
Functionlifespan
Lifespan context manager for startup and shutdown events.
chapter3/retrieval-pipeline/main.py:31
Functionlifespan
Manage application lifecycle.
chapter3/dense-embedding/main.py:92
Functionlist_documents
List indexed documents.
chapter3/retrieval-pipeline/main.py:199
Functionlist_documents
List documents in the store.
chapter3/dense-embedding/main.py:360
Methodload_chunks
Load chunks from a JSON file Args: filepath: Path to the chunks file Returns: L
chapter3/agentic-rag-for-user-memory/chunker.py:312
Methodload_chunks
Load chunks from a JSON file Args: filepath: Path to the chunks file Returns: L
chapter3/contextual-retrieval-for-user-memory/chunker.py:312
Functionload_data
()
chapter2/prompt-engineering/tau_bench/envs/retail/data/__init__.py:10
Functionload_data
()
chapter2/prompt-engineering/tau_bench/envs/airline/data/__init__.py:10
Functionload_from_disk
(path: str)
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:291
Methodload_index
Load the index from disk
chapter3/contextual-retrieval-for-user-memory/contextual_indexer.py:594
Methodload_memory
Load notes from storage
chapter3/user-memory/memory_manager.py:118
Methodload_memory
Load JSON memory cards from storage
chapter3/user-memory/memory_manager.py:264
← previousnext →2,301–2,400 of 2,925, ranked by callers