MCPcopy Create free account

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

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

Functionsimulation
()
scripts/book_figures/chapter7.py:130
Functionsingleton
(cls)
chapter9/browser-use-rpa/browser-use/browser_use/utils.py:385
Functionslack_events
(request: Request, slack_bot: Annotated[SlackBot, Depends()])
chapter9/browser-use-rpa/browser-use/examples/integrations/slack/slack_api.py:110
Functionslow_channel
(msg, ctx)
tests/test_ch4_notification_dispatcher.py:249
Functionslow_handler
(msg, ctx)
tests/test_ch4_notification_dispatcher.py:749
Functionslow_handler
(request)
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_NavigateToUrlEvent2.py:80
Methodslow_handler
(req)
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_recent_events.py:153
Methodsnapshot
(self)
chapter6/async-agent/tasks.py:252
Methodsolve
Solve a task with potential tone modifications Args: env: The environment task_index: Optional task
chapter2/prompt-engineering/ablation_agent.py:60
Methodsolve
( self, env: Env, task_index: Optional[int] = None, max_num_steps: int = 30 )
chapter2/prompt-engineering/tau_bench/agents/tool_calling_agent.py:27
Methodsolve
( self, env: Env, task_index: Optional[int] = None, max_num_steps: int = 30 )
chapter2/prompt-engineering/tau_bench/agents/chat_react_agent.py:61
Methodsolve
( self, env: Env, task_index: Optional[int] = None, max_num_steps: int = 30 )
chapter2/prompt-engineering/tau_bench/agents/few_shot_agent.py:35
Functionspan
(node)
web-astro/astro.config.mjs:42
Methodspeak
(self, players)
chapter10/voice-werewolf/test_live_human.py:105
Methodspeak
(self, players: List[str])
chapter10/voice-werewolf/werewolf/human.py:219
Methodspecial_params_only
(browser_session)
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry_action_parameter_injection.py:392
Functionspectrum
()
scripts/book_figures/chapter7.py:51
Functionsql
()
scripts/book_figures/chapter5.py:113
Functionstart
()
tests/js/auto-translate.test.js:45
Methodstart
Prepares and starts the video writer. If the required optional dependencies are not installed, this method will log an error and do nothing.
chapter9/browser-use-rpa/browser-use/browser_use/browser/video_recorder.py:57
Methodstart
(self)
chapter10/autonomous-phone-registration/twilio_channel.py:41
FunctionstartRecording
()
chapter6/live-audio/frontend/pages/index.tsx:334
Methodstart_reactions
(self)
chapter5/permission-embedded-data-objects/pedo/core/store.py:119
Functionstartup_event
Initialize indexers on startup.
chapter3/structured-index/api_service.py:72
Methodstep
(self, content: str)
chapter2/prompt-engineering/tau_bench/envs/user.py:21
Methodstep
(self, content: str)
chapter2/prompt-engineering/tau_bench/envs/user.py:33
Methodstep
(self, content: str)
chapter2/prompt-engineering/tau_bench/envs/user.py:169
Methodstep
(self, content: str)
chapter2/prompt-engineering/tau_bench/envs/user.py:233
Methodstep
(self, content: str)
chapter2/prompt-engineering/tau_bench/envs/user.py:270
Methodstep
(self, content: str)
chapter2/prompt-engineering/tau_bench/envs/user.py:384
Functionstock_price
Get stock price.
chapter4/perception-tools/src/main.py:256
Methodstop
(self)
chapter6/gemini-xlerobot-navigation/desktop_planner.py:106
Methodstop_reactions
(self)
chapter5/permission-embedded-data-objects/pedo/core/store.py:124
Methodstorage_bytes
(self)
chapter9/self-evolution-eval/agent.py:86
Methodstorage_bytes
(self)
chapter9/self-evolution-eval/agent.py:310
Functionstore
()
chapter5/permission-embedded-data-objects/tests/test_core.py:15
Functionstore
()
tests/test_ch5_pedo_tenant_isolation.py:32
Functionstore
(tmp_path, monkeypatch)
tests/test_ch5_pedo_atomic_delete.py:93
Functionstream_until
流式请求。``where`` 为 None 表示读完整条流(作为对照)。
chapter5/provider-failover/streaming.py:46
Functionstring_model
(prompt, language="English")
tests/test_ch7_evaluate_multilingual.py:70
Functionstring_model
(prompt, language="English")
tests/test_ch8_evaluate_multilingual.py:70
Methodstructured_output
Get the structured output from the history Returns: The structured output if both final_result and _output_model_schema are available, otherw
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:627
Methodsubmit
(self)
chapter10/autonomous-phone-registration/test_orchestration.py:28
Methodsubmit
(self)
chapter10/autonomous-phone-registration/test_orchestration.py:38
Methodsubmit
(self)
chapter10/autonomous-phone-registration/test_orchestration.py:51
Methodsupports_dp
(self, dp: Datapoint)
chapter2/prompt-engineering/tau_bench/model_utils/model/claude.py:74
Methodsupports_dp
(self, dp: Datapoint)
chapter2/prompt-engineering/tau_bench/model_utils/model/vllm_completion.py:119
Methodsupports_dp
(self, dp: Datapoint)
chapter2/prompt-engineering/tau_bench/model_utils/model/mistral.py:85
Methodsupports_dp
(self, dp: Datapoint)
chapter2/prompt-engineering/tau_bench/model_utils/model/openai.py:119
Methodsupports_dp
(self, dp: Datapoint)
chapter2/prompt-engineering/tau_bench/model_utils/model/outlines_completion.py:35
Methodsupports_dp
(self, dp: Datapoint)
chapter2/prompt-engineering/tau_bench/model_utils/model/anyscale.py:85
Methodsupports_dp
(self, dp: Datapoint)
chapter2/prompt-engineering/tau_bench/model_utils/model/vllm_chat.py:106
MethodswitchLLMProvider
* Switch LLM provider dynamically * @param {string} providerName - Provider name to switch to
chapter6/live-audio/backend/server.js:98
Methodswitch_tab
(params: SwitchTabAction, browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/browser_use/tools/service.py:542
Methodsync_action
(text: str, browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:444
Functionsync_handler
(msg, ctx)
tests/test_ch4_notification_dispatcher.py:535
Methodsync_to_disk_sync
(self, path: Path)
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:50
Functionsync_wrapper
(*args, **kwargs)
chapter9/browser-use-rpa/browser-use/browser_use/observability.py:79
Methodsynth
(self, speaker: str, text: str, round_no: int)
chapter10/voice-werewolf/werewolf/simulator.py:279
Methodsynth
(self, speaker: str, text: str, round_no: int)
chapter10/voice-werewolf/werewolf/human.py:174
Functionsynthesize
按 cfg.provider 分发到对应服务商合成语音,写入 out_path(mp3)。失败抛异常。 OpenAI 走官方 SDK;其余服务商按各家公开 REST 接口用内置 urllib 调用, 不引入额外依赖。缺少对应 key 时抛出带上下文的异常,由上层记为该行失败。
chapter7/tts-quality-eval/pipeline.py:106
Methodsynthesize
(self, _text)
chapter10/autonomous-phone-registration/test_webrtc_channel.py:17
Methodsynthesize
(self, text: str)
chapter10/autonomous-phone-registration/webrtc_channel.py:244
Methodsynthesize
(self, text: str)
chapter10/autonomous-phone-registration/webrtc_channel.py:312
Methodsynthesize
()
chapter10/autonomous-phone-registration/voice.py:44
Functionsystem_ctx
()
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:39
Functionsystem_state
Create a fresh system state for each test
chapter5/coding-agent/tests/conftest.py:13
Methodtag_name
(self)
chapter9/browser-use-rpa/browser-use/browser_use/dom/views.py:405
Methodtake_step
Take a step Returns: Tuple[bool, bool]: (is_done, is_valid)
chapter9/browser-use-rpa/browser-use/browser_use/agent/service.py:1335
Functiontc
(tmp_path, monkeypatch)
chapter4/execution-tools/test_command_history_count_zero.py:9
Functiontc
Create terminal controller with temp workspace.
chapter4/execution-tools/test_terminal_controller.py:14
Functiontelecom
()
scripts/book_figures/chapter7.py:32
Functiontemp_config_dir
Create temporary config directory.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:28
Functiontemp_config_dir
Create temporary config directory.
chapter9/browser-use-rpa/browser-use/tests/ci/test_cloud_browser.py:22
Functiontemp_dir
Create a temporary directory for tests
chapter5/coding-agent/tests/conftest.py:19
Functiontemp_files
(tmp_path)
tests/test_ch5_grep_tool_file_filters.py:14
Methodtemp_filesystem
Create a temporary FileSystem for testing.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:190
Functiontemp_notebook
(tmp_path)
tests/test_ch5_notebook_edit_zero_cell_id.py:15
Functiontest_600ms_vad_splits_a_long_pause
()
chapter6/streaming-speech/test_streaming.py:13
Functiontest_611_agent_can_make_followup_searches_and_exposes_tool_efficiency
()
chapter7/user-memory-system-evaluation/test_experiment.py:127
Functiontest_611_checkpoint_preserves_explicit_provider_errors
(tmp_path)
chapter7/user-memory-system-evaluation/test_run_full.py:59
Functiontest_64_checkpoint_requires_successful_full_rubric_rows
(tmp_path)
chapter7/user-memory-system-evaluation/test_run_full.py:39
Functiontest_a_run_that_never_reached_the_provider_observes_no_claims
()
chapter1/context/test_experiment_1_1.py:171
Functiontest_ablation_engine_initialization
Test initializing DownstreamAblationEngine and code quality scoring.
tests/test_ch9_hermes_downstream_ablation.py:23
Functiontest_ablation_engine_initialization
Test initializing DownstreamAblationEngine and code quality scoring.
tests/test_ch8_hermes_downstream_ablation.py:23
Functiontest_ablation_engine_regression_detection
Test identifying regression tasks (passed by baseline, failed by evolved).
tests/test_ch9_hermes_downstream_ablation.py:107
Functiontest_ablation_engine_regression_detection
Test identifying regression tasks (passed by baseline, failed by evolved).
tests/test_ch8_hermes_downstream_ablation.py:107
Functiontest_ablation_latency_and_quality_metrics
Test measuring latency change percentage and code quality delta.
tests/test_ch9_hermes_downstream_ablation.py:139
Functiontest_ablation_latency_and_quality_metrics
Test measuring latency change percentage and code quality delta.
tests/test_ch8_hermes_downstream_ablation.py:139
Methodtest_abs_round_min_max
(self)
chapter1/context/tests/test_calc_sandbox.py:48
Functiontest_absorb_anthropic_deltas
()
chapter5/provider-failover/tests/test_offline.py:138
Functiontest_absorb_follows_pagination_until_the_stars_run_out
()
tests/test_gen_star_history_iso_formats.py:111
Functiontest_absorb_keeps_only_stars_below_the_shard_boundary
Contract: a shard owns [cursor, hi), so a star at hi belongs to the next shard.
tests/test_gen_star_history_iso_formats.py:90
Functiontest_absorb_kimi_deltas
()
chapter5/provider-failover/tests/test_offline.py:129
Functiontest_absorb_only_trusts_a_cursor_for_a_fully_kept_page
Contract: endCursor points at the last edge, so it is a valid resume point only if that edge was kept.
tests/test_gen_star_history_iso_formats.py:100
Functiontest_acceptance_fails_closed_when_receipts_are_missing
()
chapter4/perception-tools/test_experiment_4_2.py:91
Functiontest_acceptance_fails_when_provider_archive_verification_is_missing
(tmp_path)
chapter6/agent-with-event-trigger/test_unipile_mailbox_experiment.py:120
Functiontest_acceptance_gate_names_are_exact_and_fail_closed
()
chapter6/phone-agent/test_webrtc_app.py:61
Functiontest_acceptance_is_multi_provider_not_openai_gated
()
chapter1/search-codegen/test_responses_agent.py:168
Functiontest_acceptance_rejects_two_fibers_from_one_search_round
()
chapter1/web-search-agent/tests/test_experiment_1_2.py:124
← previousnext →10,001–10,100 of 13,003, ranked by callers