Skip to content

Allow tool calls in the structured LLM output nodes #400

@metarag

Description

@metarag

Currently, we have APIs like nodeLLMRequest and AIAgentLLMWriteSession.requestLLM which allow the LLM to either produce a raw text output or a tool call. We may then honor this tool call, plug the tool result back into the LLM, run the LLM again to produce the final raw text response that incorporates the tool result.

On the other hand, we have APIs like nodeLLMRequestStructured and AIAgentLLMWriteSession.requestLLMStructured which force the LLM to produce an output that conforms to a given structure. However, these APIs are not flexible enough to allow the LLM to first make tool calls in order to be able to produce the final structured result.

It would be great if tool calls could also work pretty much in the same way when producing structured outputs as when producing raw text outputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions