spring-ai icon indicating copy to clipboard operation
spring-ai copied to clipboard

Possibility to connect function calls with messages they are related to

Open kkolago opened this issue 1 year ago • 0 comments
trafficstars

Expected Behavior

It would be good to be able to easily connect function calls with user prompts that trigger them or with assistant responses that were generated based on these function calls. It would be especially beneficial for chats with memory.

Current Behavior

Currently some implementations deep down use history of function calls (a.k.a. tool calls) that were used in process of answering user's question, but it is hard to get these with IDs of messages they are connected to.

Context

Use-case for this feature: Often it would be beneficial if end-users of chat tools that are using Spring AI in the backend could validate what function calls (and with what parameters) were used in order to answer their questions instead of accepting answers blindly as if they were coming from some black box.

I believe that currently this is not easy to implement this feature in Spring AI (in case of integration with OpenAI I had to use AOP, which I consider kind of last resort solution).

kkolago avatar Aug 10 '24 11:08 kkolago