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
Method
test_groq_ainvoke_structured
Test structured output from Groq
chapter9/browser-use-rpa/browser-use/browser_use/llm/tests/test_chat_models.py:205
Method
test_grounded_claims_pass
A claim whose tokens appear in a prior tool result is grounded.
tests/test_ch8_trajectory_consistency_checker.py:39
Method
test_grounded_claims_pass
A claim whose tokens appear in a prior tool result is grounded.
tests/test_ch9_trajectory_consistency_checker.py:39
Method
test_guard_dangerous_action
Test guarding a potentially dangerous action.
chapter4/collaboration-tools/test_intelligence_tools.py:118
Method
test_guard_safe_action
Test guarding a safe action.
chapter4/collaboration-tools/test_intelligence_tools.py:102
Function
test_guest_cannot_modify_task
(pm_store, project_admin, guest)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:278
Method
test_hallucinated_results_detected
claimed_tool_result differing from tool_result is hallucinated.
tests/test_ch8_trajectory_consistency_checker.py:148
Method
test_hallucinated_results_detected
claimed_tool_result differing from tool_result is hallucinated.
tests/test_ch9_trajectory_consistency_checker.py:148
Function
test_hallucination_is_an_unconditional_veto
()
chapter3/user-memory-evaluation/test_structured_rubric.py:45
Function
test_handle_barge_in_entrypoint
Verify direct invocation of handle_barge_in entrypoint.
tests/test_ch6_interruption_manager.py:96
Function
test_handle_barge_in_entrypoint
Verify direct invocation of handle_barge_in entrypoint.
tests/test_ch9_interruption_manager.py:96
Function
test_handoff_rejection_is_recorded_as_vendor_error
(monkeypatch)
chapter5/provider-failover/tests/test_offline.py:241
Method
test_harakat_do_not_force_an_extra_wrapped_line
(self)
book-ar/test_svg_lib.py:11
Function
test_hash_item_dict_different_key_value_pairs
Reassigning values across keys must change dictionary identity.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:42
Function
test_hash_item_dict_different_values
Different values under one key must not share a canonical identity.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:35
Function
test_hash_item_dict_distinguishes_heterogeneous_key_types
Textually similar keys of different types must not collide.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:95
Function
test_hash_item_dict_heterogeneous_keys_is_order_independent
Mixed key types must normalize independently of insertion order.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:56
Function
test_hash_item_dict_nested_different_values
Differences in recursively nested values must remain observable.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:49
Function
test_hash_item_preserves_container_type
List/tuple, set/tuple, and dict/tuple inputs must remain distinct.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:108
Function
test_hash_item_set_same_repr_members_is_order_independent
Equal sets normalize identically when member sort identities collide.
chapter2/prompt-engineering/test_hash_item_dict_collision.py:84
Method
test_head_limit
Test head_limit parameter
chapter5/coding-agent/tests/test_grep_tool.py:147
Function
test_head_limit_one_still_caps
(system_state, sample_files)
chapter5/coding-agent/tests/test_grep_head_limit_zero.py:19
Function
test_head_limit_zero_files_with_matches
(system_state, sample_files)
chapter5/coding-agent/tests/test_grep_head_limit_zero.py:4
Function
test_headings_ignore_code_and_strip_inline_markup
(tmp_path)
tests/test_homepage_index.py:52
Function
test_heuristic_quality_judge_string_expression_issues
Contract: HeuristicQualityJudge supports string items in quality_facts.expression_issues without throwing AttributeError.
tests/test_ch8_verifier_string_expression_issues.py:9
Function
test_heuristic_quality_judge_string_expression_issues
Contract: HeuristicQualityJudge supports string items in quality_facts.expression_issues without throwing AttributeError.
tests/test_ch9_verifier_string_expression_issues.py:9
Method
test_hidden_files_excluded
Test that hidden files (starting with .) are excluded
chapter5/coding-agent/tests/test_ls_tool.py:49
Function
test_hidden_result_contract_follows_the_configured_style
()
chapter1/context/test_experiment_1_1.py:229
Function
test_hidden_test_reward_pass_after_fix
修复工作区里的 bug 后宣称完成,隐藏测试通过应得 +1。
chapter8/premature-completion-dpo/test_pipeline.py:191
Function
test_hidden_test_reward_scoring
()
chapter8/premature-completion-dpo/test_pipeline.py:184
Function
test_hidden_tests_structure
()
chapter8/premature-completion-dpo/test_pipeline.py:174
Function
test_hidden_tool_results_leave_the_model_with_no_observations
()
chapter1/context/test_grounding.py:42
Method
test_high_risk_calls_are_flagged
(self)
chapter9/harness-safety-gate/test_evolution.py:71
Function
test_high_risk_confirmation_gate
()
tests/test_ch8_safety_policy_gate.py:93
Function
test_high_risk_confirmation_gate
()
tests/test_ch9_safety_policy_gate.py:93
Function
test_high_risk_git_force_push
()
tests/test_ch8_safety_policy_gate.py:120
Function
test_high_risk_git_force_push
()
tests/test_ch9_safety_policy_gate.py:120
Function
test_high_risk_sql_query
()
tests/test_ch8_safety_policy_gate.py:133
Function
test_high_risk_sql_query
()
tests/test_ch9_safety_policy_gate.py:133
Function
test_hiring_manager_cannot_modify_candidate
(hiring_store, recruiter, hiring_manager, system_ctx)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:114
Function
test_historical_report_parser_retains_complete_six_cell_matrix
()
chapter8/MiniMind-pretrain/validation/test_training_report_audit.py:25
Function
test_history_limit_zero_omits_history
()
chapter3/contextual-retrieval/test_history_limit_zero.py:7
Function
test_history_limit_zero_omits_history
()
chapter3/agentic-rag/test_history_limit_zero.py:8
Function
test_hitl_human_approval_before_timeout
Test Human-in-the-Loop decision approval submitted before timeout.
tests/test_ch4_notification_dispatcher.py:40
Function
test_hitl_human_rejection_before_timeout
Test Human-in-the-Loop decision rejection submitted before timeout.
tests/test_ch4_notification_dispatcher.py:77
Function
test_hitl_timeout_fallback_auto_approve
Test HITL timeout triggering auto-approve fallback policy.
tests/test_ch4_notification_dispatcher.py:107
Function
test_hitl_timeout_fallback_auto_reject
Test HITL timeout triggering auto-reject fallback policy.
tests/test_ch4_notification_dispatcher.py:126
Function
test_hitl_timeout_fallback_escalate
Test HITL timeout triggering escalation fallback policy and escalation notification.
tests/test_ch4_notification_dispatcher.py:145
Function
test_human_role_is_actually_randomized_by_the_shared_shuffle
()
chapter10/voice-werewolf/test_live_human.py:91
Function
test_hybrid_requires_at_least_one_core_card
()
chapter7/user-memory-system-evaluation/test_experiment.py:155
Function
test_hybrid_resident_context_contains_only_explicit_core_cards
()
chapter7/user-memory-system-evaluation/test_experiment.py:147
Function
test_identical_timestamps_return_one_slice
Two battles at the same unix second (weekly interval) -> one slice.
chapter7/elo-leaderboard/tests/test_time_slices_short_span.py:17
Method
test_ignore_null_lists_directory
JSON null ignore must not break listing (agent omits optional array).
chapter5/coding-agent/tests/test_ls_tool.py:200
Method
test_ignore_patterns
Test ignore parameter with glob patterns
chapter5/coding-agent/tests/test_ls_tool.py:70
Method
test_image_file_handling
Test image file handling
chapter5/coding-agent/tests/test_read_tool.py:120
Function
test_image_tag_is_kept_verbatim_including_extra_attributes
()
tests/test_mkdocs_figure_captions.py:70
Method
test_incomplete_prefix_has_no_replacement_char
(self)
chapter2/attention_visualization/test_token_labels.py:76
Function
test_independent_asean_reference_is_kuala_lumpur_singapore
()
chapter1/search-codegen/test_responses_agent.py:100
Function
test_index_graphrag_data_none_id_fallback
Verify items with explicit id=None fall back to entity_id/relation_id/community_id.
tests/test_ch3_hybrid_structured_retriever.py:260
Function
test_index_raptor_nodes_id_zero
Verify node ID 0 is not dropped during index_raptor_nodes.
tests/test_ch3_hybrid_structured_retriever.py:242
Method
test_individual_parameters_no_browser
Test action with individual parameters, no special injection
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:119
Method
test_individual_parameters_with_browser
Test action with individual parameters plus browser_session injection
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:133
Function
test_inference_requires_loaded_model
()
chapter6/end-to-end-speech/tests/test_speech_model.py:14
Function
test_infinite_loop_page_blocking
Test that pages with infinite JavaScript loops are detected as unresponsive.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_crash.py:184
Method
test_init
Test CloudSync initialization.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:319
Method
test_init_creates_config_dir
Test that initialization creates config directory.
chapter9/browser-use-rpa/browser-use/tests/ci/test_sync_client_auth.py:50
Method
test_init_with_default_generates_random_secret
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:118
Method
test_init_with_env_var
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:113
Method
test_init_with_parameter
(self)
chapter9/harness-safety-gate/test_safety_policy_gate.py:108
Function
test_initial_dispatch_timeout_does_not_block_hitl_timeout
Regression: a slow initial dispatch must not prevent the HITL timeout. The initial dispatch_all() is bounded by the same deadline as the HITL
tests/test_ch4_notification_dispatcher.py:736
Function
test_initial_rating
Test that models start with initial rating.
chapter7/elo-leaderboard/tests/test_elo.py:15
Function
test_initialize_sandbox_isolated_and_hashed
(tmp_path: Path)
chapter2/system-hint/test_experiment_2_8.py:48
Function
test_injection_attack_dataclass_defaults
()
tests/test_ch2_prompt_injection_robustness.py:49
Method
test_inline_element_mostly_offscreen
Test clicking an inline element that's mostly outside the viewport.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_ClickElementEvent.py:359
Function
test_inline_images_and_images_without_alt_are_left_alone
()
tests/test_mkdocs_figure_captions.py:92
Method
test_input
(params: InputTextAction, browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:497
Method
test_insert_at_beginning
Test inserting at beginning when cell_id not specified
chapter5/coding-agent/tests/test_notebook_edit_tool.py:107
Method
test_insert_cell
Test edit_mode=insert
chapter5/coding-agent/tests/test_notebook_edit_tool.py:68
Method
test_insert_file_content
Test inserting content into file.
chapter4/execution-tools/test_terminal_controller.py:145
Function
test_instrumentation_executes_only_the_configured_action_prefix
()
chapter7/openvla-robotwin2-eval/test_experiment.py:58
Function
test_integer_ids_and_children_type_safety
Verify integer children and entity_ids do not raise TypeError during citation building.
tests/test_ch3_hybrid_structured_retriever.py:183
Method
test_interactive_human_failure_is_not_mislabeled_as_blocked
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:133
Method
test_internal_urls_allowed_even_when_prohibited
Internal new-tab/blank URLs are always allowed regardless of prohibited list.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_security2.py:361
Function
test_introduction_overview_figure_uses_current_chapter_numbers
fig0-1 must agree with fig0-2 on where each chapter sits. The figure was corrected in #1111 (issue #1079); this locks the 2.0 numbering in so
tests/test_chapter_numbering_consistency.py:176
Function
test_introduction_uses_two_parts_and_current_chapter_numbers
()
tests/test_chapter_numbering_consistency.py:76
Function
test_invalid_configuration_fails_closed
(values: dict[str, str], message: str)
chapter6/computer-use-open-model/tests/test_config.py:41
Method
test_invalid_notebook_format
Test error with invalid JSON notebook
chapter5/coding-agent/tests/test_notebook_edit_tool.py:190
Method
test_invalid_parameters
Test handling of invalid parameters
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:419
Function
test_invalid_priority
(pm_store, project_admin, member)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:234
Method
test_invalid_regex
Test invalid regex pattern
chapter5/coding-agent/tests/test_grep_tool.py:204
Function
test_invalid_status_transition
(hiring_store, recruiter, system_ctx)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:76
Function
test_invalid_task_item_validation
Regression test: invalid task item raises ValueError.
tests/test_ch9_hermes_downstream_ablation.py:210
Function
test_invalid_task_item_validation
Regression test: invalid task item raises ValueError.
tests/test_ch8_hermes_downstream_ablation.py:210
Function
test_invalid_task_transition
(pm_store, project_admin, member)
chapter5/permission-embedded-data-objects/tests/test_scenarios.py:215
Function
test_invalid_trajectory_type_raises
()
tests/test_ch6_cost_efficiency_analyzer.py:459
Function
test_invalid_trajectory_type_raises
()
tests/test_ch7_cost_efficiency_analyzer.py:459
Method
test_invalid_values_use_default
(self)
chapter7/model-action-threshold/tasks/localized_timeout/repo/tests/test_config.py:13
Method
test_invented_receipt_fails
(self)
chapter6/astra-async-steering/test_judging.py:60
Method
test_invented_receipt_fails
(self)
chapter6/astra-async-steering/validation/runs/exp6-14-20260905-formal/source/test_judging.py:60
Function
test_inventory_timeout_uses_cache_within_deadline
(order_service: str)
chapter5/log-diagnosis/test_campaign_orchestrator.py:43
← previous
next →
11,201–11,300 of 13,003, ranked by callers