Skip to content

Avoid second roundtrip when call functions #652

Closed
@Grogdunn

Description

@Grogdunn

Expected Behavior
For some customers we do not have necessity to pass the function-result to LLMs again.

Eg: extract some information from a blob of text and save it in structured mode. That can be accomplished with a function call with in input the "data structure" but the output is not necessary, so we can avoid totally the "second call" to LLM.

Current Behavior
Every function must return a value that is passed to LLM to produce a nice output.

Context
As workaround we implement some function with "spying" capability (like tests) and use it to grab the "first call" data. And ignore completly the second call-result.

We try to add this feature in spring-ai I think that can be useful to others. Or at least anyone can decide.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions