MCPcopy Create free account

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

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

Method__init__
(self, user_id: str, verbose: bool = False)
chapter3/user-memory/memory_manager.py:550
Method__init__
Initialize the agent Args: user_id: Unique user identifier api_key: API key (defaults to env based o
chapter3/user-memory/agent.py:59
Method__init__
Initialize conversation history manager Args: user_id: User identifier
chapter3/user-memory/conversation_history.py:39
Method__init__
Initialize Dify client
chapter3/user-memory/conversation_history.py:180
Method__init__
Initialize simple embedding search
chapter3/user-memory/conversation_history.py:315
Method__init__
(self, context: str)
chapter3/user-memory/test_session_scoped_history.py:14
Method__init__
(self)
chapter3/user-memory/test_evaluation_memory_view.py:17
Method__init__
(self)
chapter3/user-memory/test_evaluation_memory_view.py:40
Method__init__
(self, *args, **kwargs)
chapter3/user-memory/test_evaluation_memory_view.py:44
Method__init__
(self, *args, **kwargs)
chapter3/user-memory/test_evaluation_memory_view.py:50
Method__init__
Initialize the conversational agent Args: user_id: Unique user identifier api_key: API key (defaults
chapter3/user-memory/conversational_agent.py:47
Method__init__
( self, k_values: list[int] | None = None, diminishing_threshold: float = 0.01, )
chapter3/retrieval-pipeline/stage_evaluator.py:160
Method__init__
(self, config: Optional[PipelineConfig] = None)
chapter3/retrieval-pipeline/retrieval_pipeline.py:20
Method__init__
(self, base_url: str = "http://localhost:4242")
chapter3/retrieval-pipeline/test_client.py:16
Method__init__
(self)
chapter3/retrieval-pipeline/document_store.py:12
Method__init__
(self, dense_url: str, sparse_url: str, timeout: float = 30.0)
chapter3/retrieval-pipeline/retrieval_client.py:25
Method__init__
(self, chunk_ids: List[str], chunk_texts: List[str])
chapter3/retrieval-pipeline/evaluate.py:175
Method__init__
(self, model_name: str, pooling: str, device: str, query_instruct: str = "", max_length: int
chapter3/retrieval-pipeline/evaluate.py:195
Method__init__
(self, encoder: DenseEncoder, chunk_ids: List[str], chunk_texts: List[str])
chapter3/retrieval-pipeline/evaluate.py:265
Method__init__
(self, model_name: str, device: str, max_length: int = 512)
chapter3/retrieval-pipeline/evaluate.py:287
Method__init__
(self, corpus, args)
chapter3/retrieval-pipeline/evaluate.py:382
Method__init__
(self)
chapter3/retrieval-pipeline/reranker.py:55
Method__init__
Initialize the reranker. Args: model_name: HuggingFace model name device: Device to use (mps for Mac, cuda fo
chapter3/retrieval-pipeline/reranker.py:80
Method__init__
(self, pipeline_url: str = "http://localhost:4242")
chapter3/retrieval-pipeline/demo.py:17
Method__init__
Initialize the sanitization agent. Primary backend is the local Ollama model. If Ollama is unavailable (not running / not reachable)
chapter3/log-sanitization/agent.py:38
Method__init__
(self, output_dir: Path)
chapter3/log-sanitization/metrics.py:50
Method__init__
(self)
chapter3/log-sanitization/test_loader.py:15
Method__init__
(self, payload: str)
chapter3/log-sanitization/tests/test_sanitize_conversation.py:40
Method__init__
(self)
chapter3/mem0/test_agent_v3.py:7
Method__init__
(self)
chapter3/mem0/test_agent_v3.py:20
Method__init__
(self, config: Config)
chapter3/mem0/agent.py:96
Method__init__
(self, config: Optional[Config] = None)
chapter3/mem0/agent.py:129
Method__init__
(self, agent: Mem0Agent, config: Config)
chapter3/mem0/experiment.py:32
Method__init__
(self, agent: Mem0Agent)
chapter3/mem0/main.py:26
Method__init__
(self, laws_dir: Path = LAWS_DIR, pipeline_url: str = RETRIEVAL_PIPELINE_U
chapter3/contextual-retrieval/index_local_laws_contextual.py:47
Method__init__
Initialize the contextual chunker. Args: chunking_config: Configuration for chunking parameters llm_
chapter3/contextual-retrieval/contextual_chunking.py:73
Method__init__
(self, model_name: str, device: str)
chapter3/contextual-retrieval/campaign.py:33
Method__init__
(self, chunks: List[Dict], field: str, use_jieba: bool = True)
chapter3/contextual-retrieval/compare_retrieval.py:119
Method__init__
(self, config: Optional[ChunkingConfig] = None)
chapter3/contextual-retrieval/chunking.py:21
Method__init__
(self, kb_config: Optional[KnowledgeBaseConfig] = None, chunking_config: Op
chapter3/contextual-retrieval/chunking.py:159
Method__init__
Initialize the agent
chapter3/contextual-retrieval/agent.py:39
Method__init__
Initialize contextual agent. Args: config: Configuration object kb_tools: Contextual knowledge base
chapter3/contextual-retrieval/contextual_agent.py:29
Method__init__
(self, config: KnowledgeBaseConfig)
chapter3/contextual-retrieval/tools.py:36
Method__init__
Initialize contextual knowledge base tools. Args: config: Knowledge base configuration use_contextua
chapter3/contextual-retrieval/contextual_tools.py:63
Method__init__
(self)
chapter3/contextual-retrieval/demo.py:46
Method__init__
(self)
chapter3/contextual-retrieval/evaluation/dataset_builder.py:16
Method__init__
(self, config: Optional[Config] = None)
chapter3/contextual-retrieval/evaluation/evaluate.py:23
Method__init__
(self, model_name: str, device: str)
chapter3/dense-embedding/benchmark.py:51
Method__init__
(self, model_name: str, pooling: str = "auto", device: str = "cpu", max_length: int = 512)
chapter3/dense-embedding/cli.py:86
Method__init__
Initialize the client.
chapter3/dense-embedding/test_client.py:12
Method__init__
(self, logger: logging.Logger, show_embeddings: bool = False)
chapter3/dense-embedding/logger.py:96
Method__init__
Initialize the document store. Args: logger: Logger instance for educational output
chapter3/dense-embedding/document_store.py:23
Method__init__
Initialize the embedding service with BGE-M3 model. Args: model_name: Name of the BGE-M3 model use_f
chapter3/dense-embedding/embedding_service.py:14
Method__init__
Initialize ANNOY index. Args: dimension: Dimension of vectors n_trees: Number of trees for ANNOY (af
chapter3/dense-embedding/indexing.py:44
Method__init__
Initialize HNSW index. Args: dimension: Dimension of vectors max_elements: Maximum number of element
chapter3/dense-embedding/indexing.py:240
Method__init__
(self)
chapter3/sparse-embedding/bm25_engine.py:23
Method__init__
(self)
chapter3/sparse-embedding/bm25_engine.py:124
Method__init__
Initialize BM25 with tuning parameters k1: controls term frequency saturation (typically 1.2 to 2.0) b: controls length norma
chapter3/sparse-embedding/bm25_engine.py:254
Method__init__
(self)
chapter3/sparse-embedding/bm25_engine.py:416
Method__init__
(self, args: argparse.Namespace)
chapter3/agentic-rag/campaign.py:110
Method__init__
(self, config: Optional[ChunkingConfig] = None)
chapter3/agentic-rag/chunking.py:21
Method__init__
(self, kb_config: Optional[KnowledgeBaseConfig] = None, chunking_config: Op
chapter3/agentic-rag/chunking.py:159
Method__init__
Initialize the agent
chapter3/agentic-rag/agent.py:54
Method__init__
(self, config: KnowledgeBaseConfig)
chapter3/agentic-rag/tools.py:36
Method__init__
(self, laws_dir: Path = LAWS_DIR, pipeline_url: str = RETRIEVAL_PIPELINE_URL)
chapter3/agentic-rag/index_local_laws.py:49
Method__init__
(self, corpus_path: str = "laws", k1: float = 1.5, b: float
chapter3/agentic-rag/offline_retriever.py:53
Method__init__
(self)
chapter3/agentic-rag/evaluation/dataset_builder.py:16
Method__init__
(self, config: Optional[Config] = None)
chapter3/agentic-rag/evaluation/evaluate.py:31
Method__init__
Initialize the contextual memory indexer. Args: user_id: User identifier index_config: Index configu
chapter3/contextual-retrieval-for-user-memory/contextual_indexer.py:61
Method__init__
Initialize the advanced memory manager. Args: user_id: Unique user identifier storage_dir: Directory
chapter3/contextual-retrieval-for-user-memory/advanced_memory_manager.py:78
Method__init__
Initialize the contextual conversation chunker. Args: chunking_config: Configuration for chunking parameters
chapter3/contextual-retrieval-for-user-memory/contextual_chunking.py:113
Method__init__
(self, data=None, status_code=200)
chapter3/contextual-retrieval-for-user-memory/test_top_k.py:22
Method__init__
Initialize the indexer Args: config: Index configuration
chapter3/contextual-retrieval-for-user-memory/indexer.py:46
Method__init__
Initialize the evaluator Args: config: Configuration object
chapter3/contextual-retrieval-for-user-memory/evaluator.py:122
Method__init__
Initialize the agent Args: indexer: The memory indexer with loaded conversations config: Configurati
chapter3/contextual-retrieval-for-user-memory/agent.py:69
Method__init__
Initialize the contextual agent Args: indexer: The contextual memory indexer memory_manager: Advance
chapter3/contextual-retrieval-for-user-memory/contextual_agent.py:76
Method__init__
Initialize memory tools Args: indexer: The memory indexer instance
chapter3/contextual-retrieval-for-user-memory/tools.py:36
Method__init__
Initialize the evaluator Args: config: Configuration object
chapter3/contextual-retrieval-for-user-memory/contextual_evaluator.py:134
Method__init__
Initialize the chunker Args: config: Chunking configuration
chapter3/contextual-retrieval-for-user-memory/chunker.py:93
Method__init__
(self, corpus_tokens: List[List[str]], k1: float = 1.5, b: float = 0.75)
chapter3/contextual-retrieval-for-user-memory/contextual_compare.py:48
Method__init__
Initialize the interactive system
chapter3/contextual-retrieval-for-user-memory/main.py:43
Method__init__
Initialize the benchmark suite
chapter3/memobase/locomo_benchmark.py:55
Method__init__
(self, db_path: Path = MEMORY_DB_PATH)
chapter3/memobase/agent.py:100
Method__init__
Initialize the Memobase agent
chapter3/memobase/agent.py:258
Method__init__
(self, args: argparse.Namespace)
chapter3/structured-knowledge-extraction/campaign.py:152
Method__init__
(self, schema, model)
chapter3/structured-knowledge-extraction/advisor_agent.py:25
Method__iter__
(self)
chapter7/model-benchmark/test_campaign.py:209
Method__iter__
Unpack as the 4-tuple the pre-registry chapter helpers returned. Returns: An iterator over ``api_key``, ``base_url``, ``model`` a
agentbook/providers/models.py:97
Method__json__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/dom/views.py:182
Method__json__
Serializes the node and its descendants to a dictionary, omitting parent references.
chapter9/browser-use-rpa/browser-use/browser_use/dom/views.py:457
Method__len__
(self)
chapter8/cot-distillation/train_student.py:231
Method__len__
Return the number of history items
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:384
Method__ne__
(self, other: object)
chapter10/generative-agents/run_campaign.py:54
Method__post_init__
(self)
chapter7/user-memory-system-evaluation/experiment.py:50
Method__post_init__
(self)
chapter7/user-memory-system-evaluation/experiment.py:184
Method__post_init__
(self)
chapter2/attention_visualization/agent.py:63
Method__post_init__
(self)
chapter9/browser-use-rpa/browser-use/examples/mcp/advanced_server.py:43
Method__post_init__
(self)
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/paint_order.py:20
Method__post_init__
(self)
chapter4/multimodal-agent/agent.py:60
Method__post_init__
(self)
chapter3/log-sanitization/metrics.py:38
← previousnext →8,001–8,100 of 13,003, ranked by callers