mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-12-05 12:04: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,24 @@
|
||||
namespace AIStudio.Tools.DocumentSegments;
|
||||
|
||||
/// <summary>
|
||||
/// The text of a document is larger than its format reads on this computer, see IDocumentSegmentFormat.MaxTextSize.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// The format would hold the text in memory many times over while reading and writing it, so it refuses the document
|
||||
/// before reading its text.
|
||||
/// </remarks>
|
||||
/// <param name="path">The document.</param>
|
||||
/// <param name="textSize">The size of the text of the document, in bytes, see IDocumentSegmentFormat.TextSizeOf.</param>
|
||||
/// <param name="maxTextSize">The size of the largest text the format reads, in bytes.</param>
|
||||
public sealed class DocumentTooLargeException(string path, long textSize, long maxTextSize) : Exception($"The text of the document '{path}' takes {textSize} bytes, more than the {maxTextSize} bytes its format reads.")
|
||||
{
|
||||
/// <summary>
|
||||
/// The size of the text of the document, in bytes.
|
||||
/// </summary>
|
||||
public long TextSize => textSize;
|
||||
|
||||
/// <summary>
|
||||
/// The size of the largest text the format reads, in bytes.
|
||||
/// </summary>
|
||||
public long MaxTextSize => maxTextSize;
|
||||
}
|
||||
Reference in new issue
Block a user