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
code_block
Render a block of monospace code lines with background.
book-ar/svg_lib.py:393
Method
code_block
Render a block of monospace code lines with background.
book-ru/svg_lib.py:367
Method
code_block
Render a block of monospace code lines with background.
book-es/svg_lib.py:367
Method
code_block
Тогтмол өргөнтэй кодын мөрүүдийг дэвсгэртэй блок болгон дүрсэлнэ.
book-mn/svg_lib.py:367
Method
code_block
Render a block of monospace code lines with background.
book-id/svg_lib.py:367
Method
code_interpreter
Execute Python code directly without restrictions
chapter2/attention_visualization/tools.py:389
Method
code_interpreter
Execute Python code in a full Python environment. This provides unrestricted access to Python's built-in functions and standard libra
chapter2/local_llm_serving/tools.py:411
Method
code_mode
Enter code interpreter mode
chapter1/search-codegen/main.py:125
Function
collate
(batch: list[dict[str, list[int]]])
chapter8/cot-distillation/train_student.py:238
Function
collate
(items: list[EncodedRow])
chapter8/prompt-distillation/run_experiment_8_8.py:417
Method
collect_all_frame_ids
Recursively collect all frame IDs from the frame tree.
chapter9/browser-use-rpa/browser-use/browser_use/dom/service.py:260
Method
collect_event
(self, event: BaseEvent)
chapter9/browser-use-rpa/browser-use/tests/ci/conftest.py:227
Method
collect_paint_order
(node: SimplifiedNode)
chapter9/browser-use-rpa/browser-use/browser_use/dom/serializer/paint_order.py:142
Method
collect_text
(node: EnhancedDOMTreeNode, current_depth: int)
chapter9/browser-use-rpa/browser-use/browser_use/dom/views.py:483
Method
combined_calls
()
chapter5/agent-creator/creator.py:882
Function
comma_ints
(raw: str)
chapter7/model-benchmark/campaign.py:1014
Method
compare_confirmed_cases
( self, org_unit_id: str, start_period: str, end_period: str )
chapter7/public-health-reporting-eval/reporting_tools.py:79
Method
compare_modes
Compare contextual vs non-contextual modes for the same query. Educational method to demonstrate the difference in retrieval
chapter3/contextual-retrieval/contextual_agent.py:299
Method
compare_retrieval_methods
Compare contextual vs non-contextual retrieval on the SAME query. Educational Note: This is the ``compare_retrieval_methods`
chapter3/contextual-retrieval/contextual_chunking.py:444
Method
compare_retrieval_methods
Compare contextual vs non-contextual retrieval. Educational Note: This method demonstrates the improvement that cont
chapter3/contextual-retrieval/contextual_tools.py:443
Function
comparison_lr
Side-by-side comparison diagram.
book-en/svg_lib.py:622
Function
comparison_lr
Side-by-side comparison diagram.
book-tr/svg_lib.py:622
Function
comparison_lr
Side-by-side comparison diagram.
book-ar/svg_lib.py:648
Function
comparison_lr
Side-by-side comparison diagram.
book-ru/svg_lib.py:622
Function
comparison_lr
Side-by-side comparison diagram.
book-es/svg_lib.py:622
Function
comparison_lr
Зэрэгцүүлсэн харьцуулалтын диаграм.
book-mn/svg_lib.py:623
Function
comparison_lr
Side-by-side comparison diagram.
book-id/svg_lib.py:622
Function
compatible_get_queue
(env: Any)
chapter7/android-world/run_controlled_experiment.py:421
Function
complete
(state: TaskState)
chapter6/async-agent/run_real_experiment.py:93
Function
complete
(request)
chapter1/web-search-agent/tests/test_parallel_search.py:91
Function
complete
(**kwargs)
chapter3/user-memory/test_session_scoped_history.py:55
Method
complete
(self, messages, tools=None, tool_choice=None)
chapter7/user-memory-system-evaluation/test_experiment.py:46
Method
complete
(self, messages, tools=None, tool_choice=None)
chapter7/user-memory-system-evaluation/test_experiment.py:67
Method
complete
(self, messages, tools=None, tool_choice=None, json_object=False)
chapter7/user-memory-system-evaluation/test_experiment.py:166
Method
complete
(self, messages, tools=None, tool_choice=None, json_object=False)
chapter7/user-memory-system-evaluation/test_experiment.py:209
Method
complete
(self, **kwargs)
tests/test_ch8_llm_judge_non_dict_payload.py:18
Method
complete
(self, **kwargs)
tests/test_ch9_llm_judge_non_dict_payload.py:18
Method
complete
(self, **kwargs)
tests/test_ch9_factual_grounding.py:116
Method
complete
(self, **kwargs)
chapter9/trajectory-verifier/test_llm_judge_null_fields.py:17
Method
complete
(self, **kwargs)
chapter9/trajectory-verifier/test_claim_action_order.py:24
Function
completion_create
(**kwargs: Any)
chapter10/generative-agents/provider_adapter.py:197
Function
completion_or_error
()
chapter6/phone-agent/run_acceptance.py:149
Method
complex_action
( query: str, max_results: int, include_images: bool = True, browser_session: BrowserSession = Non
chapter9/browser-use-rpa/browser-use/tests/ci/test_registry.py:771
Method
compose
Create the UI layout.
chapter9/browser-use-rpa/browser-use/browser_use/cli.py:999
Function
comprehensive_download_test_server
Create a test server with downloadable files.
chapter9/browser-use-rpa/browser-use/tests/ci/test_browser_watchdog_downloads.py:106
Method
compute_similarity
Compute similarity between two vectors. Args: vec1: First vector vec2: Second vector met
chapter3/dense-embedding/embedding_service.py:184
Function
configure_provider
(provider: str)
chapter5/paper-to-ppt/agents.py:33
Method
connectedCallback
()
extras/agent-lab/agent-trajectory.js:272
Function
constraint
(*values)
chapter5/code-for-logic/csp_solver.py:75
Method
constructor
()
chapter6/live-audio/frontend/public/audioWorklet.js:2
Method
constructor
()
chapter6/live-audio/frontend/public/audioWorklet.js:48
Method
constructor
(ws)
chapter6/live-audio/backend/server.js:27
Method
constructor
()
chapter6/live-audio/backend/utils/speechToText.js:7
Method
constructor
(options = {})
chapter6/live-audio/backend/utils/vad.js:7
Method
constructor
(config, apiKey)
chapter6/live-audio/backend/utils/providers/asrProviders.js:10
Method
constructor
(config, apiKey)
chapter6/live-audio/backend/utils/providers/llmProviders.js:17
Method
constructor
(config, apiKey)
chapter6/live-audio/backend/tests/test-tts-providers.js:33
Method
constructor
()
extras/agent-lab/agent-trajectory.js:264
Method
convert_currency
Convert currency using live exchange rates (simulated)
chapter2/attention_visualization/tools.py:348
Method
convert_currency
Convert currency using live exchange rates (simulated)
chapter2/local_llm_serving/tools.py:331
Method
convert_ids_to_tokens
(self, token_id)
chapter2/attention_visualization/test_token_labels.py:24
Method
cookies
Get cookies, optionally filtered by URLs.
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:947
Function
coordinateScaling
(k)
web-astro/scripts/computer-use-layout.mjs:208
Method
copy_old_config_names_to_new
Copy old config window_width & window_height to window_size.
chapter9/browser-use-rpa/browser-use/browser_use/browser/profile.py:669
Function
corrupt_database
(_env: object)
chapter7/android-world/test_experiment.py:65
Function
cost_usd
按 token 用量换算成本(美元)。默认用模块级单价,可传入自定义 Pricing。
chapter7/agent-cost-analysis/config.py:125
Function
count_messages_tokens
统计一组 chat messages 的 token 数(近似:内容 + 每条消息固定开销)。
chapter10/book-translation/agents.py:145
Method
coverage_by_cwe
Per-CWE breakdown: {cwe_id: {targeted, violations, catches, catch_rate}}.
chapter5/permission-embedded-data-objects/pedo/eval/dataguardbench/metrics.py:127
Method
create
(self, **_kwargs)
chapter5/agent-creator/test_creator.py:37
Method
create
(self, obj, accessor, _reaction_depth=0)
tests/test_ch5_pedo_live_security_eval.py:655
Method
create
(self, **_kwargs)
chapter6/phone-agent/test_agent.py:137
Method
create
(cls, **kwargs)
chapter10/generative-agents/tests/test_provider_adapter.py:28
Method
create
(cls, **kwargs)
chapter10/generative-agents/tests/test_provider_adapter.py:39
Method
create
(self, **kwargs)
chapter3/user-memory/test_stream_empty_choices.py:14
Method
createChatCompletion
(messages, options = {})
chapter6/live-audio/backend/utils/providers/llmProviders.js:22
Method
createChatCompletion
(messages, options = {})
chapter6/live-audio/backend/utils/providers/llmProviders.js:58
Method
createChatCompletion
(messages, options = {})
chapter6/live-audio/backend/utils/providers/llmProviders.js:110
Method
createProvider
(providerName, config, globalConfig)
chapter6/live-audio/backend/utils/providers/llmProviders.js:215
Function
create_audit_log
Create an audit log entry after any candidate status change.
chapter5/permission-embedded-data-objects/pedo/scenarios/hiring.py:109
Function
create_call
(request: CreateCall)
chapter6/phone-agent/webrtc_app.py:341
Method
create_complex_financial_task
Create a complex task that requires multiple tool calls and reasoning Returns: Task description
chapter1/context/main.py:94
Function
create_db
在给定 sqlite 连接上建表并灌入数据。
chapter5/erp-agent/seed.py:145
Method
create_directories
Create necessary directories if they don't exist
chapter1/context/config.py:182
Method
create_dom_tree_request
()
chapter9/browser-use-rpa/browser-use/browser_use/dom/service.py:355
Method
create_embeddings
Create embeddings for texts using sentence transformers.
chapter3/structured-index/raptor_indexer.py:76
Function
create_input_ids
(example)
chapter8/orpheus/orpheus_sft_unsloth.py:206
Function
create_interactive_leaderboard
Create interactive Plotly visualization of ranking evolution. Args: history_df: DataFrame with columns: date, model, rating, ran
chapter7/elo-leaderboard/visualization.py:180
Function
create_issues
为每条问题创建 Issue。 mock=True(默认):打印 + 落盘到 out_path,不联网。 mock=False:通过 GitHub MCP Server 在 repo(owner/repo)真实创建 Issue,需 token。
chapter5/log-diagnosis/github_mcp.py:59
Function
create_rank_evolution_chart
Create interactive rank evolution chart (lower rank number is better). Args: history_df: DataFrame with columns: date, model, ra
chapter7/elo-leaderboard/visualization.py:233
Method
create_snapshot
Create a state snapshot and return snapshot index.
chapter9/harness-safety-gate/safety_policy_gate.py:125
Method
create_snapshot_request
()
chapter9/browser-use-rpa/browser-use/browser_use/dom/service.py:343
Function
create_structured_mode
(**kwargs)
chapter2/local_llm_serving/test_parallel_tools.py:196
Function
creator
()
scripts/book_figures/chapter5.py:141
Function
cross_object_validator
(proposed, existing, accessor, st)
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_overhead.py:208
Function
crypto_price
Get cryptocurrency price.
chapter4/perception-tools/src/main.py:275
Function
csv_parse
Parse CSV data.
chapter4/perception-tools/src/main.py:483
Function
currency_converter
Convert currency.
chapter4/perception-tools/src/main.py:265
Method
current_session_id
(self)
chapter9/browser-use-rpa/browser-use/browser_use/browser/session.py:1039
Method
current_skill
(self)
chapter10/multi-role-transfer/skill_orchestrator.py:162
Method
current_state
For backward compatibility - returns an AgentBrain with the flattened properties
chapter9/browser-use-rpa/browser-use/browser_use/agent/views.py:169
← previous
next →
8,601–8,700 of 13,003, ranked by callers