Open Grogdunn opened 3 months ago
Hey @Grogdunn , were you able to reproduce this potential issue?
I've missing to update this issue. But it's my design error on function call for a project. I use Function to extract data and add to thread bound Lists. But when I create that functions I pass the reference to lists, but the "last" thread ovverride the reference to previous one, so the data are mixed.
The only improvements to spring-ai project are to explicit says in documentation/javadoc that function are resused by name so pay attention to mulithread envirionment.
@tzolov If no more information are needed feel free to close this issue :wink:
@tzolov needs to follow up on how we can support the use case of getting the arguments of function to invoke but don't invoke or have control over invocation.
I admit, need to triage better.
In a multithread application with multiple Function call Invocation the GPT can lead to share information between threads.
In a my application I've the same function with different lambda inside it, and if GPT make the funciton call "at same time" sometimes the lambdas are "swapped" or data are "wrong".
To resolve that I've, at the moment, called each function with different lambda with a combination of thread name, function name, lambda scope. So in this manner the "function registry" has a different copy of a funciton for each thread/invocation.
Need more testing and reasoning about it.