Use the extension method for conversion

This commit is contained in:
Thorsten Sommer 2025-02-18 13:13:51 +01:00
parent a9bf3d5f75
commit e41b5ffbc8
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -95,7 +95,7 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
Path = eriContext.Path ?? string.Empty, Path = eriContext.Path ?? string.Empty,
Type = eriContext.ToRetrievalContentType(), Type = eriContext.ToRetrievalContentType(),
Links = eriContext.Links, Links = eriContext.Links,
Category = RetrievalContentCategory.TEXT, Category = eriContext.Type.ToRetrievalContentCategory(),
MatchedText = eriContext.MatchedContent, MatchedText = eriContext.MatchedContent,
DataSourceName = eriContext.Name, DataSourceName = eriContext.Name,
SurroundingContent = eriContext.SurroundingContent, SurroundingContent = eriContext.SurroundingContent,
@ -109,7 +109,7 @@ public readonly record struct DataSourceERI_V1 : IERIDataSource
Type = eriContext.ToRetrievalContentType(), Type = eriContext.ToRetrievalContentType(),
Links = eriContext.Links, Links = eriContext.Links,
Source = eriContext.MatchedContent, Source = eriContext.MatchedContent,
Category = RetrievalContentCategory.IMAGE, Category = eriContext.Type.ToRetrievalContentCategory(),
SourceType = ContentImageSource.BASE64, SourceType = ContentImageSource.BASE64,
DataSourceName = eriContext.Name, DataSourceName = eriContext.Name,
}); });