@@ -136,6 +136,7 @@ Deserialized agent
136136def run(messages: list[ChatMessage],
137137 streaming_callback: Optional[StreamingCallbackT] = None ,
138138 * ,
139+ generation_kwargs: Optional[dict[str , Any]] = None ,
139140 break_point: Optional[AgentBreakpoint] = None ,
140141 snapshot: Optional[AgentSnapshot] = None ,
141142 system_prompt: Optional[str ] = None ,
@@ -150,6 +151,8 @@ Process messages and execute tools until an exit condition is met.
150151- `messages` : List of Haystack ChatMessage objects to process.
151152- `streaming_callback` : A callback that will be invoked when a response is streamed from the LLM .
152153The same callback can be configured to emit tool results when a tool is called.
154+ - `generation_kwargs` : Additional keyword arguments for LLM . These parameters will
155+ override the parameters passed during component initialization.
153156- `break_point` : An AgentBreakpoint, can be a Breakpoint for the " chat_generator" or a ToolBreakpoint
154157for " tool_invoker" .
155158- `snapshot` : A dictionary containing a snapshot of a previously saved agent execution. The snapshot contains
@@ -180,6 +183,7 @@ A dictionary with the following keys:
180183async def run_async(messages: list[ChatMessage],
181184 streaming_callback: Optional[StreamingCallbackT] = None ,
182185 * ,
186+ generation_kwargs: Optional[dict[str , Any]] = None ,
183187 break_point: Optional[AgentBreakpoint] = None ,
184188 snapshot: Optional[AgentSnapshot] = None ,
185189 system_prompt: Optional[str ] = None ,
@@ -198,6 +202,8 @@ if available.
198202- `messages` : List of Haystack ChatMessage objects to process.
199203- `streaming_callback` : An asynchronous callback that will be invoked when a response is streamed from the
200204LLM . The same callback can be configured to emit tool results when a tool is called.
205+ - `generation_kwargs` : Additional keyword arguments for LLM . These parameters will
206+ override the parameters passed during component initialization.
201207- `break_point` : An AgentBreakpoint, can be a Breakpoint for the " chat_generator" or a ToolBreakpoint
202208for " tool_invoker" .
203209- `snapshot` : A dictionary containing a snapshot of a previously saved agent execution. The snapshot contains
0 commit comments