MCPcopy Create free account

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

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

↓ 1 callersMethodlist_directory_with_sizes
List directory contents with file sizes. Args: directory_path: Path to directory Returns:
chapter4/execution-tools/filesystem_enhanced.py:149
↓ 1 callersMethodlist_documents
List documents with pagination.
chapter3/retrieval-pipeline/document_store.py:75
↓ 1 callersMethodlist_documents
List documents in the store.
chapter3/dense-embedding/test_client.py:53
↓ 1 callersMethodlist_documents
List all documents in the store. Args: limit: Maximum number of documents to return Returns:
chapter3/dense-embedding/document_store.py:121
↓ 1 callersMethodlist_emails
(self, account_id: str, *, after: datetime, folder: str | None = None, limit: int = 100)
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:198
↓ 1 callersFunctionlist_items
离线打印所有攻击场景与防御配置(无需 API Key)。
chapter2/prompt-injection/demo.py:75
↓ 1 callersFunctionlist_tools
离线打印所有已注册工具及其简介(无需 API Key)。
chapter5/coding-agent/main.py:385
↓ 1 callersMethodlisten
(self, *, timeout: float = 120.0)
chapter10/autonomous-phone-registration/webrtc_channel.py:571
↓ 1 callersMethodlisten
(self, *, timeout: float = 30.0)
chapter10/autonomous-phone-registration/voice.py:17
↓ 1 callersFunctionlive_search_plan
(case: Dict[str, Any], index: BM25Memory, recorder: ChatRecorder, args: argparse.Namespace)
chapter3/memory_rag_campaign.py:241
↓ 1 callersFunctionllm_findings
(client: ollama.Client, model: str, text: str, purpose: str, receipts: List[Dict[str, Any]])
chapter3/log-sanitization/campaign.py:125
↓ 1 callersFunctionload
(path)
chapter8/exact-copy-sft/train_sft.py:11
↓ 1 callersFunctionload
(path)
chapter8/exact-copy-sft/evaluate.py:9
↓ 1 callersFunctionload
(path: Path)
chapter4/collaboration-tools/validate_experiment_4_5.py:39
↓ 1 callersFunctionloadLibrary
(conf)
extras/auto-translate.js:63
↓ 1 callersFunctionloadTrajectories
()
chapter2/attention_visualization/frontend/pages/index.tsx:68
↓ 1 callersFunctionload_advanced_card
(case: Dict[str, Any])
chapter3/memory_rag_campaign.py:150
↓ 1 callersMethodload_all_workflows
Load all workflows from storage into memory.
chapter9/browser-use-rpa/learning_agent/knowledge_base.py:121
↓ 1 callersMethodload_and_extract_content
Load and extract content if in extract mode
chapter4/multimodal-agent/agent.py:1112
↓ 1 callersFunctionload_and_filter
(path: Path, max_records: int)
chapter7/elo-leaderboard/validation/run_experiment.py:68
↓ 1 callersMethodload_and_index_conversations
Load and index conversation histories
chapter3/contextual-retrieval-for-user-memory/main.py:230
↓ 1 callersFunctionload_and_migrate_config
Load config.json or create fresh one if old format detected.
chapter9/browser-use-rpa/browser-use/browser_use/config.py:298
↓ 1 callersFunctionload_and_prepare_dataset
加载并准备多语言推理数据集 使用 HuggingFaceH4/Multilingual-Thinking 数据集,该数据集包含: - 多种语言的推理链(思维链) - 支持英语、西班牙语、法语、德语、意大利语等 Returns:
chapter8/MultilingualReasoning/gpt_oss_20b_sft.py:46
↓ 1 callersMethodload_and_rerun
Load history from file and rerun it. Args: history_file: Path to the history file **kwargs: Additional argum
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:1945
↓ 1 callersMethodload_audio
(path: str | Path)
chapter6/end-to-end-speech/speech_model.py:102
↓ 1 callersFunctionload_base_model
加载基础模型和分词器 使用 Mxfp4Config 进行量化,这是专门为 OpenAI 模型优化的 4-bit 浮点格式。 Args: model_name: 模型名称或路径 Returns: t
chapter8/MultilingualReasoning/gpt_oss_20b_sft.py:101
↓ 1 callersFunctionload_baseline_model
Load the original Mistral model (before any training)
chapter8/continued-pretraining/compare_models.py:30
↓ 1 callersFunctionload_browser_use_config
Load browser-use configuration for MCP components.
chapter9/browser-use-rpa/browser-use/browser_use/config.py:493
↓ 1 callersFunctionload_cases
()
chapter3/memory_rag_campaign.py:53
↓ 1 callersFunctionload_cases
(root: Path, args: argparse.Namespace)
chapter3/user-memory/run_evaluation.py:72
↓ 1 callersFunctionload_chunks
(path: Path)
chapter3/contextual-retrieval/campaign.py:57
↓ 1 callersFunctionload_conversation
从 --input 指定的 JSON 文件读取对话,缺省则用内置示例对话。 文件格式:[{"role": "user"|"assistant", "content": "..."}, ...]
chapter3/memobase/profile_demo.py:59
↓ 1 callersFunctionload_corpus
从 document_store.json 载入分块,返回 [{chunk_id, contextual, plain, context}]。 每个分块的 content 字段是“上下文前缀 + 原始文本”,metadata.original_text 是不带上下文的原始文本,正好
chapter3/contextual-retrieval/compare_retrieval.py:75
↓ 1 callersFunctionload_corpus
加载语料。支持 .json(文档数组)与 .jsonl(每行一个文档)。
chapter3/dense-embedding/cli.py:145
↓ 1 callersFunctionload_corpus
加载语料。支持 .json(文档数组)与 .jsonl(每行一个文档)。
chapter3/sparse-embedding/cli.py:72
↓ 1 callersFunctionload_custom_catalog
()
scripts/site_i18n.py:153
↓ 1 callersMethodload_dataset
Load LOCOMO dataset
chapter3/user-memory/locomo_benchmark.py:52
↓ 1 callersMethodload_dataset
Load evaluation dataset
chapter3/contextual-retrieval/evaluation/evaluate.py:31
↓ 1 callersMethodload_dataset
Load evaluation dataset
chapter3/agentic-rag/evaluation/evaluate.py:39
↓ 1 callersFunctionload_dataset_for_context
Load the dataset for voice context examples.
chapter8/sesame/batch_inference.py:73
↓ 1 callersFunctionload_dataset_for_context
Load the dataset for voice context examples. Args: dataset_name: Name of the dataset split: Dataset split to use
chapter8/sesame/inference.py:47
↓ 1 callersFunctionload_dotenv_if_available
()
chapter6/computer-use-open-model/main.py:53
↓ 1 callersFunctionload_encoder
加载稠密编码器。离线且模型未缓存时给出清晰提示并返回 None(不影响参数解析验证)。
chapter3/dense-embedding/cli.py:121
↓ 1 callersFunctionload_env
极简 .env 加载(不引第三方依赖)。
chapter7/tts-quality-eval/demo.py:40
↓ 1 callersFunctionload_eval
载入评测集,返回 [{id, query, gold_chunk_id, ...}]。
chapter3/contextual-retrieval/compare_retrieval.py:106
↓ 1 callersFunctionload_eval_results
(eval_file: str)
chapter8/prompt-distillation/compare.py:98
↓ 1 callersMethodload_experiences
Load experiences from file.
chapter1/learning-from-experience/llm_agent.py:638
↓ 1 callersFunctionload_font
按候选列表加载一个可用字体(支持中文)。
chapter5/paper-to-video/demo.py:145
↓ 1 callersMethodload_from_enhanced_dom_tree
(cls, enhanced_dom_tree: EnhancedDOMTreeNode)
chapter9/browser-use-rpa/browser-use/browser_use/dom/views.py:861
↓ 1 callersMethodload_from_file
Load history from JSON file
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:449
↓ 1 callersFunctionload_golden_set
(path: Path | None = None)
chapter9/ai-style-skill/judge.py:193
↓ 1 callersFunctionload_gsm8k_answers
加载 GSM8K 数据集的金标答案 返回一个字典,键是数据集中的原始索引(0-1318),值是标准化后的答案
chapter8/Intuitor/evaluate_from_cache.py:166
↓ 1 callersFunctionload_history
(server: Any, history_path: Path)
chapter10/generative-agents/run_campaign.py:242
↓ 1 callersMethodload_index
Load chunks from disk and re-index in retrieval pipeline Args: path: Path to load index from (uses config defaul
chapter3/agentic-rag-for-user-memory/indexer.py:517
↓ 1 callersMethodload_index
Load chunks from disk and re-index in retrieval pipeline Args: path: Path to load index from (uses config defaul
chapter3/contextual-retrieval-for-user-memory/indexer.py:401
↓ 1 callersFunctionload_json
(path: Path)
chapter8/MiniMind-pretrain/validation/validate_evidence.py:60
↓ 1 callersFunctionload_json
(path: Path)
chapter8/continued-pretraining/validation/validate_evidence.py:39
↓ 1 callersFunctionload_json
(path: Path)
chapter6/phone-agent/verify_acceptance.py:89
↓ 1 callersFunctionload_json
(path: Path)
chapter10/generative-agents/validate_campaign.py:23
↓ 1 callersFunctionload_json
(path: str)
chapter3/retrieval-pipeline/evaluate.py:645
↓ 1 callersFunctionload_jsonl
(path: str | Path)
chapter8/cot-distillation/generate_data.py:39
↓ 1 callersFunctionload_jsonl_dataset
Load training data from JSONL file. Args: file_path: Path to JSONL file with messages format Returns: Datas
chapter8/prompt-distillation/train_sft_trl.py:24
↓ 1 callersFunctionload_labels
加载评测标注:{query: [relevant_doc_id, ...]}。
chapter3/dense-embedding/cli.py:164
↓ 1 callersFunctionload_labels
加载评测标注:{query: [relevant_doc_id, ...]}。
chapter3/sparse-embedding/cli.py:91
↓ 1 callersFunctionload_material_locale
(locale: str, languages_dir: Path)
scripts/site_i18n.py:132
↓ 1 callersFunctionload_mcp_tools_async
Load MCP tools asynchronously
chapter6/agent-with-event-trigger/server_fastapi.py:170
↓ 1 callersFunctionload_mcp_tools_async
Load MCP tools asynchronously
chapter6/agent-with-event-trigger/server.py:176
↓ 1 callersMethodload_memory
Load memory cards from storage
chapter3/contextual-retrieval-for-user-memory/advanced_memory_manager.py:96
↓ 1 callersFunctionload_model
Load the fine-tuned model with LoRA adapters.
chapter8/prompt-distillation/evaluate.py:26
↓ 1 callersFunctionload_model
Load a trained LoRA model
chapter8/continued-pretraining/compare_models.py:42
↓ 1 callersFunctionload_model
Load the saved LoRA model
chapter8/continued-pretraining/evaluate_model.py:31
↓ 1 callersFunctionload_model
Load the base model and optionally apply LoRA adapters.
chapter8/sesame/batch_inference.py:22
↓ 1 callersFunctionload_module
(name: str, path: Path)
chapter8/continued-pretraining/validation/test_report_audit.py:11
↓ 1 callersFunctionload_or_build_sample
(args: argparse.Namespace)
chapter3/structured-knowledge-extraction/campaign.py:134
↓ 1 callersFunctionload_pairs
(path: Path | None = None)
chapter9/ai-style-skill/extract_rules.py:21
↓ 1 callersFunctionload_problems
(path)
chapter5/code-for-math/demo.py:418
↓ 1 callersFunctionload_problems
(path: str)
chapter8/cot-distillation/generate_data.py:29
↓ 1 callersFunctionload_prompt_template
从 create_data.py 中提取教师使用的语言分类提示模板(避免 import vllm)。
chapter8/prompt-distillation/compare.py:31
↓ 1 callersFunctionload_result_files
Load result_*.json files into a {mode: {...}} dict for offline reporting.
chapter2/kv-cache/main.py:121
↓ 1 callersFunctionload_results
Load all results from the results directory Returns: Dictionary mapping experiment names to lists of rewards
chapter2/prompt-engineering/analyze_results.py:34
↓ 1 callersFunctionload_rows
(connection: sqlite3.Connection, campaign_id: str, table: str)
chapter7/model-benchmark/analysis.py:692
↓ 1 callersFunctionload_rows
(path: Path)
chapter8/curly-quote-sft/train_sft.py:16
↓ 1 callersFunctionload_schema
()
chapter3/structured-knowledge-extraction/discovery.py:103
↓ 1 callersFunctionload_script_file
从 JSON 文件加载现成讲解词(每页一段的字符串列表)。
chapter5/paper-to-video/demo.py:193
↓ 1 callersFunctionload_seen_hashes
Load already-saved article URL hashes from disk for dedup across restarts.
chapter9/browser-use-rpa/browser-use/examples/apps/news-use/news_monitor.py:176
↓ 1 callersFunctionload_slides_file
从 JSON 文件加载幻灯片内容([{title, subtitle, bullets}, ...])。
chapter5/paper-to-video/demo.py:182
↓ 1 callersFunctionload_source_book
(paths: list[Path])
chapter10/book-translation/run_official_experiment.py:49
↓ 1 callersMethodload_state
Load a saved state.
chapter3/mem0/main.py:96
↓ 1 callersFunctionload_task
(task_id: str)
chapter7/model-action-threshold/experiment.py:153
↓ 1 callersFunctionload_tasks
()
chapter9/self-evolution-eval/demo.py:16
↓ 1 callersFunctionload_teacher_labels
从蒸馏训练数据(教师标注)中读取 文本 -> 教师标签 的映射。
chapter8/prompt-distillation/compare.py:82
↓ 1 callersFunctionload_texts
(test_file: str)
chapter8/prompt-distillation/compare.py:77
↓ 1 callersFunctionload_texts_from_file
Load texts from a JSON file. Expected format: [ {"text": "Hello world", "speaker_id": 0, "output": "hello.wav"}, {"t
chapter8/sesame/batch_inference.py:40
↓ 1 callersFunctionload_trained_model
加载训练好的模型进行推理 Args: base_model_name: 基础模型名称 peft_model_path: LoRA 权重路径 Returns: tuple: (model, token
chapter8/MultilingualReasoning/gpt_oss_20b_sft.py:322
↓ 1 callersFunctionload_trajectories
读取生产轨迹集合,按 trajectory_id 索引。
chapter5/log-diagnosis/replay.py:33
↓ 1 callersFunctionload_uiautomator_env
(args)
chapter7/experiment-7-2-human-benchmark/run_android_human.py:13
↓ 1 callersFunctionload_user
( user_strategy: Union[str, UserStrategy], model: Optional[str] = "gpt-4o", provider: Optional[str
chapter2/prompt-engineering/tau_bench/envs/user.py:400
↓ 1 callersFunctionlocal_annoy_healthy
()
chapter3/dense-embedding/benchmark.py:146
↓ 1 callersFunctionlocal_extract
(kind: str, original: Path)
chapter4/multimodal-agent/campaign.py:85
↓ 1 callersFunctionlocal_model_tools
()
scripts/book_figures/chapter2.py:5
← previousnext →5,401–5,500 of 13,003, ranked by callers