AI-Studio/app/MindWork AI Studio/Tools/Web/RetrievedWebPage.cs
Thorsten Sommer 40ac215359
Some checks are pending
Build and Release / Determine run mode (push) Waiting to run
Build and Release / Read metadata (push) Blocked by required conditions
Build and Release / Sync Flatpak repo (push) Blocked by required conditions
Build and Release / Collect Flatpak artifacts (push) Blocked by required conditions
Build and Release / Verify (push) Waiting to run
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-apple-darwin, osx-arm64, macos-latest, aarch64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-pc-windows-msvc.exe, win-arm64, windows-latest, aarch64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-aarch64-unknown-linux-gnu, linux-arm64, ubuntu-22.04-arm, aarch64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-apple-darwin, osx-x64, macos-latest, x86_64-apple-darwin, dmg,app,updater, dmg) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-pc-windows-msvc.exe, win-x64, windows-latest, x86_64-pc-windows-msvc, nsis,updater, nsis) (push) Blocked by required conditions
Build and Release / Build app (${{ matrix.dotnet_runtime }}) (-x86_64-unknown-linux-gnu, linux-x64, ubuntu-22.04, x86_64-unknown-linux-gnu, appimage,updater, appimage) (push) Blocked by required conditions
Build and Release / Prepare & create release (push) Blocked by required conditions
Build and Release / Publish release (push) Blocked by required conditions
Allowed reading plain text and JSON from the web, with a stronger prompt injection filter (#1000)
2026-09-23 22:21:09 +02:00

28 lines
1008 B
C#

using AIStudio.Provider;
namespace AIStudio.Tools.Web;
/// <summary>
/// A web page or text document as the retrieval service read it.
/// </summary>
/// <remarks>
/// Nothing here is filtered for prompt injections yet. Everything a caller hands on to a model
/// has to go through the WebPageContentSanitizer or the PromptInjectionGuardService first, after
/// it was cut down to what the model actually gets: only that part needs checking, and a page
/// can be far larger.
/// </remarks>
public sealed class RetrievedWebPage
{
public required HTMLParserWebPage Page { get; init; }
/// <summary>
/// Whether the content was extracted from an HTML page or is the text of a document.
/// </summary>
public required WebContentKind ContentKind { get; init; }
public required ExtractedWebPage ExtractedPage { get; init; }
public required DateTimeOffset RetrievedAtUtc { get; init; }
public ConfidenceLevel RequiredProviderConfidence { get; init; } = ConfidenceLevel.NONE;
}