Refactor file attachments to use the FileAttachment type

This commit is contained in:
Thorsten Sommer 2025-12-28 15:34:32 +01:00
parent daa942a7dd
commit 8c046dc3ae
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
3 changed files with 4 additions and 4 deletions

View File

@ -32,7 +32,7 @@ public sealed class ContentImage : IContent, IImageSource
public List<Source> Sources { get; set; } = [];
/// <inheritdoc />
public List<string> FileAttachments { get; set; } = [];
public List<FileAttachment> FileAttachments { get; set; } = [];
/// <inheritdoc />
public Task<ChatThread> CreateFromProviderAsync(IProvider provider, Model chatModel, IContent? lastUserPrompt, ChatThread? chatChatThread, CancellationToken token = default)

View File

@ -42,7 +42,7 @@ public sealed class ContentText : IContent
public List<Source> Sources { get; set; } = [];
/// <inheritdoc />
public List<string> FileAttachments { get; set; } = [];
public List<FileAttachment> FileAttachments { get; set; } = [];
/// <inheritdoc />
public async Task<ChatThread> CreateFromProviderAsync(IProvider provider, Model chatModel, IContent? lastUserPrompt, ChatThread? chatThread, CancellationToken token = default)

View File

@ -50,10 +50,10 @@ public interface IContent
/// <summary>
/// Represents a collection of file attachments associated with the content.
/// This property contains a list of file paths that are appended
/// This property contains a list of file attachments that are appended
/// to the content to provide additional context or resources.
/// </summary>
public List<string> FileAttachments { get; set; }
public List<FileAttachment> FileAttachments { get; set; }
/// <summary>
/// Uses the provider to create the content.