Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bojieli/ai-agent-book
/ functions
Functions
13,003 in github.com/bojieli/ai-agent-book
⨍
Functions
13,003
◇
Types & classes
1,574
↳
Endpoints
161
Function
chat
默认回声式回复;设置 CHAT_MODEL 后走真实 LLM 对话。 本实验聚焦"对话式 UI 定制",后端逻辑刻意保持最小; 如需真实客服体验,用 `python main.py --model <模型名>` 打开 LLM 模式即可。
chapter5/conversational-ui/validation/runs/20260729T212616Z-5_11-hmr/app/backend/main.py:106
Function
chat
默认回声式回复;设置 CHAT_MODEL 后走真实 LLM 对话。 本实验聚焦"对话式 UI 定制",后端逻辑刻意保持最小; 如需真实客服体验,用 `python main.py --model <模型名>` 打开 LLM 模式即可。
chapter5/conversational-ui/validation/runs/20260729T212933Z-5_11-hmr/app/backend/main.py:106
Function
chat
默认回声式回复;设置 CHAT_MODEL 后走真实 LLM 对话。 本实验聚焦"对话式 UI 定制",后端逻辑刻意保持最小; 如需真实客服体验,用 `python main.py --model <模型名>` 打开 LLM 模式即可。
chapter5/conversational-ui/validation/runs/20260729T212727Z-5_11-hmr/app/backend/main.py:106
Method
chat
Chat interface that maintains conversation history Args: message: User message **kwargs: Generation
chapter2/attention_visualization/agent.py:493
Method
chat
(self, **kwargs)
chapter2/local_llm_serving/test_ollama_thinking.py:16
Method
chat
(self, **kwargs)
chapter2/local_llm_serving/test_ollama_thinking.py:30
Method
chat
(self, **kwargs)
chapter3/log-sanitization/tests/test_sanitize_conversation.py:43
Function
chat_create
(**kwargs: Any)
chapter10/generative-agents/provider_adapter.py:185
Function
check_adherence
术语表遵从率:对每个“指定术语”,统计在出现该概念的章节里, 有多少章使用了术语表规定的译法(而非默认译法)。 这是管理者模式的核心价值:共享术语表能把指定译法贯彻到每一章; 单 Agent 看不到术语表,只能用自己的默认译法。
chapter10/book-translation/consistency.py:48
Function
check_config
()
chapter1/search-codegen/config.py:85
Function
check_env_variables
Check if all required environment variables are set
chapter9/browser-use-rpa/browser-use/browser_use/utils.py:396
Function
check_openai_key
Check if OpenAI API key is available.
chapter4/collaboration-tools/test_intelligence_tools.py:22
Method
check_token_exists
Check if saved token file exists.
chapter9/browser-use-rpa/browser-use/examples/integrations/gmail_2fa_integration.py:54
Function
checker
()
tests/test_ch8_trajectory_consistency_checker.py:25
Function
checker
()
tests/test_ch9_trajectory_consistency_checker.py:25
Method
children_and_shadow_roots
Returns all children nodes, including shadow roots
chapter9/browser-use-rpa/browser-use/browser_use/dom/views.py:395
Method
choose_target
(self, prompt, candidates, players, allow_none=False)
chapter10/voice-werewolf/test_live_human.py:100
Method
choose_target
(self, prompt: str, candidates: List[str], players: List[str], allow_none: bool = False)
chapter10/voice-werewolf/werewolf/simulator.py:435
Method
choose_target
(self, prompt: str, candidates: List[str], players: List[str], allow_none: bool = False)
chapter10/voice-werewolf/werewolf/human.py:222
Method
chunk_test_case_conversations
Chunk all conversations in a test case Args: test_case: Test case containing conversation histories
chapter3/contextual-retrieval-for-user-memory/chunker.py:259
Method
circle
(self, cx, cy, r, fill='light', label=None, font_size=FS_SMALL)
book-en/svg_lib.py:468
Method
circle
(self, cx, cy, r, fill='light', label=None, font_size=FS_SMALL)
book-tr/svg_lib.py:468
Method
circle
(self, cx, cy, r, fill='light', label=None, font_size=FS_SMALL)
book-ar/svg_lib.py:494
Method
circle
(self, cx, cy, r, fill='light', label=None, font_size=FS_SMALL)
book-ru/svg_lib.py:468
Method
circle
(self, cx, cy, r, fill='light', label=None, font_size=FS_SMALL)
book-es/svg_lib.py:468
Method
circle
(self, cx, cy, r, fill='light', label=None, font_size=FS_SMALL)
book-mn/svg_lib.py:469
Method
circle
(self, cx, cy, r, fill='light', label=None, font_size=FS_SMALL)
book-id/svg_lib.py:468
Method
classify
( self, instruction: str, text: str, options: list[str], examples: lis
chapter2/prompt-engineering/tau_bench/model_utils/model/chat.py:346
Method
classify
( self, instruction: str, text: str, options: list[str], examples: lis
chapter2/prompt-engineering/tau_bench/model_utils/model/completion.py:273
Method
classify
( self, instruction: str, text: str, options: list[str], examples: lis
chapter2/prompt-engineering/tau_bench/model_utils/model/model.py:54
Function
claude_generate
(prompt, sys_prompt)
chapter5/permission-embedded-data-objects/run_targeted_eval.py:35
Function
clean_env
Start every test from a known-empty environment.
tests/test_providers.py:62
Function
clean_env
Start every test with no provider keys, whatever the developer's .env holds.
chapter1/context/tests/test_openrouter_notice.py:20
Method
clean_old_caches
Clean up old cache files, keeping only the most recent ones
chapter9/browser-use-rpa/browser-use/browser_use/tokens/service.py:543
Function
clean_provider_env
Start every test from a known provider environment.
tests/test_ch1_learning_agent_kimi_base_url.py:37
Method
clean_schema
(obj: Any)
chapter9/browser-use-rpa/browser-use/browser_use/llm/google/chat.py:467
Function
cleanup_font_cache
Clean up the font cache to prevent memory leaks in long-running applications.
chapter9/browser-use-rpa/browser-use/browser_use/browser/python_highlights.py:66
Method
cleanup_loop
()
chapter9/browser-use-rpa/browser-use/browser_use/mcp/server.py:1029
Method
clear
Clear all documents.
chapter3/retrieval-pipeline/document_store.py:80
Method
clear
Clear all documents from the store.
chapter3/dense-embedding/document_store.py:145
Function
clearLogs
()
chapter6/live-audio/frontend/pages/index.tsx:488
Function
clear_all
Clear all documents from the pipeline (for testing).
chapter3/retrieval-pipeline/main.py:240
Method
clear_all
Clear all workflows from the knowledge base (use with caution).
chapter9/browser-use-rpa/learning_agent/knowledge_base.py:326
Method
clear_all_memories
Clear all memories for this user - useful for testing
chapter3/user-memory/memory_manager.py:238
Method
clear_all_memories
Clear all memories for this user
chapter3/user-memory/memory_manager.py:693
Method
clear_all_memories
Clear all memory cards
chapter3/contextual-retrieval-for-user-memory/advanced_memory_manager.py:367
Function
clear_cache
()
chapter2/prompt-engineering/test_hash_item_dict_collision.py:27
Method
clear_cookies
Clear all cookies.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:958
Method
clear_history
Clear usage history
chapter9/browser-use-rpa/browser-use/browser_use/tokens/service.py:534
Method
clear_history
(self)
chapter1/search-codegen/agent.py:367
Method
clear_history
Clear conversation history
chapter1/search-codegen/main.py:84
Method
clear_history
Clear conversation history
chapter3/agentic-rag-for-user-memory/agent.py:367
Method
clear_history
Clear conversation history
chapter3/contextual-retrieval-for-user-memory/agent.py:363
Function
clear_index
Clear all indexed documents
chapter3/sparse-embedding/server.py:464
Function
clear_indexes
Clear the specified indexes.
chapter3/structured-index/api_service.py:342
Method
click
(index: int, browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:713
Method
click_element
(params: ClickAction, browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:560
Method
click_element_by_index
(params: ClickElementAction, browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/browser_use/tools/service.py:278
Function
click_submit_button
(browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/examples/custom-functions/actor_use.py:21
Method
close
(self)
chapter10/autonomous-phone-registration/twilio_channel.py:128
Method
close
(self)
chapter10/autonomous-phone-registration/test_orchestration.py:127
Method
close
(self)
chapter10/parallel-web-research/test_coordination.py:121
Method
cloud_browser
Whether to use cloud browser service from browser profile.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:333
Method
cloud_browser
Alias for use_cloud field for compatibility.
chapter9/browser-use-rpa/browser-use/browser_use/browser/profile.py:559
Function
cloud_sync
Create a CloudSync instance configured for testing. This fixture creates a real CloudSync instance and sets up the test environment to use the ht
chapter9/browser-use-rpa/browser-use/tests/ci/conftest.py:176
Function
cmd_add
写入一条记忆。仅 notes / enhanced_notes 模式支持自由文本写入。
chapter3/user-memory/memory_cli.py:63
Function
cmd_ask
在线:单条自然语言查询 -> 生成 SQL -> 执行并打印结果表。
chapter5/erp-agent/demo.py:271
Function
cmd_battle
(args)
chapter7/elo-leaderboard/cli.py:192
Function
cmd_calendar
(args: argparse.Namespace)
chapter4/execution-tools/cli.py:171
Function
cmd_code
(args: argparse.Namespace)
chapter4/execution-tools/cli.py:111
Function
cmd_consolidate
去重 + 版本化冲突消解(纯离线,无需 API)。
chapter3/user-memory/memory_cli.py:102
Function
cmd_demo
(args)
chapter4/collaboration-tools/main.py:259
Function
cmd_demo
(args)
chapter4/perception-tools/cli.py:455
Function
cmd_demo
端到端离线演示:模拟一个 Agent 用执行工具完成一个真实小任务。 场景:Agent 需要写一个词频统计脚本、生成样本数据、运行统计、再用 shell 校验结果。演示同时覆盖四个安全机制:linter 校验、危险命令 fail-safe 审批、 长输出截断与持久化。整个流
chapter4/execution-tools/cli.py:197
Function
cmd_demo
多会话离线示例:写入 → 冲突/重复 → 整理 → 后续会话回忆。 使用独立的 user_id 和临时存储目录,绝不触碰 data/ 下的真实用户数据。
chapter3/user-memory/memory_cli.py:128
Function
cmd_edit
(args: argparse.Namespace)
chapter4/execution-tools/cli.py:160
Function
cmd_elo
(args)
chapter7/elo-leaderboard/cli.py:198
Function
cmd_extract
从一段对话中自动提取记忆——需要 LLM API(在线)。 此子命令的参数解析与校验可离线验证;实际提取会调用后台记忆处理器, 需要配置对应 provider 的 API Key。
chapter3/user-memory/memory_cli.py:186
Function
cmd_gold
离线:执行内置标准 SQL -> 比对(无需 API)。
chapter5/erp-agent/demo.py:255
Function
cmd_hitl
(args)
chapter4/collaboration-tools/main.py:164
Function
cmd_info
(args)
chapter4/perception-tools/cli.py:273
Function
cmd_initdb
建表并把种子数据灌入一个 SQLite 文件,便于手工用 sqlite3 查看。
chapter5/erp-agent/demo.py:299
Function
cmd_leaderboard
(args)
chapter7/elo-leaderboard/cli.py:209
Function
cmd_list
(args)
chapter4/collaboration-tools/main.py:83
Function
cmd_list
(args)
chapter4/perception-tools/cli.py:251
Function
cmd_list
(args: argparse.Namespace)
chapter4/execution-tools/cli.py:100
Function
cmd_notify
(args)
chapter4/collaboration-tools/main.py:183
Function
cmd_pipeline
(args)
chapter7/elo-leaderboard/cli.py:224
Function
cmd_pr
(args: argparse.Namespace)
chapter4/execution-tools/cli.py:184
Function
cmd_query
按关键词检索记忆——用于演示“在后续会话中回忆起用户信息”。
chapter3/user-memory/memory_cli.py:75
Function
cmd_run
在线:Agent 生成 SQL -> 执行 -> 比对。
chapter5/erp-agent/demo.py:236
Function
cmd_run
(args)
chapter4/perception-tools/cli.py:302
Function
cmd_shell
(args: argparse.Namespace)
chapter4/execution-tools/cli.py:131
Function
cmd_show
打印某用户当前的全部记忆(即注入模型上下文的字符串)。
chapter3/user-memory/memory_cli.py:120
Function
cmd_subagent
(args)
chapter4/collaboration-tools/main.py:118
Function
cmd_update
按 ID 更新一条已有记忆(模拟用户提供了更新后的信息)。
chapter3/user-memory/memory_cli.py:93
Function
cmd_write
(args: argparse.Namespace)
chapter4/execution-tools/cli.py:141
Function
code
(ids)
web-astro/scripts/evaluation-layout-kit.mjs:5
Method
code_block
Render a block of monospace code lines with background.
book-en/svg_lib.py:367
Method
code_block
Render a block of monospace code lines with background.
book-tr/svg_lib.py:367
← previous
next →
8,501–8,600 of 13,003, ranked by callers