MCPcopy Create free account

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

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

Method__init__
(self, verbose: bool = True)
chapter10/parallel-web-research/message_bus.py:95
Method__init__
(self, wid, site)
chapter10/parallel-web-research/test_completed_worker_ack_regression.py:20
Method__init__
(self, worker_id, bus, events)
chapter10/parallel-web-research/test_coordination.py:33
Method__init__
(self)
chapter10/parallel-web-research/test_coordination.py:115
Method__init__
(self)
chapter10/parallel-web-research/test_coordination.py:125
Method__init__
(self)
chapter10/generative-agents/action_arena_compat.py:78
Method__init__
(self)
chapter10/generative-agents/provider_adapter.py:61
Method__init__
(self)
chapter10/multi-role-transfer/run_official_experiment.py:83
Method__init__
( self, client: OpenAI, model: str = "gpt-5.6-luna", max_steps: int = 20,
chapter10/multi-role-transfer/orchestrator.py:50
Method__init__
( self, client: OpenAI, model: str = "gpt-5.6-luna", max_steps: int = 20,
chapter10/multi-role-transfer/skill_orchestrator.py:132
Method__init__
(self, width, height)
book-id/svg_lib.py:283
Method__init__
Initialize LLM agent with the Kimi (Moonshot) API. Args: api_key: Provider API key (or set the provider's env var)
chapter1/learning-from-experience/llm_agent.py:69
Method__init__
Initialize experiment runner.
chapter1/learning-from-experience/experiment.py:31
Method__init__
Initialize Q-learning agent. Args: learning_rate: Alpha parameter for Q-value updates discount_facto
chapter1/learning-from-experience/rl_agent.py:20
Method__init__
Initialize DQN agent with neural network. Note: Simplified implementation for demonstration.
chapter1/learning-from-experience/rl_agent.py:333
Method__init__
Initialize the agent Args: api_key: API key for the LLM provider context_mode: Context mode for abla
chapter1/context/agent.py:382
Method__init__
Initialize test suite Args: api_key: API key for the LLM provider provider: LLM provider to use
chapter1/context/main.py:80
Method__init__
初始化 Agent Args: api_key: Kimi API key (如果不提供,从环境变量获取) base_url: API 基础 URL model: 使用的模型名称(默认 kim
chapter1/web-search-agent/agent.py:103
Method__init__
(self, payload, status_code=200)
chapter1/web-search-agent/tests/test_agent.py:17
Method__init__
( self, api_key: str, base_url: str = "https://api.openai.com/v1", model: str
chapter1/search-codegen/agent.py:24
Method__init__
(self, agent: GPT5NativeAgent)
chapter1/search-codegen/agent.py:382
Method__init__
Initialize the CLI
chapter1/search-codegen/main.py:25
Method__init__
Initialize manual case suite
chapter1/search-codegen/tests/manual/agent_cases.py:33
Method__init__
(self, name: str, description: str, parameters: Dict[str, Any], server: str)
chapter4/active-tool-selection/tool_knowledge_base.py:15
Method__init__
(self, name: str, description: str, tools: List[ToolDefinition])
chapter4/active-tool-selection/tool_knowledge_base.py:39
Method__init__
(self, servers: Optional[List[ServerDefinition]] = None, model: Optional[str] = None)
chapter4/active-tool-selection/agent.py:26
Method__init__
(self, servers: Optional[List[ServerDefinition]] = None, model: Optional[str] = None, top_k:
chapter4/active-tool-selection/agent.py:287
Method__init__
(self, servers: Optional[List[ServerDefinition]] = None, model: Optional[str] = None)
chapter4/active-tool-selection/agent.py:416
Method__init__
(self, servers: List[ServerDefinition])
chapter4/active-tool-selection/semantic_router.py:23
Method__init__
(self)
chapter4/collaboration-tools/client_example.py:19
Method__init__
( self, request_id: str, message: str, status: str, approved: bool,
chapter4/collaboration-tools/src/notification_dispatcher.py:49
Method__init__
( self, fallback_action: str = "auto-reject", default_channels: Optional[List[str]] =
chapter4/collaboration-tools/src/notification_dispatcher.py:116
Method__init__
(self, status_code, payload)
chapter4/perception-tools/test_pubchem_async.py:12
Method__init__
(self, **kwargs)
chapter4/perception-tools/test_video_keyframes_num_frames.py:23
Method__init__
(self, **kwargs)
chapter4/perception-tools/test_wiki_article_history_date.py:16
Method__init__
(self, **kwargs)
chapter4/perception-tools/test_arxiv_request_bounds.py:22
Method__init__
(self, **kwargs)
chapter4/perception-tools/test_arxiv_request_bounds.py:26
Method__init__
( self, status_code: int, payload: Any, headers: dict[str, str] | None = None,
chapter4/perception-tools/test_xquik_tools.py:21
Method__init__
(self, **kwargs: Any)
chapter4/perception-tools/test_xquik_tools.py:43
Method__init__
(self, **_kwargs: Any)
chapter4/perception-tools/test_xquik_tools.py:113
Method__init__
(self, **kwargs)
chapter4/perception-tools/test_analyze_video_release_on_error.py:23
Method__init__
(self)
chapter4/perception-tools/test_analyze_video_release_on_error.py:54
Method__init__
(self)
chapter4/perception-tools/src/pubchem_tools.py:50
Method__init__
(self, type=None, text=None)
chapter4/perception-tools/src/test_search_web_num_results_zero.py:23
Method__init__
(self, *a, **k)
chapter4/perception-tools/src/test_search_web_num_results_zero.py:30
Method__init__
(self, type=None, text=None)
chapter4/perception-tools/src/test_grep_max_results_zero.py:16
Method__init__
(self, *a, **k)
chapter4/perception-tools/src/test_grep_max_results_zero.py:23
Method__init__
(self, type=None, text=None)
chapter4/perception-tools/src/test_negative_max_length.py:16
Method__init__
(self, *a, **k)
chapter4/perception-tools/src/test_negative_max_length.py:21
Method__init__
Initialize execution tools with LLM helper.
chapter4/execution-tools/execution_tools.py:73
Method__init__
Initialize executor.
chapter4/execution-tools/multilang_executor.py:98
Method__init__
(self, path: Path)
chapter4/execution-tools/test_code_interpreter_python_runtime.py:12
Method__init__
Initialize external tools with LLM helper.
chapter4/execution-tools/external_tools.py:33
Method__init__
(self, ref: str)
chapter4/execution-tools/test_github_idempotency.py:17
Method__init__
Initialize the LLM helper. The OpenAI-compatible client is created lazily on first use so that execution tools which do not need an L
chapter4/execution-tools/llm_helper.py:48
Method__init__
(self)
chapter4/execution-tools/terminal_controller.py:18
Method__init__
(self, data: bytes)
chapter4/execution-tools/test_multilang_output.py:9
Method__init__
Initialize file tools with LLM helper.
chapter4/execution-tools/file_tools.py:14
Method__init__
(self, prefix=None, suffix=None, dir=None, ignore_cleanup_errors=False)
chapter4/execution-tools/test_execution_tools.py:25
Method__init__
(self)
chapter4/execution-tools/filesystem_enhanced.py:18
Method__init__
(self)
chapter4/active-tool-discovery/offline_backend.py:150
Method__init__
(self, schemas: list[dict[str, Any]], cache_dir: Path)
chapter4/active-tool-discovery/run_exact_experiment.py:203
Method__init__
(self, client, model: str = None)
chapter4/active-tool-discovery/discovery.py:42
Method__init__
(self, embedder, tools: List[Dict] = None)
chapter4/active-tool-discovery/discovery.py:60
Method__init__
(self)
chapter4/multimodal-agent/config.py:63
Method__init__
(self, *args: Any, checkpoint: Path, **kwargs: Any)
chapter4/multimodal-agent/campaign.py:66
Method__init__
(self, agent: 'MultimodalAgent')
chapter4/multimodal-agent/agent.py:94
Method__init__
( self, model: Optional[str] = None, mode: Optional[ExtractionMode] = None, en
chapter4/multimodal-agent/agent.py:306
Method__init__
(self, stream, file_handle)
chapter4/multimodal-agent/main.py:19
Method__init__
(self, stream, file_handle)
chapter4/multimodal-agent/demo.py:18
Method__init__
(self, chunks: List[Dict[str, Any]], field: str)
chapter3/memory_rag_campaign.py:117
Method__init__
(self, args: argparse.Namespace)
chapter3/memory_rag_campaign.py:374
Method__init__
(self, client: Any, provider: str, endpoint: str)
chapter3/experiment_utils.py:93
Method__init__
Initialize the evaluator with specified LLM. Args: evaluator_type: Judge backend (kimi/openai); defaults to config. m
chapter3/user-memory-evaluation/evaluator.py:30
Method__init__
Initialize the batch evaluator.
chapter3/user-memory-evaluation/evaluator.py:329
Method__init__
Initialize the framework. Args: test_cases_dir: Directory containing test case YAML files
chapter3/user-memory-evaluation/framework.py:26
Method__init__
Args: gold_facts: Mapping of test_id -> list of gold facts to recall.
chapter3/user-memory-evaluation/metrics.py:71
Method__init__
Args: framework: A loaded UserMemoryEvaluationFramework (for test-case lookup). metric: 'keyword-recall' (offline) or
chapter3/user-memory-evaluation/comparison.py:36
Method__init__
(self, framework: UserMemoryEvaluationFramework)
chapter3/user-memory-evaluation/main.py:20
Method__init__
(self, k1: float = 1.5, b: float = 0.75)
chapter3/agentic-rag-for-user-memory/indexer.py:40
Method__init__
Initialize the indexer Args: config: Index configuration
chapter3/agentic-rag-for-user-memory/indexer.py:120
Method__init__
Initialize the evaluator Args: config: Configuration object
chapter3/agentic-rag-for-user-memory/evaluator.py:122
Method__init__
Initialize the agent Args: indexer: The memory indexer with loaded conversations config: Configurati
chapter3/agentic-rag-for-user-memory/agent.py:69
Method__init__
Initialize memory tools Args: indexer: The memory indexer instance
chapter3/agentic-rag-for-user-memory/tools.py:36
Method__init__
Initialize the chunker Args: config: Chunking configuration
chapter3/agentic-rag-for-user-memory/chunker.py:93
Method__init__
Initialize the interactive evaluator
chapter3/agentic-rag-for-user-memory/main.py:41
Method__init__
(self, client: OpenAI, provider: str, endpoint: str, checkpoint: Path)
chapter3/structured-index/campaign.py:116
Method__init__
(self, name: str)
chapter3/structured-index/campaign.py:139
Method__init__
(self, config: RaptorConfig)
chapter3/structured-index/raptor_indexer.py:43
Method__init__
(self)
chapter3/structured-index/document_processor.py:21
Method__init__
Initialize the HybridStructuredRetriever. Args: rrf_k: Smoothing constant for Reciprocal Rank Fusion (RRF). Default 60.
chapter3/structured-index/hybrid_retriever.py:76
Method__init__
(self, entities: Dict[str, Dict[str, str]])
chapter3/structured-index/structured_vs_flat_demo.py:106
Method__init__
(self, config: GraphRAGConfig)
chapter3/structured-index/graphrag_indexer.py:61
Method__init__
(self, *args, **kwargs)
chapter3/structured-index/test_graphrag_search_top_k.py:14
Method__init__
(self)
chapter3/structured-index/test_graphrag_search_top_k.py:45
Method__init__
(self, args: argparse.Namespace)
chapter3/user-memory/run_evaluation.py:192
Method__init__
Initialize LOCOMO benchmark Args: dataset_path: Path to LOCOMO dataset
chapter3/user-memory/locomo_benchmark.py:40
Method__init__
Initialize the background memory processor Args: user_id: Unique user identifier api_key: API key (d
chapter3/user-memory/background_memory_processor.py:51
Method__init__
(self, user_id: str, verbose: bool = False)
chapter3/user-memory/memory_manager.py:123
Method__init__
(self, user_id: str, verbose: bool = False)
chapter3/user-memory/memory_manager.py:368
← previousnext →7,901–8,000 of 13,003, ranked by callers