Can I put everything that doesn't need an external service directly inside the `run` method without

Can I put everything that doesn't need an external service directly inside the
run
method without wrapping it inside a
step.do
. My examples are
zod
validation of params or something like
const ai = new GoogleGenAI()
.. I theory I don't want to persist those, I'm fine if they run again on a new try. So would it be best to put them in the global
run
scope?
Was this page helpful?