Trying to customize an object that coming from a tool to send to the AI agen

Hi,

I connected to chat model togther with another tool.

The tool is returning the data (objects) with a long objects that the chat model cannot hanlde.

I wonder how I can customoize the response of to object to spesific keys in the object from the the tool and then send it to the AI model? in which part of the flow to do it? how can I condition the flow to send the objects to the AI model only after it customize?

I know there is option of Edit Fields, but it not align with the flow I want.

I want:
tigger a message → AI model → asking for summry from different tool – customize the objects – the response get back – answer from the chat model

At the momemnt:
tigger a message → AI model → asking for summry from different tool – the response getting back – chat model cannot hanlde the data

Thank you,
Noam Ofir

Hi,

I think you want to use a structured output.

What worked best for me is an ai tool agent doing the generation and tool calling which feeds into a basic LLM chain which sole purpose is the generate a structured output

Reg
J.

Hi,

Thank you for replaying.

Can you share please share the AI tool aget? @jcuypers