Open miltonhit opened 3 months ago
@miltonhit wouldn't it work to have the ReadDatabaseTables.Request
contain the sessionId
or maybe something like ReadDatabaseTables.RequestWithSession
?
Can you elaborate more on the use cases where this functionality is important to have?
@miltonhit wouldn't it work to have the
ReadDatabaseTables.Request
contain thesessionId
or maybe something likeReadDatabaseTables.RequestWithSession
?Can you elaborate more on the use cases where this functionality is important to have?
Yes, it would be... However, currently these parameters are populated by an LLM. This isn't secure. I think it would be very interesting to implement something similar to what was done with the advisor parameters:
var chatResponseFlux = chatClient.prompt()
.user(message.getContent())
.advisors(a -> a
.param('userId', userId)
)
.advisors(new ChatMemoryAdvisor(... ))
.stream().chatResponse();
I have also encountered a similar problem. I hope to obtain parameters in the context of the request or through the parameters of the function, instead of obtaining the session ID in the LLM response text, because the session ID in the LLM response text may be empty
Expected Behavior I need to get some "session" information inside a
Function<A, B>
(function call) bean, for example:Then
Today this behavior is not possible. A possible workaround is to input this param to LLM context. But this solution is very insecure, beacase the user can propmt some injection, for example: