MCPcopy Create free account

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

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

Method__init__
(self, payload)
tests/test_ch9_llm_judge_non_dict_payload.py:15
Method__init__
(self, responses)
tests/test_ch2_ollama_native_nonstream_react_loop.py:39
Method__init__
(self)
tests/test_ch2_ollama_native_nonstream_react_loop.py:49
Method__init__
(self, db)
tests/test_ch5_pedo_atomic_delete.py:57
Method__init__
(self, store)
tests/test_ch5_pedo_atomic_delete.py:161
Method__init__
Initialize the DuplexInterruptionManager. Args: vad_threshold: RMS energy threshold above which audio frame is treated as voice a
chapter6/streaming-speech/interruption_manager.py:59
Method__init__
( self, model_id: str = "Qwen/Qwen2-Audio-7B-Instruct", device: str = "auto",
chapter6/streaming-speech/qwen2_streaming.py:82
Method__init__
(self, model: str = "small")
chapter6/streaming-speech/whisper_baseline.py:87
Method__init__
( self, model_id: str = MODEL_ID, revision: str = MODEL_REVISION, *, d
chapter6/end-to-end-speech/speech_model.py:56
Method__init__
(self, content)
chapter6/phone-agent/test_agent.py:14
Method__init__
(self, values)
chapter6/phone-agent/test_agent.py:42
Method__init__
(self, values)
chapter6/phone-agent/test_agent.py:52
Method__init__
(self)
chapter6/phone-agent/speech.py:70
Method__init__
(self)
chapter6/phone-agent/speech.py:155
Method__init__
(self, record: dict[str, Any])
chapter6/phone-agent/webrtc_app.py:109
Method__init__
(self)
chapter6/rgb-sim2real-grasping/pipeline.py:98
Method__init__
(self)
chapter6/async-agent/run_real_experiment.py:65
Method__init__
(self, client, model: str, start_time: Optional[float] = None, completion_params: Optional[di
chapter6/async-agent/runtime.py:117
Method__init__
(self, on_complete: Callable[[TaskState], Awaitable[None]], log: Callable[[str, str], None])
chapter6/async-agent/tasks.py:99
Method__init__
(self)
chapter6/async-agent/async_demos.py:29
Method__init__
(self, seed: int, failure_probability: float = 0.25)
chapter6/gemini-xlerobot-navigation/desktop_planner.py:51
Method__init__
(self)
chapter6/gemini-xlerobot-navigation/desktop_planner.py:130
Method__init__
Initialize the client Args: server_url: URL of the event server
chapter6/agent-with-event-trigger/client.py:16
Method__init__
(self)
chapter6/agent-with-event-trigger/agent.py:139
Method__init__
Initialize the event-triggered agent Args: api_key: API key for the LLM provider provider: LLM provi
chapter6/agent-with-event-trigger/agent.py:262
Method__init__
(self, name: str, event_queue: "queue.Queue[Event]")
chapter6/agent-with-event-trigger/event_loop_demo.py:57
Method__init__
(self, event_queue, delay: float, content: str, timer_id: str = "oneshot")
chapter6/agent-with-event-trigger/event_loop_demo.py:78
Method__init__
(self, event_queue, interval: float, content: str, timer_id: str = "recurring")
chapter6/agent-with-event-trigger/event_loop_demo.py:103
Method__init__
(self, event_queue, watch_dir: str, poll_interval: float = 1.0)
chapter6/agent-with-event-trigger/event_loop_demo.py:129
Method__init__
(self, method: str, path: str, status: int, payload: Any)
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:99
Method__init__
(self, client: UnipileClient, campaign_dir: Path, account_id: str, calendar_account_id: str)
chapter6/agent-with-event-trigger/unipile_mailbox_experiment.py:346
Method__init__
(self, path)
chapter6/astra-async-steering/experiment.py:83
Method__init__
(self, path)
chapter6/astra-async-steering/validation/runs/pilot-20260905-v1/source/experiment.py:83
Method__init__
(self, path)
chapter6/astra-async-steering/validation/runs/exp6-14-20260905-formal/source/experiment.py:83
Method__init__
(self, path)
chapter6/astra-async-steering/validation/runs/pilot-20260905-v2/source/experiment.py:83
Method__init__
(self, content)
chapter2/prompt-engineering/test_user_empty_response.py:9
Method__init__
(self, value)
chapter2/prompt-engineering/test_hash_item_dict_collision.py:13
Method__init__
Initialize the ablation agent Args: tools_info: Information about available tools wiki: Wiki/system
chapter2/prompt-engineering/ablation_agent.py:31
Method__init__
( self, model: str | None = None, api_key: str | None = None, temperature: flo
chapter2/prompt-engineering/tau_bench/model_utils/model/claude.py:36
Method__init__
( self, model: str, base_url: str, endpoint: str = "generate", tempera
chapter2/prompt-engineering/tau_bench/model_utils/model/vllm_completion.py:59
Method__init__
( self, model: str | None = None, api_key: str | None = None, temperature: float = 0.0 )
chapter2/prompt-engineering/tau_bench/model_utils/model/mistral.py:33
Method__init__
( self, model: str | None = None, api_key: str | None = None, temperature: flo
chapter2/prompt-engineering/tau_bench/model_utils/model/openai.py:65
Method__init__
( self, short_message: str, prompt: str | list[dict[str, str]] | None = None,
chapter2/prompt-engineering/tau_bench/model_utils/model/exception.py:8
Method__init__
( self, model: str, api_key: str | None = None, temperature: float = 0.0,
chapter2/prompt-engineering/tau_bench/model_utils/model/anyscale.py:34
Method__init__
( self, model: str, base_url: str, api_key: str, temperature: float =
chapter2/prompt-engineering/tau_bench/model_utils/model/vllm_chat.py:51
Method__init__
( self, parse_models: list[ParseModel], generate_models: list[GenerateModel],
chapter2/prompt-engineering/tau_bench/model_utils/api/api.py:45
Method__init__
(self, func: Callable[..., Any])
chapter2/prompt-engineering/tau_bench/model_utils/api/cache.py:16
Method__init__
(self, n: int = 2)
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:47
Method__init__
(self, max_retries: int = 5)
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:63
Method__init__
( self, n: int = 5, max_concurrency: int | None = None, panic_on_first_model_e
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:82
Method__init__
( self, max_concurrency: int | None = None, panic_on_first_model_error: bool = False )
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:144
Method__init__
( self, n: int = 5, max_concurrency: int | None = None, panic_on_first_model_e
chapter2/prompt-engineering/tau_bench/model_utils/api/sample.py:174
Method__init__
(self, short_message: str, report: dict[str, Any] | None = None)
chapter2/prompt-engineering/tau_bench/model_utils/api/exception.py:35
Method__init__
(self, model: Model | None = None)
chapter2/prompt-engineering/tau_bench/model_utils/api/router.py:30
Method__init__
(self, capability_score_model: CapabilityScoreModel)
chapter2/prompt-engineering/tau_bench/model_utils/api/router.py:52
Method__init__
(self, model: str, provider: str, seed: Optional[int] = None)
chapter2/prompt-engineering/tau_bench/envs/user.py:178
Method__init__
(self, model: str, provider: str, max_attempts: int = 3, seed: Optional[int] = None)
chapter2/prompt-engineering/tau_bench/envs/user.py:242
Method__init__
(self, model: str, provider: str, max_attempts: int = 2, seed: Optional[int] = None)
chapter2/prompt-engineering/tau_bench/envs/user.py:352
Method__init__
( self, data_load_func: Callable[[], Dict[str, Any]], tools: List[Type[Tool]],
chapter2/prompt-engineering/tau_bench/envs/base.py:45
Method__init__
( self, user_strategy: Union[str, UserStrategy] = UserStrategy.LLM, user_model: str =
chapter2/prompt-engineering/tau_bench/envs/retail/env.py:13
Method__init__
( self, user_strategy: Union[str, UserStrategy] = UserStrategy.LLM, user_model: str =
chapter2/prompt-engineering/tau_bench/envs/airline/env.py:13
Method__init__
( self, tools_info: List[Dict[str, Any]], wiki: str, model: str, provi
chapter2/prompt-engineering/tau_bench/agents/tool_calling_agent.py:13
Method__init__
( self, tools_info: List[Dict[str, Any]], wiki: str, model: str, provi
chapter2/prompt-engineering/tau_bench/agents/chat_react_agent.py:18
Method__init__
( self, tools_info: List[Dict[str, Any]], wiki: str, model: str, provi
chapter2/prompt-engineering/tau_bench/agents/few_shot_agent.py:14
Method__init__
(self, root_dir: str = ".")
chapter2/kv-cache/agent.py:97
Method__init__
Initialize the agent Args: api_key: API key for Moonshot/Kimi mode: KV cache optimization mode
chapter2/kv-cache/agent.py:357
Method__init__
(self, fail_first_with=None)
chapter2/agent-skills-ppt/tests/test_reasoning_degrade.py:25
Method__init__
(self, completions)
chapter2/agent-skills-ppt/tests/test_reasoning_degrade.py:37
Method__init__
Initialize the context compressor Args: strategy: Compression strategy to use api_key: API key for L
chapter2/context-compression/compression_strategies.py:65
Method__init__
Initialize the benchmark suite with configurable performance parameters.
chapter2/context-compression/benchmark_compression.py:66
Method__init__
Initialize the research agent Args: api_key: API key for Moonshot/Kimi compression_strategy: Strateg
chapter2/context-compression/agent.py:71
Method__init__
Initialize the strategy runner Args: log_dir: Directory to save log files
chapter2/context-compression/run_all_strategies.py:39
Method__init__
(self, logger, original_stdout)
chapter2/context-compression/run_all_strategies.py:133
Method__init__
Initialize the experiment runner Args: api_key: API key for Kimi/Moonshot results_file: Optional explicit pa
chapter2/context-compression/experiment.py:41
Method__init__
Initialize web tools
chapter2/context-compression/web_tools.py:25
Method__init__
(self, tokenizer, context_length: int, verbose: bool = False)
chapter2/attention_visualization/agent.py:88
Method__init__
Initialize the agent with Qwen3 model Args: model_name: Hugging Face model name device: Device to ru
chapter2/attention_visualization/agent.py:163
Method__init__
(self)
chapter2/attention_visualization/tools.py:18
Method__init__
(self, pieces)
chapter2/attention_visualization/test_token_labels.py:21
Method__init__
(self, *args, **kwargs)
chapter2/attention_visualization/main.py:48
Method__init__
(self, pieces)
chapter2/attention_visualization/test_streaming.py:51
Method__init__
(self, script)
chapter2/attention_visualization/test_streaming.py:73
Method__init__
(self, chunks)
chapter2/local_llm_serving/test_benchmark.py:11
Method__init__
(self, stream)
chapter2/local_llm_serving/test_ollama_thinking.py:25
Method__init__
Initialize with a model that supports tool calling
chapter2/local_llm_serving/ollama_native.py:21
Method__init__
Initialize using Ollama's OpenAI-compatible API This provides better compatibility with tool calling
chapter2/local_llm_serving/ollama_native.py:380
Method__init__
Initialize the agent with vLLM server connection Args: api_base: Base URL for vLLM server api_key: A
chapter2/local_llm_serving/agent.py:23
Method__init__
(self)
chapter2/local_llm_serving/tools.py:19
Method__init__
Initialize server manager with configuration
chapter2/local_llm_serving/server.py:21
Method__init__
(self, base_url: str, model: str, timeout: float = 180.0)
chapter2/local_llm_serving/run_experiment.py:61
Method__init__
Initialize with automatic backend detection Args: backend: Force a specific backend ('vllm', 'ollama', or None f
chapter2/local_llm_serving/main.py:29
Method__init__
Initialize the agent Args: api_key: API key for the LLM provider provider: LLM provider (including d
chapter2/system-hint/agent.py:89
Method__init__
( self, client: OpenAI, model: str, defense: DefenseConfig, webpage_co
chapter2/prompt-injection/agent.py:93
Method__init__
(self, agent_response_fn: Callable[[str], str] | None = None)
chapter2/prompt-injection/robustness_evaluator.py:121
Method__init__
(self, profile: str = "evolving")
chapter9/self-evolution-eval/agent.py:30
Method__init__
( self, model: str | None = None, *, arm: str = "evolving", provider:
chapter9/self-evolution-eval/agent.py:103
Method__init__
(self, verbose: bool = True, allow_create: bool = True, model: str | None = None)
chapter9/self-evolving-tools/agent.py:207
Method__init__
(self, library_dir: Path = LIBRARY_DIR)
chapter9/self-evolving-tools/tool_manager.py:46
Method__init__
(self, quality_evaluator: Optional[Callable[[Any], float]] = None)
chapter9/hermes-self-evolution/run_downstream_ablation.py:86
Method__init__
(self, payload)
chapter9/trajectory-verifier/test_llm_judge_null_fields.py:14
← previousnext →7,701–7,800 of 13,003, ranked by callers