Using Semantic Kernel with Web Applications. #7125
-
A Challenging Use Case We All May be Faced With The console/test examples provided in the semantic-kernel source are clear and concise. In my two decades of .NET, I've never seen a more flexible and powerful library. However, an area I'm interested in discussing is how developers using Semantic Kernel are integrating the flow and lifetime of Kernel instances when dealing with web applications. As an example, I build and maintain a .NET core application with an API, and a React front end. Apologies for all the questions, in a sense this is an application architecture topic. But I think using Semantic Kernel in this manner (web application) no longer falls entirely in the realm of 'disconnected, stateless web applications' we've been creating in the past. Some mistakes may be made (possibly by me) along the way when implementing AI in this manner. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
LLM models are stateless by nature, so what you may want to maintain is the memory (depending on how your users interact with it); here's an example of Semantic Kernel using Redis for this. |
Beta Was this translation helpful? Give feedback.
-
We recommend that you have a kernel per request (i.e. create a transient kernel). |
Beta Was this translation helpful? Give feedback.
We recommend that you have a kernel per request (i.e. create a transient kernel).
@jmservera +1 what you'd added. The only thing you would need to persist per session is history which would be just text.