MCPcopy Create free account

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

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

↓ 1 callersMethodsave_document_info
Save document information to local store
chapter3/agentic-rag/index_local_laws.py:295
↓ 1 callersMethodsave_document_store
Save document store to disk
chapter3/contextual-retrieval/tools.py:49
↓ 1 callersMethodsave_document_store
Save document store to disk
chapter3/agentic-rag/tools.py:50
↓ 1 callersMethodsave_file_system_state
Save current file system state to agent state
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:565
↓ 1 callersFunctionsave_history
(history: dict)
scripts/gen_star_history.py:329
↓ 1 callersMethodsave_history
Save the history to a file with sensitive data filtering
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:1958
↓ 1 callersMethodsave_index
Save the chunks and metadata to disk Args: path: Path to save index (uses config default if not specified)
chapter3/agentic-rag-for-user-memory/indexer.py:493
↓ 1 callersMethodsave_index
Save the chunks and metadata to disk Args: path: Path to save index (uses config default if not specified)
chapter3/contextual-retrieval-for-user-memory/indexer.py:377
↓ 1 callersFunctionsave_json
( path: str, matrix: list[list[float | None]], attack_idx: list[int], defense_idx: list[int],
chapter2/prompt-injection/demo.py:176
↓ 1 callersMethodsave_json_results
Save results to JSON file
chapter2/context-compression/run_all_strategies.py:342
↓ 1 callersFunctionsave_preview
(path: Path, images: torch.Tensor, labels: torch.Tensor)
chapter6/rgb-sim2real-grasping/pipeline.py:137
↓ 1 callersFunctionsave_progress
()
chapter10/book-translation/agents.py:703
↓ 1 callersMethodsave_react_trajectory
Save the ReAct trajectory with all steps Args: query: The initial query steps: List of ReAct steps
chapter2/attention_visualization/main.py:504
↓ 1 callersMethodsave_requirement
(self, key: str, value: str)
chapter10/staged-system-prompt/tools.py:45
↓ 1 callersFunctionsave_results
Save detailed results to JSON.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety.py:733
↓ 1 callersFunctionsave_results
Save results to JSON.
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/harness.py:761
↓ 1 callersMethodsave_results
Persist learning/replay metrics and KB stats to a JSON file.
chapter9/browser-use-rpa/demo_email.py:238
↓ 1 callersMethodsave_results
Save evaluation results to JSON Args: output_file: Output file path (defaults to timestamped file)
chapter3/agentic-rag-for-user-memory/evaluator.py:618
↓ 1 callersMethodsave_results
Save benchmark results to file.
chapter3/mem0/experiment.py:349
↓ 1 callersMethodsave_results
Save evaluation results to JSON Args: output_file: Output file path (defaults to timestamped file)
chapter3/contextual-retrieval-for-user-memory/evaluator.py:618
↓ 1 callersMethodsave_results
Save evaluation results to file
chapter3/contextual-retrieval-for-user-memory/contextual_evaluator.py:737
↓ 1 callersMethodsave_results
Save benchmark results to file
chapter3/memobase/locomo_benchmark.py:566
↓ 1 callersFunctionsave_spec_results
Save results to JSON.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_spec_errors.py:424
↓ 1 callersMethodsave_state
Save the current state.
chapter3/mem0/main.py:90
↓ 1 callersMethodsave_to_file
Save history to JSON file with proper serialization and optional sensitive data filtering
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:400
↓ 1 callersMethodsay
(self, text: str)
chapter10/autonomous-phone-registration/webrtc_channel.py:554
↓ 1 callersMethodsay
(self, text: str)
chapter10/autonomous-phone-registration/twilio_channel.py:120
↓ 1 callersMethodsay
(self, text: str)
chapter10/autonomous-phone-registration/voice.py:16
↓ 1 callersMethodsay
(self, speaker, text, round_no, allow_barge_in=False)
chapter10/voice-werewolf/test_live_human.py:21
↓ 1 callersMethodsay
(self, speaker: str, text: str, round_no: int, *, allow_barge_in: bool = False)
chapter10/voice-werewolf/werewolf/simulator.py:275
↓ 1 callersFunctionscan_credentials
(run_dir: Path)
chapter8/MiniMind-pretrain/validation/validate_vlm_evidence.py:215
↓ 1 callersFunctionscenario_1
()
chapter6/async-agent/run_real_experiment.py:89
↓ 1 callersFunctionscenario_2
(campaign_dir: Path)
chapter6/async-agent/run_real_experiment.py:119
↓ 1 callersFunctionscenario_3
()
chapter6/async-agent/run_real_experiment.py:166
↓ 1 callersFunctionscenario_4
(campaign_dir: Path)
chapter6/async-agent/run_real_experiment.py:202
↓ 1 callersFunctionschema_dict
(tool)
chapter4/active-tool-discovery/run_exact_experiment.py:139
↓ 1 callersFunctionscore
(pred, target, kind)
chapter8/curly-quote-sft/evaluate.py:21
↓ 1 callersMethodscore
(self, query: str, docs: Sequence[str])
chapter3/retrieval-pipeline/evaluate.py:298
↓ 1 callersFunctionscore_arm
(name: str, problems: list[dict[str, Any]], outputs: list[str])
chapter8/cot-distillation/evaluate_student.py:147
↓ 1 callersFunctionscore_decision_boundary
用模型对两个候选动作打分,直接测量“完成/继续验证”的决策偏好。 自由生成容易生成很长的计划,难以判断模型是否真正改变了收尾决策。 这里固定两个候选续写,比较它们的平均 token 对数概率;候选文本本身 不来自训练集,边界集和保留集仍按任务类型分开统计。
chapter8/premature-completion-dpo/evaluate.py:194
↓ 1 callersMethodscore_dp
(self, dp: Datapoint)
chapter2/prompt-engineering/tau_bench/model_utils/api/router.py:25
↓ 1 callersMethodscored
返回前 top_k 个结果及其分数。
chapter3/contextual-retrieval/compare_retrieval.py:131
↓ 1 callersMethodscreenshot_element
Take a screenshot of a specific element. Args: selector: CSS selector for the element path: Optional file path to save screenshot format:
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:2444
↓ 1 callersMethodscreenshots
Get all screenshots from history as base64 strings
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:525
↓ 1 callersMethodscroll
Scroll the page using robust CDP methods.
chapter9/browser-use-rpa/browser-use/browser_use/actor/mouse.py:85
↓ 1 callersFunctionscrollChatToBottom
()
chapter6/live-audio/frontend/pages/index.tsx:540
↓ 1 callersFunctionscrollLogsToBottom
()
chapter6/live-audio/frontend/pages/index.tsx:546
↓ 1 callersFunctionscrub_value
(value: Any, secret: str)
chapter6/computer-use-open-model/main.py:65
↓ 1 callersMethodsearch
返回 (chunk_id, score) 列表,按分数降序,只保留正分。
chapter3/retrieval-pipeline/evaluate.py:182
↓ 1 callersMethodsearch
Search for top-k similar items in the ANNOY index.
chapter3/dense-embedding/indexing.py:175
↓ 1 callersMethodsearch_and_save
Search for information and save results to a file.
chapter9/browser-use-rpa/browser-use/examples/mcp/advanced_server.py:126
↓ 1 callersFunctionsearch_arxiv
Search ArXiv for academic papers. Args: query: Search query max_results: Maximum number of results sort_by: Sort
chapter4/perception-tools/src/public_data_tools.py:368
↓ 1 callersFunctionsearch_cancel
()
scripts/book_figures/chapter10.py:125
↓ 1 callersMethodsearch_conversations
Search conversations using Dify vector search Args: query: Search query user_id: User identifier
chapter3/user-memory/conversation_history.py:234
↓ 1 callersMethodsearch_dense
Search using dense embeddings.
chapter3/retrieval-pipeline/retrieval_client.py:85
↓ 1 callersMethodsearch_memory
Retrieve memories with mem0 v3's fused search signals.
chapter3/mem0/agent.py:321
↓ 1 callersFunctionsearch_notion
Search Notion workspace or specific database. Args: query: Search query database_id: Optional specific database ID
chapter4/perception-tools/src/private_data_tools.py:151
↓ 1 callersFunctionsearch_one
( site: Website, target: str, browsers: BrowserPool, timeout: float, browser_receipt_sink:
chapter10/parallel-web-research/agents.py:326
↓ 1 callersMethodsearch_sparse
Search using sparse embeddings (BM25).
chapter3/retrieval-pipeline/retrieval_client.py:120
↓ 1 callersFunctionsearch_url
(url: str, query: str, depth: int = 2)
chapter9/browser-use-rpa/browser-use/examples/api/search/search_url.py:22
↓ 1 callersFunctionsearch_wayback
Search Wayback Machine for archived versions of a URL. Args: url: URL to search for year: Optional year to filter result
chapter4/perception-tools/src/public_data_tools.py:461
↓ 1 callersMethodsearch_with_context
带上下文的搜索 Args: question: 用户问题 context: 额外的上下文信息 Returns: 答案
chapter1/web-search-agent/examples.py:55
↓ 1 callersFunctionsearch_x_posts
Search X posts without exposing credentials as tool arguments.
chapter4/perception-tools/src/xquik_tools.py:65
↓ 1 callersFunctionsection
(title: str)
chapter4/execution-tools/cli.py:224
↓ 1 callersFunctionsection
(title)
chapter3/structured-knowledge-extraction/demo.py:23
↓ 1 callersFunctionsectionFrame
(k, y, height, name)
web-astro/scripts/async-architecture-layout.mjs:297
↓ 1 callersFunctionseed_messages
(client: UnipileClient, sender_account_id: str, recipient: str, campaign_id: str)
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:461
↓ 1 callersFunctionseed_node_counts
(output: Path)
chapter10/generative-agents/judge_plausibility.py:43
↓ 1 callersFunctionsegments
(d)
web-astro/scripts/evaluation-overview-layout.test.mjs:62
↓ 1 callersMethodselect
(self, test_case: TestCase, chunks: List[Chunk])
chapter7/user-memory-system-evaluation/experiment.py:752
↓ 1 callersFunctionselect_mode_interactive
Interactively prompt the user to select an execution mode Returns: Selected mode string ('evaluation', 'interactive', or 'demo')
chapter3/user-memory/main.py:721
↓ 1 callersFunctionselect_strategy
Let user select a compression strategy
chapter2/context-compression/main.py:39
↓ 1 callersFunctionselect_tasks
(patterns: list[str] | None, quick: bool)
chapter5/small-model-codified-rules/demo.py:276
↓ 1 callersFunctionselect_tools
按 --tool-set-size 截取一个工具子集,用于演示"工具集规模"对各策略的影响。 子集**始终**包含:基础工具、全部通用/兜底工具(诱导项)、以及所选任务判分槽位涉及的 专用工具;其余名额按 ALL_TOOLS 原顺序补足,直到达到 size 个。 size
chapter4/active-tool-discovery/tools_library.py:307
↓ 1 callersFunctionselectedLessonNumbers
()
slides/generate.mjs:132
↓ 1 callersFunctionselected_comparisons
(retained: dict[str, Any])
chapter8/MiniMind-pretrain/validation/run_training_report_audit.py:216
↓ 1 callersFunctionselected_pricing_manifest
Return only prices used by the selected experiment, with provenance intact.
chapter7/user-memory-system-evaluation/experiment.py:1453
↓ 1 callersFunctionselection
()
scripts/book_figures/chapter8.py:164
↓ 1 callersMethodself_cascade
( self, audio_path: str | Path, instruction: str, *, max_new_tokens: int = 256 )
chapter6/end-to-end-speech/speech_model.py:168
↓ 1 callersFunctionself_check
快速自检 ffmpeg/ffprobe、中文字体与关键环境变量,返回退出码。
chapter5/paper-to-video/demo.py:382
↓ 1 callersFunctionself_heal
针对一种新格式跑完整的自愈闭环,成功注册返回 True。
chapter5/adaptive-log-parser/demo.py:109
↓ 1 callersMethodself_review_and_revise
把最新渲染截图加入**同一**上下文,让模型自审并修订。图片会一直留在历史里。
chapter5/paper-to-ppt/agents.py:476
↓ 1 callersFunctionself_test
()
chapter5/permission-embedded-data-objects/pedo/eval/baxbench_adapter/harness.py:125
↓ 1 callersFunctionsemanticLabels
(source)
web-astro/scripts/collaboration-manager-figures.mjs:16
↓ 1 callersFunctionsemanticLabels
(source)
web-astro/scripts/evolution-methods-figures.mjs:20
↓ 1 callersFunctionsend_discord_message
Send a Discord message via webhook. Args: message: Message text to send webhook_url: Optional Discord webhook URL (uses defau
chapter4/collaboration-tools/src/notification_tools.py:319
↓ 1 callersFunctionsend_message
Send a WhatsApp message
chapter9/browser-use-rpa/browser-use/examples/apps/msg-use/scheduler.py:118
↓ 1 callersMethodsend_message
(self, channel, text, thread_ts=None)
chapter9/browser-use-rpa/browser-use/examples/integrations/slack/slack_api.py:102
↓ 1 callersFunctionsend_message_to_subagent
Send a follow-up message (labeled [FROM_MAIN_AGENT]) to a sub-agent. Runs one more LLM turn synchronously and returns the sub-agent's reply.
chapter4/collaboration-tools/src/subagent_tools.py:474
↓ 1 callersFunctionsent_messages
Flatten every message that actually went out on the wire. Args: turns: The arm's recorded API turns. Returns: The concatenat
chapter1/context/run_experiment_1_1.py:342
↓ 1 callersFunctionsentence_months
(meta: Dict[str, Any])
chapter3/structured-knowledge-extraction/campaign.py:71
↓ 1 callersFunctionsequence
(k)
web-astro/scripts/tool-protocol-layout.mjs:14
↓ 1 callersFunctionsequenceRow
(kit, groups, widths, title, y, tone)
web-astro/scripts/memory-foundation-layout.mjs:112
↓ 1 callersFunctionsequential
()
scripts/book_figures/chapter10.py:52
↓ 1 callersFunctionserialize
(results: list[PrefixResult])
chapter6/streaming-speech/qwen2_streaming.py:186
↓ 1 callersMethodserialize
(message: UserMessage)
chapter9/browser-use-rpa/browser-use/examples/models/langchain/serializer.py:110
↓ 1 callersMethodserialize
(message: UserMessage)
chapter9/browser-use-rpa/browser-use/browser_use/llm/deepseek/serializer.py:74
↓ 1 callersMethodserialize
(message: UserMessage)
chapter9/browser-use-rpa/browser-use/browser_use/llm/ollama/serializer.py:84
↓ 1 callersMethodserialize
(message: UserMessage)
chapter9/browser-use-rpa/browser-use/browser_use/llm/anthropic/serializer.py:155
↓ 1 callersMethodserialize
(message: UserMessage)
chapter9/browser-use-rpa/browser-use/browser_use/llm/openai/serializer.py:107
← previousnext →6,801–6,900 of 13,003, ranked by callers