最終更新:2025-10-08 (水) 10:28:49 (337d)
agents.RunConfig
Top / agents.RunConfig
https://openai.github.io/openai-agents-python/ref/run/#agents.run.RunConfig
call_model_input_filter
https://openai.github.io/openai-agents-python/ref/run/#agents.run.RunConfig.call_model_input_filter
- CallModelInputFilter?
- Optional callback that is invoked immediately before calling the model. It receives the current agent, context and the model input (instructions and input items), and must return a possibly modified ModelInputData? to use for the model call.
- This allows you to edit the input sent to the model e.g. to stay within a token limit. For example, you can use this to add a system prompt to the input.
メモ
return ModelInputData(input=new_input_list, instructions=new_instructions)

