mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-13 11:47:22 +00:00
Improved the error handling for the entire RAG process
This commit is contained in:
2 files changed
+11
-2
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
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
- Added the "Community & Code" section to the about page. It includes links to the GitHub repositories and the project website.
|
||||
- Improved the ERI client to expect JSON responses and send JSON requests using camel case.
|
||||
- Improved the ERI client to raise an error when the server responds with additional JSON data that is not expected.
|
||||
- Improved the error handling for the entire RAG process.
|
||||
Reference in new issue
Block a user