65
65
from ..toolsets .combined import CombinedToolset
66
66
from ..toolsets .function import FunctionToolset
67
67
from ..toolsets .prepared import PreparedToolset
68
- from .abstract import AbstractAgent , EventStreamHandler , InstructionsInput , RunOutputDataT
68
+ from .abstract import AbstractAgent , EventStreamHandler , Instructions , RunOutputDataT
69
69
from .wrapper import WrapperAgent
70
70
71
71
if TYPE_CHECKING :
@@ -163,7 +163,7 @@ def __init__(
163
163
model : models .Model | models .KnownModelName | str | None = None ,
164
164
* ,
165
165
output_type : OutputSpec [OutputDataT ] = str ,
166
- instructions : InstructionsInput = None ,
166
+ instructions : Instructions = None ,
167
167
system_prompt : str | Sequence [str ] = (),
168
168
deps_type : type [AgentDepsT ] = NoneType ,
169
169
name : str | None = None ,
@@ -189,7 +189,7 @@ def __init__(
189
189
model : models .Model | models .KnownModelName | str | None = None ,
190
190
* ,
191
191
output_type : OutputSpec [OutputDataT ] = str ,
192
- instructions : InstructionsInput = None ,
192
+ instructions : Instructions = None ,
193
193
system_prompt : str | Sequence [str ] = (),
194
194
deps_type : type [AgentDepsT ] = NoneType ,
195
195
name : str | None = None ,
@@ -213,7 +213,7 @@ def __init__(
213
213
model : models .Model | models .KnownModelName | str | None = None ,
214
214
* ,
215
215
output_type : OutputSpec [OutputDataT ] = str ,
216
- instructions : InstructionsInput = None ,
216
+ instructions : Instructions = None ,
217
217
system_prompt : str | Sequence [str ] = (),
218
218
deps_type : type [AgentDepsT ] = NoneType ,
219
219
name : str | None = None ,
@@ -351,7 +351,7 @@ def __init__(
351
351
self ._override_tools : ContextVar [
352
352
_utils .Option [Sequence [Tool [AgentDepsT ] | ToolFuncEither [AgentDepsT , ...]]]
353
353
] = ContextVar ('_override_tools' , default = None )
354
- self ._override_instructions : ContextVar [_utils .Option [InstructionsInput ]] = ContextVar (
354
+ self ._override_instructions : ContextVar [_utils .Option [Instructions ]] = ContextVar (
355
355
'_override_instructions' , default = None
356
356
)
357
357
@@ -369,7 +369,7 @@ def _get_instructions_literal_and_functions(
369
369
370
370
def _instructions_literal_and_functions (
371
371
self ,
372
- instructions : InstructionsInput ,
372
+ instructions : Instructions ,
373
373
) -> tuple [str | None , list [_system_prompt .SystemPromptRunner [AgentDepsT ]]]:
374
374
literal_parts : list [str ] = []
375
375
functions : list [_system_prompt .SystemPromptRunner [AgentDepsT ]] = []
@@ -736,7 +736,7 @@ def override(
736
736
model : models .Model | models .KnownModelName | str | _utils .Unset = _utils .UNSET ,
737
737
toolsets : Sequence [AbstractToolset [AgentDepsT ]] | _utils .Unset = _utils .UNSET ,
738
738
tools : Sequence [Tool [AgentDepsT ] | ToolFuncEither [AgentDepsT , ...]] | _utils .Unset = _utils .UNSET ,
739
- instructions : InstructionsInput | _utils .Unset = _utils .UNSET ,
739
+ instructions : Instructions | _utils .Unset = _utils .UNSET ,
740
740
) -> Iterator [None ]:
741
741
"""Context manager to temporarily override agent dependencies, model, toolsets, tools, and instructions.
742
742
0 commit comments