mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-06 04:31:36 +00:00
Added whole documents to the Translation, Grammar & Spelling, and Rewrite & Improve assistants (#1179)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
f7666861f1
commit
918572c158
150 files changed
+12850
-302
No files matched your search
@@ -0,0 +1,29 @@
|
||||
namespace AIStudio.Tools.DocumentSegments;
|
||||
|
||||
/// <summary>
|
||||
/// What became of a segment, and its new text.
|
||||
/// </summary>
|
||||
/// <param name="Status">What became of the segment.</param>
|
||||
/// <param name="Text">The new text with tags, as the model wrote it; null unless the segment was transformed.</param>
|
||||
public readonly record struct SegmentOutcome(SegmentStatus Status, string? Text)
|
||||
{
|
||||
/// <summary>
|
||||
/// A segment a model worked on.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The tags of the text may still differ from those of the source, when the model missed them twice:
|
||||
/// the format then writes the words with as much of the inline structure as fits rather than nothing.
|
||||
/// </remarks>
|
||||
/// <param name="text">The new text with tags.</param>
|
||||
public static SegmentOutcome Transformed(string text) => new(SegmentStatus.TRANSFORMED, text);
|
||||
|
||||
/// <summary>
|
||||
/// A segment which the prompt injection filter kept from the model.
|
||||
/// </summary>
|
||||
public static readonly SegmentOutcome FILTERED = new(SegmentStatus.FILTERED, null);
|
||||
|
||||
/// <summary>
|
||||
/// A segment for which no model delivered a result.
|
||||
/// </summary>
|
||||
public static readonly SegmentOutcome FAILED = new(SegmentStatus.FAILED, null);
|
||||
}
|
||||
Reference in new issue
Block a user