mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-10-08 14:49:40 +00:00
Improved RAG issue handling (#313)
This commit is contained in:
1 parent
3bfca45e11
commit
df01ce188e
5 files changed
+18
-6
No files matched your search
@@ -44,8 +44,16 @@ public sealed class ContentText : IContent
|
||||
// Call the RAG process. Right now, we only have one RAG process:
|
||||
if (lastPrompt is not null)
|
||||
{
|
||||
var rag = new AISrcSelWithRetCtxVal();
|
||||
chatThread = await rag.ProcessAsync(provider, lastPrompt, chatThread, token);
|
||||
try
|
||||
{
|
||||
var rag = new AISrcSelWithRetCtxVal();
|
||||
chatThread = await rag.ProcessAsync(provider, lastPrompt, chatThread, token);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
var logger = Program.SERVICE_PROVIDER.GetService<ILogger<ContentText>>()!;
|
||||
logger.LogError(e, "Skipping the RAG process due to an error.");
|
||||
}
|
||||
}
|
||||
|
||||
// Store the last time we got a response. We use this later
|
||||
|
||||
Reference in new issue
Block a user