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
test_acceptance_requires_distinct_sequential_formula_fibers_and_links
()
chapter1/web-search-agent/tests/test_experiment_1_2.py:40
Function
test_acceptance_status_fails_closed_without_campaign_receipts
()
chapter4/active-tool-discovery/test_exact_experiment.py:95
Method
test_accepted_rejection_is_a_real_decision_but_not_publication_approval
(self)
chapter4/collaboration-tools/test_run_experiment_4_5.py:123
Method
test_accepted_without_successor_is_not_success
(self)
chapter6/astra-async-steering/test_judging.py:41
Method
test_accepted_without_successor_is_not_success
(self)
chapter6/astra-async-steering/validation/runs/exp6-14-20260905-formal/source/test_judging.py:41
Method
test_action
(cell_or_range: str, browser_session: BrowserSession)
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:367
Function
test_action_arena_invalid_output_falls_back_only_within_accessible_arenas
()
chapter10/generative-agents/tests/test_runner_helpers.py:148
Function
test_action_arena_matches_case_insensitively_to_exact_allowed_value
()
chapter10/generative-agents/tests/test_runner_helpers.py:138
Function
test_action_arena_strips_legacy_leading_brace
()
chapter10/generative-agents/tests/test_runner_helpers.py:128
Method
test_action_calling_action_with_kwargs
Test action calling another action using kwargs (current problematic pattern)
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:246
Function
test_adapter_overrides_legacy_models_and_compacts_embeddings
(tmp_path, monkeypatch)
chapter10/generative-agents/tests/test_provider_adapter.py:23
Function
test_adapter_retries_transient_connection_and_records_one_logical_call
( tmp_path, monkeypatch )
chapter10/generative-agents/tests/test_provider_adapter.py:92
Function
test_add_document_clears_all_metadata_when_updated_with_none
()
tests/test_ch3_document_store_stale_metadata.py:25
Function
test_add_document_clears_stale_metadata_keys
()
tests/test_ch3_document_store_stale_metadata.py:12
Function
test_add_document_update_preserves_other_documents_index
()
tests/test_ch3_document_store_stale_metadata.py:36
Function
test_add_nodes_and_basic_retrieval
Verify RAPTOR nodes and GraphRAG entities can be added and retrieved.
tests/test_ch3_hybrid_structured_retriever.py:29
Function
test_add_result_is_presented_as_added_memories_not_v2_decisions
()
chapter3/mem0/test_agent_v3.py:74
Function
test_adjacent_json_objects_returns_first
()
chapter5/video-edit/test_extract_json_adjacent.py:8
Function
test_advise_raises_clear_valueerror_not_typeerror
()
chapter3/structured-knowledge-extraction/test_advise_zero_archetypes.py:31
Method
test_agent_chain
Test Case 7: Chain multiple requests
chapter1/search-codegen/tests/manual/agent_cases.py:183
Method
test_agent_changes_tab
Test that page changes and page remains the same when a new tab is opened.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_session_tab_management.py:148
Function
test_agent_direct_openrouter_is_not_reported_as_fallback
( monkeypatch, caplog, explicit_key )
chapter1/context/tests/test_openrouter_notice.py:36
Function
test_agent_execution_error_sets_quality_score_zero
Regression test: set quality_score = 0.0 when agent execution raises error or returns None.
tests/test_ch9_hermes_downstream_ablation.py:216
Function
test_agent_execution_error_sets_quality_score_zero
Regression test: set quality_score = 0.0 when agent execution raises error or returns None.
tests/test_ch8_hermes_downstream_ablation.py:216
Method
test_agent_initialization
Test agent initialization
chapter4/multimodal-agent/test_multimodal.py:70
Function
test_agent_loop_handles_multiple_tool_calls
(make_choice, make_tool_call)
chapter1/web-search-agent/tests/test_agent.py:192
Function
test_agent_loop_marks_truncated_empty_answer
finish_reason=length with empty content must not masquerade as the misleading 'couldn't get enough info' response.
chapter1/web-search-agent/tests/test_agent.py:243
Function
test_agent_loop_marks_truncated_partial_answer
A partial answer cut off by max_tokens is returned WITH a truncation marker, never presented as a complete answer.
chapter1/web-search-agent/tests/test_agent.py:255
Function
test_agent_loop_records_tool_flow_and_final_answer
(make_choice, make_tool_call)
chapter1/web-search-agent/tests/test_agent.py:145
Function
test_agent_loop_returns_a_readable_error
()
chapter1/web-search-agent/tests/test_agent.py:233
Function
test_agent_loop_stops_at_iteration_limit
(make_choice, make_tool_call)
chapter1/web-search-agent/tests/test_agent.py:219
Function
test_agent_loop_survives_malformed_tool_arguments_json
Slightly invalid tool JSON must not abort the ReAct loop.
chapter1/web-search-agent/tests/test_agent.py:272
Function
test_agent_memory_integration
Test agent integration with memory system
chapter3/memobase/test_memory.py:180
Function
test_agent_missing_provider_key_reports_fallback
(monkeypatch, caplog)
chapter1/context/tests/test_openrouter_notice.py:49
Function
test_agent_with_own_provider_key_does_not_report_fallback
(monkeypatch, caplog)
chapter1/context/tests/test_openrouter_notice.py:61
Method
test_agent_with_tools
Test agent initialization with tools
chapter4/multimodal-agent/test_multimodal.py:83
Function
test_aggregation_and_interaction_report_conditional_reranker_value
()
chapter7/user-memory-system-evaluation/test_experiment.py:246
Function
test_aggregator_substitutes_an_unmapped_model_id
The namespacing path keeps substituting: a bare unmapped id cannot be requested from an aggregator at all, so a working default beats a certain
tests/test_providers.py:766
Function
test_aime_converter_rejects_non_complete_fixture
()
chapter5/code-for-math/test_campaign.py:5
Function
test_all_cached_trajectory
()
tests/test_ch6_cost_efficiency_analyzer.py:399
Function
test_all_cached_trajectory
()
tests/test_ch7_cost_efficiency_analyzer.py:399
Function
test_all_duplicate_data
()
tests/test_ch8_sft_data_auditor.py:297
Function
test_all_duplicate_data
()
tests/test_ch7_sft_data_auditor.py:297
Method
test_all_four_phases_are_reported
(self)
chapter9/self-evolution-eval/test_longitudinal.py:31
Function
test_all_memory_encodings_retain_scope_fields
()
chapter7/user-memory-policy-eval/test_runner.py:13
Function
test_all_not_found_has_no_cascade_and_returns_reason_and_status_aggregation
()
chapter10/parallel-web-research/test_coordination.py:55
Function
test_all_routes_include_native_models
三条路线中应包含两条原生路线(Nano Banana 2 和 GPT-Image 2)及一条工作流路线。
chapter1/image-gen-workflow/tests/test_requirements.py:17
Function
test_all_scope_kinds_have_holdout_coverage
()
chapter8/curly-quote-sft/tests/test_curly_pipeline.py:21
Function
test_all_sheets_honors_max_rows
(tmp_path: Path)
chapter4/collaboration-tools/src/test_excel_max_rows_all_sheets.py:23
Function
test_all_sheets_still_respects_smaller_max_rows
(tmp_path: Path)
chapter4/collaboration-tools/src/test_excel_max_rows_all_sheets.py:37
Function
test_all_ties_rates_models_instead_of_sample_weight_error
()
chapter7/elo-leaderboard/tests/test_bt_tie_pivot.py:7
Function
test_all_wasteful_trajectory
()
tests/test_ch6_cost_efficiency_analyzer.py:390
Function
test_all_wasteful_trajectory
()
tests/test_ch7_cost_efficiency_analyzer.py:390
Function
test_an_arm_that_saw_observations_is_not_judged_here
()
chapter1/context/test_grounding.py:94
Function
test_analysis_refuses_incomplete_or_unclassified_real_evidence
(tmp_path)
chapter7/openvla-robotwin2-eval/test_experiment.py:65
Function
test_analysis_reports_which_arms_stated_unsupported_numbers
()
chapter1/context/test_experiment_1_1.py:200
Function
test_analyze_after_empty_historical_leaderboards
()
chapter7/elo-leaderboard/tests/test_analyze_empty_history.py:29
Function
test_analyze_empty_history_returns_empty_frame
()
chapter7/elo-leaderboard/tests/test_analyze_empty_history.py:22
Method
test_analyze_image_tool
Test image analysis tool
chapter4/multimodal-agent/test_multimodal.py:195
Function
test_analyze_turn_standalone
()
tests/test_ch6_cost_efficiency_analyzer.py:413
Function
test_analyze_turn_standalone
()
tests/test_ch7_cost_efficiency_analyzer.py:413
Function
test_analyze_turn_standalone_none_threshold_never_expensive
()
tests/test_ch6_cost_efficiency_analyzer.py:422
Function
test_analyze_turn_standalone_none_threshold_never_expensive
()
tests/test_ch7_cost_efficiency_analyzer.py:422
Function
test_analyze_video_ai_releases_capture_when_vision_call_raises
( media_processing_tools, monkeypatch )
chapter4/perception-tools/test_analyze_video_release_on_error.py:79
Function
test_analyze_video_ai_zero_num_frames_is_clamped
(tmp_path, monkeypatch)
chapter4/perception-tools/test_video_keyframes_num_frames.py:55
Function
test_answer_checker_tolerates_rounding_only
()
chapter5/provider-failover/tests/test_offline.py:172
Function
test_answer_plan_preserves_retry_answers_in_field_order
()
chapter10/autonomous-phone-registration/test_webrtc_channel.py:51
Function
test_answer_without_tools_is_returned_and_think_tags_stripped
()
tests/test_ch2_ollama_native_nonstream_react_loop.py:106
Function
test_anthropic_502_error_handling
Test that ChatAnthropic properly handles 502 errors from the API
chapter9/browser-use-rpa/browser-use/tests/ci/test_llm_anthropic_502_error.py:12
Method
test_anthropic_ainvoke_normal
Test normal text response from Anthropic
chapter9/browser-use-rpa/browser-use/browser_use/llm/tests/test_chat_models.py:89
Method
test_anthropic_ainvoke_structured
Test structured output from Anthropic
chapter9/browser-use-rpa/browser-use/browser_use/llm/tests/test_chat_models.py:103
Function
test_anthropic_error_does_not_access_usage
Test that error handling doesn't try to access usage attribute on error responses
chapter9/browser-use-rpa/browser-use/tests/ci/test_llm_anthropic_502_error.py:49
Function
test_api_failure_is_retained_and_cannot_look_like_model_behavior
(monkeypatch)
chapter1/learning-from-experience/test_experiment_8_2_evidence.py:47
Method
test_api_keys_lazy_loading
Test API keys are loaded lazily.
chapter9/browser-use-rpa/browser-use/tests/ci/test_config.py:52
Function
test_api_route_explicit_key_and_base_url_override
(monkeypatch)
tests/test_providers.py:204
Function
test_api_route_missing_key_names_its_credential
()
tests/test_providers.py:212
Method
test_append_csv_file
Test appending content to CSV files.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:457
Method
test_append_file
Test appending content to files.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:417
Method
test_append_json_file
Test appending content to JSON files.
chapter9/browser-use-rpa/browser-use/tests/ci/test_filesystem.py:440
Method
test_append_only_agent_cannot_replace_changed_rule
(self)
chapter9/self-evolution-eval/test_longitudinal.py:20
Function
test_apply_edit_bare_filename
()
chapter5/video-edit/test_bare_output_filename.py:23
Function
test_apply_edit_ffmpeg_factor_speedup_and_bare_filename
()
chapter5/video-edit/test_slowmo_null_factor.py:39
Function
test_apply_edits_normal
()
chapter9/prompt-auto-optimization/tests/test_edits_list_null.py:13
Method
test_apply_formula
Test applying formula to cell.
chapter4/collaboration-tools/test_excel_tools.py:113
Function
test_apply_one_normal
()
chapter9/prompt-auto-optimization/tests/test_apply_one_null.py:18
Function
test_apply_one_null_new_str
()
chapter9/prompt-auto-optimization/tests/test_apply_one_null.py:11
Function
test_apply_one_null_old_str
()
chapter9/prompt-auto-optimization/tests/test_apply_one_null.py:4
Function
test_apply_one_still_rejects_null_strings
()
chapter9/prompt-auto-optimization/tests/test_edits_list_null.py:25
Method
test_arabic_letters_keep_the_existing_width_estimate
(self)
book-ar/test_svg_lib.py:17
Method
test_aria_menu_dropdown
Test get_dropdown_options with ARIA role='menu' element.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_event_GetDropdownOptionsEvent.py:336
Function
test_arithmetic_on_remembered_values_is_caught_even_after_tool_calls
()
chapter1/context/test_grounding.py:118
Function
test_ark_translation_disables_reasoning_only_responses
()
chapter10/book-translation/test_official_experiment.py:140
Function
test_arm_and_judge_checkpoints_round_trip
(tmp_path)
chapter10/book-translation/test_official_experiment.py:83
Function
test_arm_outcome_separates_claiming_nothing_from_inventing
()
chapter1/context/test_experiment_1_1.py:142
Function
test_asean_acceptance_rejects_model_substitution
()
chapter1/search-codegen/test_responses_agent.py:127
Function
test_asean_acceptance_requires_both_completed_hosted_tools
()
chapter1/search-codegen/test_responses_agent.py:107
Function
test_ask_clarifying_normal_question_still_answers
()
chapter10/staged-system-prompt/tests/test_null_question.py:26
Function
test_ask_clarifying_null_question_does_not_crash
()
chapter10/staged-system-prompt/tests/test_null_question.py:19
Function
test_ask_one_fill_one_runs_concurrently_and_reasks_invalid_format
()
chapter10/autonomous-phone-registration/test_orchestration.py:57
Function
test_ask_retries_truncated_json_and_accounts_for_both_real_calls
()
chapter5/agent-creator/test_creator.py:174
← previous
next →
10,101–10,200 of 13,003, ranked by callers