Can't set the path of the 'chat model' in 'AI Agent' step

Hey all, this is a very simple workflow:

In the last step ‘Send message’ I am trying to include the number of tokens used by the ‘chat model’ in the ‘AI Agent’ step.

As you can see {tokenUsage.totalTokens} isn’t available as an input:

How can I access the output of the ‘OpenAI Chat Model’?

Thanks,

Hi @aminabudahab

You will need to activate Return Intermediate Steps in the AI Agent node options

image

1 Like

Much appreciated, I have enabled the option and I can see the object ‘intermediateSteps’ is added to the ‘AI Agent’ output but it is empty:

What am I missing?
Thanks again

unfortunately, It seems that this feature involves intermediate steps performed by the model, but the main process is currently not possible…
there is another question with same request too here

1 Like

I was having the same issue. There’s a workaround that works pretty well.

Take a look here :point_down: