MCPcopy Create free account

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

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

↓ 1 callersFunctionformat_time
Convert ISO timestamp to readable format
chapter2/system-hint/view_trajectory.py:12
↓ 1 callersFunctionformats
()
scripts/book_figures/chapter3.py:31
↓ 1 callersFunctionfragment_spans
(fragments: list[str])
chapter2/attention_visualization/run_status_bar_experiment.py:187
↓ 1 callersFunctionframeRaster
(bytes, mime, width, height, theme)
web-astro/scripts/figure-style.mjs:106
↓ 1 callersFunctionfree_port
()
chapter5/conversational-ui/campaign_browser.py:61
↓ 1 callersFunctionfree_port
()
chapter6/phone-agent/run_acceptance.py:58
↓ 1 callersMethodfrom_agent
Create an UpdateAgentTaskEvent from an Agent instance
chapter9/browser-use-rpa/browser-use/browser_use/agent/cloud_events.py:35
↓ 1 callersMethodfrom_agent_and_file
Create a CreateAgentOutputFileEvent from a file path
chapter9/browser-use-rpa/browser-use/browser_use/agent/cloud_events.py:87
↓ 1 callersMethodfrom_agent_step
Create a CreateAgentStepEvent from agent step data
chapter9/browser-use-rpa/browser-use/browser_use/agent/cloud_events.py:145
↓ 1 callersMethodfrom_dict
从检查点字典还原事件对象。
chapter6/async-agent/events.py:83
↓ 1 callersMethodfrom_dict
(cls, value: Dict[str, Any])
chapter10/autonomous-phone-registration/models.py:27
↓ 1 callersMethodfrom_dict
(cls, data: Dict[str, Any])
chapter4/collaboration-tools/src/notification_dispatcher.py:35
↓ 1 callersMethodfrom_dict
Create from dictionary
chapter3/user-memory/memory_manager.py:42
↓ 1 callersMethodfrom_dict
Create from dictionary
chapter3/user-memory/conversation_history.py:31
↓ 1 callersMethodfrom_dict
Create from dictionary
chapter3/contextual-retrieval-for-user-memory/advanced_memory_manager.py:54
↓ 1 callersMethodfrom_env
Create configuration from environment variables
chapter2/system-hint/config.py:41
↓ 1 callersMethodfrom_general_model
( cls, model: GeneralModel, sampling_strategy: SamplingStrategy | None = None,
chapter2/prompt-engineering/tau_bench/model_utils/api/api.py:84
↓ 1 callersMethodfrom_trace
(cls, d: dict[str, Any])
chapter2/prompt-engineering/tau_bench/model_utils/api/datapoint.py:113
↓ 1 callersMethodfrom_yaml
Create test case from YAML data
chapter3/contextual-retrieval-for-user-memory/contextual_evaluator.py:75
↓ 1 callersFunctionfunction_tool
(name: str, description: str, properties: dict, required: list[str])
chapter2/system-hint/run_experiment_2_8.py:164
↓ 1 callersFunctiongate
(status: bool, **details: Any)
chapter10/parallel-web-research/run_official_experiment.py:190
↓ 1 callersFunctiongen_assault
(i: int)
chapter3/structured-knowledge-extraction/generate_data.py:76
↓ 1 callersFunctiongen_code
Generate code with direct API call.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_harness_focused.py:62
↓ 1 callersFunctiongen_code_gemini
(model_id: str, prompt: str, sys_prompt: str, temperature: float, retries: int = 2)
chapter5/permission-embedded-data-objects/pedo/eval/regeneration_robustness.py:104
↓ 1 callersFunctiongen_fraud
(i: int)
chapter3/structured-knowledge-extraction/generate_data.py:114
↓ 1 callersMethodgen_test_cases
(self, problems: List[Dict[str, Any]])
chapter5/log-diagnosis/diagnoser.py:120
↓ 1 callersFunctiongen_theft
(i: int)
chapter3/structured-knowledge-extraction/generate_data.py:37
↓ 1 callersFunctiongen_with_retry
Generate code with retries on API failures.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety_final.py:42
↓ 1 callersFunctiongeneralpoints
()
scripts/book_figures/chapter8.py:176
↓ 1 callersFunctiongenerate
(prompt, out)
book-en/gen_cover.py:75
↓ 1 callersFunctiongenerate
(prompt, out)
book-tr/gen_cover.py:75
↓ 1 callersFunctiongenerate
(prompt, out)
book/gen_cover.py:75
↓ 1 callersFunctiongenerate
(prompt, out)
book-zhtw/gen_cover.py:75
↓ 1 callersFunctiongenerate
随机生成 count 道「解唯一」的谜题(用 python-constraint 过滤)。
chapter5/code-for-logic/build_puzzles.py:141
↓ 1 callersFunctiongenerate
(prompt, out)
book-es/gen_cover.py:67
↓ 1 callersFunctiongenerate
(prompt, out)
book-mn/gen_cover.py:76
↓ 1 callersFunctiongenerate
(prompt, out)
book-id/gen_cover.py:75
↓ 1 callersFunctiongenerate
(prompt, out)
book-ta/gen_cover.py:75
↓ 1 callersMethodgenerate
( self, instruction: str, text: str, examples: list[GenerateDatapoint] | None
chapter2/prompt-engineering/tau_bench/model_utils/api/api.py:314
↓ 1 callersMethodgenerateAIResponse
()
chapter6/live-audio/backend/server.js:352
↓ 1 callersMethodgenerateMessageId
()
chapter6/live-audio/backend/server.js:217
↓ 1 callersFunctiongenerate_arm
(model, tokenizer, snac, arm: str, out: Path, max_tokens: int)
chapter8/speech-sft-experiment/run_orpheus.py:146
↓ 1 callersFunctiongenerate_arm
(model, processor, arm: str, out: Path, max_tokens: int)
chapter8/speech-sft-experiment/run_sesame.py:143
↓ 1 callersFunctiongenerate_code
(client, prompt, label)
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_spec_errors_v2.py:242
↓ 1 callersFunctiongenerate_code
Generate code for a condition.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety_v2.py:189
↓ 1 callersFunctiongenerate_code_for_condition
Generate code for a specific prompt and architectural condition.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_safety.py:188
↓ 1 callersMethodgenerate_conversation_prompts
Generate conversation prompts for a scenario session.
chapter3/mem0/experiment.py:82
↓ 1 callersFunctiongenerate_conversation_round
Generate a single conversation round based on scenario
chapter3/user-memory-evaluation/generate_test_cases.py:205
↓ 1 callersFunctiongenerate_form
调用模型生成澄清表单的 HTML。
chapter5/dynamic-form/demo.py:135
↓ 1 callersMethodgenerate_from_prompt
(self, prompt: str, temperature: float | None = None)
chapter2/prompt-engineering/tau_bench/model_utils/model/completion.py:245
↓ 1 callersFunctiongenerate_html_animation
Generate standalone HTML file with D3.js bar chart race animation. Args: animation_data: Dictionary from prepare_animation_data
chapter7/elo-leaderboard/animation.py:70
↓ 1 callersFunctiongenerate_image_gemini
把口语化需求原样发给 Gemini 3 Pro Image(Nano Banana 2),一次调用直接出图。 返回 (图片字节, mime, call record, 模型附带文本)。
chapter1/image-gen-workflow/pipeline.py:235
↓ 1 callersFunctiongenerate_image_gpt_image
把口语化需求原样发给 OpenAI 图像接口。返回 (图片字节, mime, call record)。
chapter1/image-gen-workflow/pipeline.py:299
↓ 1 callersFunctiongenerate_image_wanx
提交万相文生图异步任务并轮询取图。返回 (图片字节, mime, call records)。
chapter1/image-gen-workflow/pipeline.py:150
↓ 1 callersFunctiongenerate_local
(model_name: str, questions: list[str], max_new_tokens: int)
chapter8/cot-distillation/evaluate_student.py:114
↓ 1 callersFunctiongenerate_narration
调用文本模型(默认 gpt-5.6-luna),为当前页生成口语化、引导性的讲解文字。
chapter5/paper-to-video/demo.py:259
↓ 1 callersMethodgenerate_next_step
( self, messages: List[Dict[str, Any]] )
chapter2/prompt-engineering/tau_bench/agents/chat_react_agent.py:37
↓ 1 callersFunctiongenerate_one
(model, tokenizer, rendered: str, protocol, seed: int)
chapter2/attention_visualization/run_status_bar_experiment.py:237
↓ 1 callersFunctiongenerate_openai
OpenAI Images API. Uses gpt-image-1 if available, else dall-e-3.
book-en/gen_cover.py:40
↓ 1 callersFunctiongenerate_openai
OpenAI Images API. Uses gpt-image-1 if available, else dall-e-3.
book-tr/gen_cover.py:40
↓ 1 callersFunctiongenerate_openai
OpenAI Images API. Uses gpt-image-1 if available, else dall-e-3.
book/gen_cover.py:40
↓ 1 callersFunctiongenerate_openai
OpenAI Images API. Uses gpt-image-1 if available, else dall-e-3.
book-zhtw/gen_cover.py:40
↓ 1 callersFunctiongenerate_openai
OpenAI Images API. Uses gpt-image-1 if available, else dall-e-3.
book-es/gen_cover.py:31
↓ 1 callersFunctiongenerate_openai
OpenAI Images API. Боломжтой бол gpt-image-1, үгүй бол dall-e-3 ашиглана.
book-mn/gen_cover.py:41
↓ 1 callersFunctiongenerate_openai
OpenAI Images API. Uses gpt-image-1 if available, else dall-e-3.
book-id/gen_cover.py:40
↓ 1 callersFunctiongenerate_openai
OpenAI Images API. Uses gpt-image-1 if available, else dall-e-3.
book-ta/gen_cover.py:40
↓ 1 callersFunctiongenerate_outputs
真实模型路径:加载 base(可选叠加 LoRA adapter),对每条评估样例生成下一步动作。
chapter8/premature-completion-dpo/evaluate.py:158
↓ 1 callersMethodgenerate_parser_code
调用 LLM 生成解析器代码,返回纯 Python 源码字符串。
chapter5/adaptive-log-parser/agent.py:114
↓ 1 callersMethodgenerate_report
Generate a comprehensive report of the ablation study Args: results: List of test results analysis:
chapter1/context/main.py:470
↓ 1 callersMethodgenerate_report
Generate a summary report of evaluation results.
chapter3/user-memory-evaluation/evaluator.py:373
↓ 1 callersMethodgenerate_report
Generate a plain-text comparison report (for saving to --output).
chapter3/user-memory-evaluation/comparison.py:155
↓ 1 callersMethodgenerate_report
Generate and save evaluation report.
chapter3/user-memory-evaluation/main.py:183
↓ 1 callersMethodgenerate_report
Generate a detailed report with visualizations.
chapter3/mem0/experiment.py:356
↓ 1 callersMethodgenerate_report
Generate evaluation report Args: output_file: Optional file path to save report Returns:
chapter3/contextual-retrieval-for-user-memory/evaluator.py:521
↓ 1 callersMethodgenerate_report
Generate evaluation report
chapter3/contextual-retrieval-for-user-memory/contextual_evaluator.py:655
↓ 1 callersFunctiongenerate_report_location
()
chapter2/prompt-engineering/tau_bench/model_utils/api/exception.py:28
↓ 1 callersFunctiongenerate_response
Generate a single model answer for a prompt.
chapter7/elo-leaderboard/llm_judge.py:187
↓ 1 callersFunctiongenerate_response
生成多语言推理响应 Args: model: 训练好的模型 tokenizer: 分词器 reasoning_language: 推理使用的语言 user_prompt: 用户提问 max_n
chapter8/MultilingualReasoning/gpt_oss_20b_sft.py:363
↓ 1 callersMethodgenerate_scenario
Generate a LOCOMO benchmark scenario.
chapter3/mem0/experiment.py:38
↓ 1 callersFunctiongenerate_single_ad
Generate a single ad using pre-analyzed page data
chapter9/browser-use-rpa/browser-use/examples/apps/ad-use/ad_generator.py:331
↓ 1 callersFunctiongenerate_speech
Generate speech from text. Args: model: The loaded model processor: The processor text: Text to convert to speec
chapter8/sesame/inference.py:66
↓ 1 callersFunctiongenerate_speech_batch
Generate speech for multiple texts.
chapter8/sesame/batch_inference.py:81
↓ 1 callersFunctiongenerate_sql
( client: OpenAI, model: str, question: dict[str, Any], *, execution_feedback: str | None
chapter5/erp-agent/campaign_postgres.py:184
↓ 1 callersMethodgenerate_summary
Generate and log a summary of all results
chapter2/context-compression/run_all_strategies.py:288
↓ 1 callersFunctiongenerate_summary_report
Generate a comprehensive summary report
chapter2/prompt-engineering/analyze_results.py:252
↓ 1 callersFunctiongenerate_synthetic_perturbations
Generate synthetic edge-case perturbations (null args, whitespace, missing fields) for safety verifier testing.
chapter9/harness-safety-gate/evolution.py:545
↓ 1 callersFunctiongenerate_test_case
Generate a complete test case structure
chapter3/user-memory-evaluation/generate_test_cases.py:240
↓ 1 callersFunctiongenerate_text
Generate text without streaming
chapter8/continued-pretraining/compare_models.py:54
↓ 1 callersMethodgenerate_with_attention_streaming
Generate text with streaming output while tracking attention, returning GenerationResult format Args: prompt: In
chapter2/attention_visualization/main.py:228
↓ 1 callersFunctiongenerate_with_timeout
Generate code with a timeout.
chapter5/permission-embedded-data-objects/pedo/eval/benchmark_spec_errors.py:114
↓ 1 callersFunctionget
(id: string)
web-astro/src/scripts/figure-viewer.ts:2
↓ 1 callersMethodgetHeaders
()
chapter6/live-audio/backend/utils/providers/llmProviders.js:101
↓ 1 callersFunctiongetMessages
(locale: Locale)
web-astro/src/lib/i18n.ts:19
↓ 1 callersMethodgetProviderInfo
* Get current provider information * @returns {Object} Current provider information
chapter6/live-audio/backend/utils/speechToText.js:133
↓ 1 callersFunctionget_ablation_cases
Build a list of self-contained cases for the ablation study. Reuses the pre-defined sample tasks, skipping the PDF task (which needs net
chapter1/context/main.py:781
↓ 1 callersMethodget_all
(self, **kwargs)
chapter3/mem0/test_agent_v3.py:14
↓ 1 callersMethodget_all_legal_documents
Get all legal documents from local laws directory
chapter3/contextual-retrieval/index_local_laws_contextual.py:112
↓ 1 callersMethodget_all_legal_documents
Get all legal documents from local laws directory
chapter3/agentic-rag/index_local_laws.py:98
↓ 1 callersMethodget_allowed_extensions
Get allowed extensions
chapter9/browser-use-rpa/browser-use/browser_use/filesystem/file_system.py:197
↓ 1 callersFunctionget_api_config
Get API configuration from environment.
chapter3/structured-index/config.py:172
← previousnext →5,001–5,100 of 13,003, ranked by callers