effect icon indicating copy to clipboard operation
effect copied to clipboard

Support Tools in `@effect/ai`'s `generateObject`

Open harrysolovay opened this issue 6 months ago • 0 comments

What is the problem this feature would solve?

generateObject seemingly does not support specificity of tools.

I'm not so sure if there's a clean solution to this. Tool-calling and structured output requests are generally treated as separate procedures.

What is the feature you are proposing to solve the problem?

It may be useful to somehow abstract over this complexity / allow tools to be passed to the generateObject method. I could even see a world where generateObject and generateText are unified as generate, with an optional schema parameter.

What alternatives have you considered?

Piping the result of a generateText with toolkit specified into a generateObject request wherein I have the model take the output of the previous request and prompt the model to place it into an object.

harrysolovay avatar Jun 04 '25 18:06 harrysolovay